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. Procedure entry point error when using CreateProcessWithTokenW

Procedure entry point error when using CreateProcessWithTokenW

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studiocomhelpquestion
3 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.
  • L Offline
    L Offline
    Lucidation
    wrote on last edited by
    #1

    First off, I'm real new to C++ so hopefully I state things right and I'm in the correct forum. I'm tinkering with some code to use the CreateProcessWithTokenW function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682434(v=vs.85).aspx). Now, everything works just fine when I run it on Windows 7. But if I run it on XP, it bombs out with an error message about the procedure entry point not being located in the dynamic link library ADVAPI32.dll. So what do I need to do to either make this work on XP, or else drop back to using CreateProcessAsUser on Windows XP, but still use CreateProcessWithTokenW on Windows 7?

    C L 2 Replies Last reply
    0
    • L Lucidation

      First off, I'm real new to C++ so hopefully I state things right and I'm in the correct forum. I'm tinkering with some code to use the CreateProcessWithTokenW function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682434(v=vs.85).aspx). Now, everything works just fine when I run it on Windows 7. But if I run it on XP, it bombs out with an error message about the procedure entry point not being located in the dynamic link library ADVAPI32.dll. So what do I need to do to either make this work on XP, or else drop back to using CreateProcessAsUser on Windows XP, but still use CreateProcessWithTokenW on Windows 7?

      C Offline
      C Offline
      Chris Meech
      wrote on last edited by
      #2

      According to this page[^], it is not supported on XP. The minimum supported client is Windows Vista. :)

      Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

      1 Reply Last reply
      0
      • L Lucidation

        First off, I'm real new to C++ so hopefully I state things right and I'm in the correct forum. I'm tinkering with some code to use the CreateProcessWithTokenW function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682434(v=vs.85).aspx). Now, everything works just fine when I run it on Windows 7. But if I run it on XP, it bombs out with an error message about the procedure entry point not being located in the dynamic link library ADVAPI32.dll. So what do I need to do to either make this work on XP, or else drop back to using CreateProcessAsUser on Windows XP, but still use CreateProcessWithTokenW on Windows 7?

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

        Hi, I am very happy to hear that you went straight to MSDN to get your answers. That is definitely a working recipe for becoming a better software engineer. When you are reading these MSDN function descriptions... always scroll to the bottom... the MSDN almost always gives which library the function is being exported from (in this case Advapi32.dll) and the minimum operating system/service pack required. You have obviously already discovered that the minimum OS is Vista for this function. If you already have an access token then you should use the CreateProcessAsUser function[^]

        Lucidation wrote:

        So what do I need to do to either make this work on XP, or else drop back to using CreateProcessAsUser on Windows XP, but still use CreateProcessWithTokenW on Windows 7?

        I would personally recommend using CreateProcessAsUser for both scenarios. Why create two code paths? CreateProcessAsUser should work for XP all the way to Win7Sp1. Best Wishes, -David Delaune

        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