Click here to Skip to main content
15,913,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File IO Pin
David Crow11-Mar-04 2:55
David Crow11-Mar-04 2:55 
GeneralNamed Pipes Vs Sockets Pin
vikramlinux10-Mar-04 22:04
vikramlinux10-Mar-04 22:04 
GeneralRe: Named Pipes Vs Sockets Pin
Antti Keskinen10-Mar-04 22:26
Antti Keskinen10-Mar-04 22:26 
GeneralRe: Named Pipes Vs Sockets Pin
Steve S11-Mar-04 0:32
Steve S11-Mar-04 0:32 
GeneralRe: Named Pipes Vs Sockets Pin
GuimaSun11-Mar-04 0:40
GuimaSun11-Mar-04 0:40 
GeneralRe: Named Pipes Vs Sockets Pin
vikramlinux11-Mar-04 1:00
vikramlinux11-Mar-04 1:00 
General.net application and C dll Pin
mosquitooth10-Mar-04 21:39
mosquitooth10-Mar-04 21:39 
GeneralRe: .net application and C dll Pin
Antti Keskinen10-Mar-04 22:21
Antti Keskinen10-Mar-04 22:21 
Hmm..

Considering that you can use the handle of a loaded DLL to get pointers to the exported functions inside, it would seem logical that the same procedure can be applied vice-versa.

When you load an application, you usually get an instance handle. Passing this instance handle out of the application context (thread) into a DLL's handler function (residing in another thread), should allow you to use GetProcAddress or a similar function to get the exported symbols of your .Net application.

This should be pretty easy to implement with MFC, just by using AfxGetInstanceHandle in the executable, and passing this handle over to the DLL, you can use the handle to get the exported symbols. But a case with VB .Net and VC++ DLL, I'm not sure. I don't know how you can export symbols from a VB.Net application/DLL. See the VB manual for instructions on this one.

But the outline of the procedure I mentioned should work. An additional problem may arise because the .Net application most obviously runs over the CLR, and is thus considered 'managed'. Passing a handle of a managed application to an unmanaged DLL might prove "interesting" results Smile | :)

All in all, try this out, and you'll see what happens..

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralDebugging symbols for Windows XP Pin
rrrado10-Mar-04 21:15
rrrado10-Mar-04 21:15 
GeneralPropertyPage Title Pin
Florin Ochiana10-Mar-04 20:30
Florin Ochiana10-Mar-04 20:30 
GeneralRe: PropertyPage Title Pin
Prakash Nadar10-Mar-04 21:36
Prakash Nadar10-Mar-04 21:36 
GeneralRe: PropertyPage Title Pin
Antti Keskinen10-Mar-04 21:43
Antti Keskinen10-Mar-04 21:43 
QuestionHow to insert/delete some content of text file fastly? Pin
freehawk10-Mar-04 20:25
freehawk10-Mar-04 20:25 
AnswerRe: How to insert/delete some content of text file fastly? Pin
rrrado10-Mar-04 21:19
rrrado10-Mar-04 21:19 
GeneralRe: How to insert/delete some content of text file fastly? Pin
freehawk10-Mar-04 22:17
freehawk10-Mar-04 22:17 
AnswerRe: How to insert/delete some content of text file fastly? Pin
David Crow11-Mar-04 2:58
David Crow11-Mar-04 2:58 
Generalconvert double to char! Pin
catngo10-Mar-04 19:57
catngo10-Mar-04 19:57 
GeneralRe: convert double to char! Pin
Monty210-Mar-04 20:09
Monty210-Mar-04 20:09 
GeneralRe: convert double to char! Pin
catngo10-Mar-04 20:12
catngo10-Mar-04 20:12 
GeneralRe: convert double to char! Pin
Ellis Li10-Mar-04 20:14
Ellis Li10-Mar-04 20:14 
Generalm_pRecentFileList... Pin
Neha10-Mar-04 19:19
Neha10-Mar-04 19:19 
GeneralRe: m_pRecentFileList... Pin
Prakash Nadar10-Mar-04 23:33
Prakash Nadar10-Mar-04 23:33 
GeneralRe: m_pRecentFileList... Pin
Neha10-Mar-04 23:43
Neha10-Mar-04 23:43 
GeneralRe: m_pRecentFileList... Pin
David Crow11-Mar-04 3:14
David Crow11-Mar-04 3:14 
GeneralMake underline on menu Pin
Member 80845910-Mar-04 19:10
Member 80845910-Mar-04 19:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.