|
-
Jan 30th, 2003, 02:51 PM
#1
Thread Starter
Registered User
MFC .dll to a Mangaged .dll app
before when i used vc 6.0, i had the following code....
Code:
CSample_appApp theApp;
int StartCommand ( )
{
HINSTANCE rscHndl;
// save a handle to InRoads's resource list
rscHndl = AfxGetResourceHandle ( );
// set resource handle to point to your application
AfxSetResourceHandle ( GetModuleHandle ( "sample_app.dll"));
SDK_FORM dlg;
dlg.DoModal();
// reset the resource handle back to InRoads's resource list
AfxSetResourceHandle ( rscHndl );
return ( 0 );
}
when i ran this .dll, my form was executed and then i could use the functions on the form. so my question is how can I do this with a managed .dll class, so that when i run my .dll, it's calls instead of the lines
SDK_FORM dlg;
dlg.DoModal();
but
Console::WriteLine(S"Forms Example");
Is this not possible?
thanks
-
Jan 30th, 2003, 06:33 PM
#2
Um, no, not really. MSIL assemblies (the dlls that are created when compiling managed C++ or any .Net language) are quite different from normal DLLs. And you shouldn't use managed C++ together with MFC anyway.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|