Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to use DisableProcessWindowsGhosting in a VC6 application?

How to use DisableProcessWindowsGhosting in a VC6 application?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestionworkspace
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Erik
    wrote on last edited by
    #1

    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?

    L 1 Reply Last reply
    0
    • E Erik

      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?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You need to upgrade to a later version of Visual Studio or Visual Studio Express.

      Veni, vidi, abiit domum

      E 1 Reply Last reply
      0
      • L Lost User

        You need to upgrade to a later version of Visual Studio or Visual Studio Express.

        Veni, vidi, abiit domum

        E Offline
        E Offline
        Erik
        wrote on last edited by
        #3

        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...

        L J 2 Replies Last reply
        0
        • E Erik

          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...

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You could try getting a later version of the Windows SDK, but you would still need a down version of the app for NT 4.0.

          Veni, vidi, abiit domum

          1 Reply Last reply
          0
          • E Erik

            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...

            J Offline
            J Offline
            Jochen Arndt
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups