Click to See Complete Forum and Search --> : DebugActiveProcessStop' : undeclared identifier


Matrim Cauthon
July 21st, 2005, 10:39 AM
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/default.asp?url=/library/en-us/debug/base/debugactiveprocessstop.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.

golanshahar
July 21st, 2005, 11:40 AM
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 ;)

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