I'm trying to call RegisterServiceProcess() function. I wrote the code below:
DWORD procID=::GetCurrentProcessId();
FARPROC farProc=::GetProcAddress((HMODULE)LoadLibrary("c:\windows\system\kernel32.dll","RegisterServiceProcess"
Ok, what I understood from MSDN is that farProc now contains the address of RegisterServiceProcess function, am I right?
And now how do I call the RegisterServiceProcess function?
(*farProc)(procID,1); - this gives me some ugly error!
(I've also included "kernel32.lib" in my app)
Could anyone help?
DWORD procID=::GetCurrentProcessId();
FARPROC farProc=::GetProcAddress((HMODULE)LoadLibrary("c:\windows\system\kernel32.dll","RegisterServiceProcess"
Ok, what I understood from MSDN is that farProc now contains the address of RegisterServiceProcess function, am I right?
And now how do I call the RegisterServiceProcess function?
(*farProc)(procID,1); - this gives me some ugly error!
(I've also included "kernel32.lib" in my app)
Could anyone help?