CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    4

    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.

  2. #2
    Join Date
    May 2005
    Posts
    4,954

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured