DebugActiveProcessStop' : undeclared identifier
Hey,
I'm using VC++ 6.0 and I cannot use the DebugActiveProcessStop function. I know this is a valid function at least according to: http://msdn.microsoft.com/library/de...rocessstop.asp
But its not defined in my winbase.h and so I can't use it?
I know its only supported under WinXP but I'm running XP.
Any ideas?
Mat.
Re: DebugActiveProcessStop' : undeclared identifier
i also didnt find in on my pc and i am using XP maybe it requires the latest Platform SDK so you can try downloading it and install.
but there is a solution simply gain pointer to the function dynamically ;)
Code:
typedef BOOL (*pDebugActiveProcessStop)(DWORD);
HINSTANCE h = ::GetModuleHandle("kernel32.dll");
if ( h == 0 )
h = ::LoadLibrary("kernel32.dll");
if (h)
{
pDebugActiveProcessStop pDAPStop = NULL;
pDAPStop = (pDebugActiveProcessStop) ::GetProcAddress(h,"DebugActiveProcessStop");
if (pDAPStop)
{
// call the fucntion if we gain a pointer to it
pDAPStop(0);
}
::FreeLibrary(h);
}
if i helped dont forget to rate :-)
Cheers