How to use DisableProcessWindowsGhosting in a VC6 application?
-
Hi, I need to set the DisableProcessWindowsGhosting(VOID) function in an application developed in VC6.0 The problem is that Windows.h that comes with that old programming environment does not know this function yet. What do I have to include in order to get access to that function?
-
Hi, I need to set the DisableProcessWindowsGhosting(VOID) function in an application developed in VC6.0 The problem is that Windows.h that comes with that old programming environment does not know this function yet. What do I have to include in order to get access to that function?
-
You need to upgrade to a later version of Visual Studio or Visual Studio Express.
Veni, vidi, abiit domum
-
The problem is that my app still has to support Windows NT 4.0 Additionally, I guess it is part of the latest platform SDK available for VC6, I just wonder how to configure my project settings correctly...
-
The problem is that my app still has to support Windows NT 4.0 Additionally, I guess it is part of the latest platform SDK available for VC6, I just wonder how to configure my project settings correctly...
DisableProcessWindowsGhosting()
is supported with XP SP1 and later. If your app must support older Windows versions, you must check the version. You can use late binding by getting the function address with GetProcAddress()[^]:typedef void (WINAPI* LPFN_DisableProcessWindowsGhosting)();
HINSTANCE hInst = ::GetModuleHandle(_T("User32"));
if (hInst)
{
LPFN_DisableProcessWindowsGhosting lpfnFunc =
(LPFN_DisableProcessWindowsGhosting)::GetProcAddress(hInst, "");
if (lpfnFunc)
lpfnFunc();
else
TRACE("DisableProcessWindowsGhosting() is not supported\n");
}This will also solve your problem regarding the old SDK header files.