Export a function from a dll for

  • Thread starter Thread starter jdyng77
  • Start date Start date
J

jdyng77

Guest
Hi,


I want to export a function from one of my dlls for rundll32 to call. When running "rundll32 tny.dll xyz" in a command window, I get the following error.


"There was a problem starting tny.dll. The specified module could not be found."


Here is the function:


extern "C" __declspec(dllexport) void xyz()

{

MessageBox(0,L"Hey there again!",0,0);

}


The odd thing is that I can make it work if I put the function in a test, simple dll, created from the VC++ wizard without any project setting change. I run dumpbin against both dlls. The first failed dll has an entry “xyz = xyz”. The second successful dll has an entry “xyz = @ILT+20(xyz)”. It seems that the problem is not due to the function itself, it’s due to how the two dlls are set up. Does anyone have a clue? I appreciate your help in advance.


JD

Continue reading...
 
Back
Top