Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RegisterServiceProcess()

Status
Not open for further replies.

Robertus

Programmer
Feb 16, 2001
81
RO
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?




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top