 |
|
|
 |
|
 |
i wanna use it in VS2005...
It is better of me!
|
|
|
|
 |
|
 |
I'm using a unmanaged MFC application, and I want to use a vb2005 dll. I use this dll, and I can see the namesapce and the class inside it, but when I try to create a new instance of this class, it doesn't work. Can anybody help me on this issue?
The code I wrote is like this:
#import "ClassLibraryCom.tlb"
using namespace ClassLibraryCom;
void main()
{
ClassLibraryCom::ReadWrite test; }
Thank's in advance.
Carlos Santos
|
|
|
|
 |
|
 |
Does anyone know what changes are necessary for VS 2005 in order for this wizard to work?
Thanks
|
|
|
|
 |
|
 |
You don't need the wizard for VS 2005. Just create a regular MFC project and set it to compile with /CLR.
|
|
|
|
 |
|
|
 |
|
 |
Hi,
thanks a lot for this great project. I'm wandering about why this dll-file contains a base class derived from CWinApp. Iwould be happy to learn the reason.
Cheers gunag
|
|
|
|
 |
|
 |
This article is outdated now. Please do not use it.
My Blog
|
|
|
|
 |
|
 |
Hi,
what do you mean? What has to be changed? Is there a newer version of this article somewhere?
Cheers
gunag
|
|
|
|
 |
|
 |
I just updated and re-built a vc6 cpp on a friend's system and moved the dll to another system which does not have the vs dev env loaded. Although it worked great on the "loaded" system (in fact it runs as a called dll in a vb.net app) it will not run on another system - I hsve
tried both an old laptop and even a pc at Kinkos
I get a dll load error. I ran the "depends" program
and saw that the dll needed mfc42d.dll (I then realized
that is what I had been missing!). Now I get a "crash",
"afxwinl.inl line 22 assert" and then "appui.cpp line 177
assert".
Anybody have any idea why? Am I still missing other
files from the other development system?? If so this will be a big problem since I gave the computer back thinking my c++ coding was done, no longer can build the dll.
Would appreciate any help on this
|
|
|
|
 |
|
 |
Hello,
I have the same problem. But I'm learning about DLL now...
Could you help me, please?
thank you so much,
Julie
Julie JP
|
|
|
|
 |
|
 |
Hi,
This is really a nice article, Can you please help me on a little issue.I wanna ask if there is any way to use Managed Code (.Net Code) in a normal MFC 7.0 application.
hope to hear from you soon
Liaqat Fayyaz
|
|
|
|
 |
|
 |
error occur on compiling rc in vs2003
\myproject.rc(114) : error RC2135 : file not found: myproject.tlb
opening view with wild mind
|
|
|
|
 |
|
 |
I delete the line "1 TYPELIB 'myproject.tlb'" in the myproject.rc,
then it's OK.
|
|
|
|
 |
|
 |
Thanks!
|
|
|
|
 |
|
 |
To work correctly you must do one change in default.jp file:
change function name SetFilters to SetupFilters.
P.S. Sorry for my english
|
|
|
|
 |
|
 |
And change .vsz file:
first two lines:
VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine
to
VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.7.1
Ozon
|
|
|
|
 |
|
 |
making this change also makes it work for Vs 2003.net
cheers!!!!
|
|
|
|
 |
|
 |
I managed to get this appwizard to work in VS.Net 2003. However when I compile I get a linker warning LNK4243.
I did find these links "http://support.microsoft.com/?id=814472" and "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vcconMixedDLLLoadingProblem.asp" which address this issue.
I haven't successfully been able to apply the directions from the first link (I'm hoping that just caused by lack of sleep on my part and will be resolved tomorrow after a good nights sleep).
Anyway, has anyone updated this appwizard to address the issues mentioned in these Microsoft support links?
Keith
|
|
|
|
 |
|
 |
hello!
you say "I recommend that you build a separate MFC static library for any MFC code you want to include in the managed code and link it with this DLL. "
how can i do this ? i don't find any example... could you help me to call a MFC library in a C++.NET project?
thanx very much
KiKOS French .NET developer for Wireless tools
|
|
|
|
 |
|
 |
Wizard does not work in 2003 but if your like me and just interested in how to make make your MFC classes available in managed code use the app wizard in VS2002 and then use the classes generated to add your existing MFC files and best of all it works, well done to the author
|
|
|
|
 |
|
 |
The problem why this does not work in VS 2003 can be tacked down to the default.js file.
After doing some trial and error and looking at other wizard default.js file I discovered that one of the js function calls names were changed. Add a result when you try to run the wizard you get and js error indicating that an object was not found.
To fix the error. open the default.js file, goto the OnFinish function (which is the first function in the file) locate the line "SetFilters(proj);" and change it to "SetupFilters(proj);"
the wizard should now run in VS.Net 2003.
Redvers Gosse
Senior Sofware Engineer
ZedIT Solutions Inc
|
|
|
|
 |
|
 |
I get an afxwin1.inl assertion on line 26 when trying to use an MFC dialog or frame from C#.
I used your AppWizard to create a separate c++ managed project in which I put a managed class that acts as a proxy and the MFC dialog class and resources. I then reference it from the C# project.
The assertion triggered is the following:
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
{ ASSERT(afxCurrentResourceHandle != NULL);
return afxCurrentResourceHandle; }
Before using your wizard, I got the same error, but with line 23 of the afxwin1.inl in the AfxGetInstanceHandle assertion.
Pleeeeeeaaasee any heeelp, the MFC classes that we are trying to reuse are very large and are well tested, I guess I can't afford to rewrite them.
Am I doing anything wrong? Have any other of you had this problem?
--john
|
|
|
|
 |
|
 |
Ooops, I just fixed it..
I added a call to AFX_MANAGE_STATE(AfxGetStaticModuleState()) in my managed proxy class before creating the dialog (as adviced by the tutorial comments ) )...
--john
|
|
|
|
 |
|
 |
Still am not able to use this wizard in VS.NET 2003. I created the dll from
your wizard source templates. When i used the dll in my application. I got memory leaks. I dont know whether this problem exist in VS .NET 2002.Please Help me out.
Here is the following Memory Leaks
dllmodul.cpp(102) : {78} client block at 0x08405250, subtype c0, 64 byteslong.
a CDynLinkLibrary object at $08405250, 64 bytes long
{76} normal block at 0x084051F8, 23 bytes long.
Data: < < > D8 9C 3C 08 06 00 00 00 06 00 00 00 01 00 00 00
{75} normal block at 0x08405198, 33 bytes long.
Data: < < > D8 9C 3C 08 10 00 00 00 10 00 00 00 01 00 00 00
{74} normal block at 0x08405148, 20 bytes long.
Data: < < < < > 04 00 00 00 EC 9C 3C 08 EC 9C 3C 08 EC 9C 3C 08
{73} normal block at 0x084050E8, 32 bytes long.
Data: <|0 LQ@ Q@ > 7C 30 1F 08 04 00 00 00 4C 51 40 08 A8 51 40 08
{66} client block at 0x08403108, subtype c0, 64 bytes long.
a CDynLinkLibrary object at $08403108, 64 bytes long
{65} normal block at 0x08403098, 45 bytes long.
Data: < < > D8 9C 3C 08 1C 00 00 00 1C 00 00 00 01 00 00 00
{64} normal block at 0x08403038, 31 bytes long.
Data: < < > D8 9C 3C 08 0E 00 00 00 0E 00 00 00 01 00 00 00
{63} normal block at 0x08402FD8, 30 bytes long.
Data: < < > D8 9C 3C 08 0D 00 00 00 0D 00 00 00 01 00 00 00
{62} normal block at 0x08402F78, 30 bytes long.
Data: < < > D8 9C 3C 08 0D 00 00 00 0D 00 00 00 01 00 00 00
Thanks & Regards,
Uma Mahes
|
|
|
|
 |