RunDLL32 problem 
Author Message
 RunDLL32 problem

I want to create a little DLL with one single exported function so I can
create a link to it like "rundll32.exe
 MyDLL.dll,MyVoidFunction". The rundll32 executes the dll function
without problems but after leaving the
 function it crashes and I don't know why??
 Do I need a special function definition or what is th problem??

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 29 Jun 2002 03:00:00 GMT  
 RunDLL32 problem

Quote:
>The rundll32 executes the dll function
>without problems but after leaving the
> function it crashes and I don't know why??
> Do I need a special function definition or what is th problem??

Yes, you need to define your function like this:

void CALLBACK EntryPoint(HWND hwnd, HINSTANCE hinst,
        LPSTR lpszCmdLine, int nCmdShow);

From the description of your error, it sounds like a calling
convention problem.

See Knowledge Base article Q164787 "INFO: The Windows 95 Rundll and
Rundll32 Interface" for the details.

Dave
--
Address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow up email copies.
http://www.bj.co.uk



Sat, 29 Jun 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Function prototype that RUNDLL32 calls?

2. how to execute .cpl via rundll32.exe

3. Using RUNDLL32 with file operations

4. Rundll32

5. How to make use of rundll32.exe ?

6. EMERGENCY: how to create a dialog dll compatible with rundll/rundll32?

7. problems problems problems

8. Problems, problems, problems!

9. Problems, problems problems

10. Problems, Problems, Problems

11. VC6 to VC7 migration problem (problem with ATL and MFC)

 

 
Powered by phpBB® Forum Software