Calling a function in an EXE file

Vittorio

New member
Joined
Sep 10, 2003
Messages
3
Location
ITALY
With VB.NET I need to call a function exported by an EXE unmanaged program written in C++6.0.
Im able to do the same with a DLL (using DLLIMPORT) but not with an EXE.
Is there a solution fot that ?
Thanks in advance.
Vittorio
 
Last edited by a moderator:
Not that Im aware of. To use a function in a C++ DLL it has to be exported using the DEF file and use a special declaration line for it to be exported for external use. AFAIK, theres no way to do this for EXEs (and if there was, its highly unlikely that the author of the EXE did this).
 
The author of the EXE can modify the program as I like, but I dont know what to ask him.
I already have an example with the function exported without decoration but Im not able to call it (but I can do that if the same function is included in a DLL, ... but I need an EXE !)

Vittorio
 
As far as I understand, calling an .exes function from outside the module cannot be done with a pre-.Net executable. You are trying to treat an executable as if it is a library. This kind of thing was not possible before .Net.
Why dont you do this: make a new dll with the required function only, and have both executables use it. Can you do this?
Yitzhak
 
Ill try again, but I need to share memory area also and I think that 2 different processes will activate 2 different instances of the same DLL: not a problem for functions but big problems for variables.
It could be a solution if it was possible to use the same instance of the DLL ...
Thanks for the suggestions.
Vittorio
 
Back
Top