Re: rundll32 implementation
I believe the correct signature for Rundll32 is:
Code:
typedef void (CALLBACK *DLLFUNC)(HWND,HINSTANCE,LPTSTR,int);
simple example of call...
Code:
(DLLFUNC)(GetDesktopWindow()
, 0
, "\\windows\\system32\\timedate.cpl"
, 0
);
Re: rundll32 implementation
hi there :-)
thank you for your reply.
the program still doesn't start the "clock properties window" but at least
doesn't crash anymore :-)
i'll keep trying and when i get it (if i get it), i post the solution here.
with best regards,
typecast
Re: rundll32 implementation
ok, i got it :-)
you just need to give the whole path .. stupid me :-))
thank you!! :)
typecast
Code:
#define LEAN_AND_MEAN
#include <windows.h>
#include <winbase.h>
#include <winuser.h>
typedef LPVOID (CALLBACK* DLLFUNC)(HWND, HINSTANCE, LPTSTR, int);
int main()
{
HMODULE hMod = NULL;
DLLFUNC ProcAdd = NULL;
hMod = LoadLibrary("c:\\winnt\\system32\\shell32.dll");
if (hMod != NULL)
{
if (hMod)
{
ProcAdd = (DLLFUNC) GetProcAddress(hMod, "Control_RunDLL");
if (ProcAdd)
{
(DLLFUNC) ProcAdd(GetDesktopWindow(), 0,"c:\\winnt\\system32\\TimeDate.cpl",0);
}
}
FreeLibrary(hMod);
}
return 0;
}