Is there a way to Get around "Entry Point Not Found" error??

Discussion in 'C++' started by Rymfax, May 22, 2007.

  1. Rymfax

    Rymfax Guest

    I have an application that will be used on both XP and Vista. One of
    the things this application needs to do is determine the exact
    operating system it is on. To get the correct "flavor" of Vista that
    might be running, there is a new function in Kernel32.dll called
    GetProductInfo(). The problem I'm running into is that if I include
    this function in my application, the app errors on XP at start up with
    the following message:

    The procedure entry point GetProductInfo could not be located in the
    dynamic link library KERNERL32.dll

    Now I understand that this is happening because the kernel32.dll on XP
    does not have that function, but I put an if statement in my code so
    that if the MajorVersion of the OS is < 6 (VISTA) then it doesn't call
    this function anyway. However that doesn't seem to be sufficient to
    keep it from trying to find the entry point anyway. Is there a way
    for me go get around this?

    TIA,

    Rym
     
    Rymfax, May 22, 2007
    #1
    1. Advertising

  2. Rymfax

    Andre Kostur Guest

    Rymfax <> wrote in news:1179857234.224564.70540
    @q66g2000hsg.googlegroups.com:

    > I have an application that will be used on both XP and Vista. One of
    > the things this application needs to do is determine the exact
    > operating system it is on. To get the correct "flavor" of Vista that
    > might be running, there is a new function in Kernel32.dll called
    > GetProductInfo(). The problem I'm running into is that if I include
    > this function in my application, the app errors on XP at start up with
    > the following message:
    >
    > The procedure entry point GetProductInfo could not be located in the
    > dynamic link library KERNERL32.dll
    >
    > Now I understand that this is happening because the kernel32.dll on XP
    > does not have that function, but I put an if statement in my code so
    > that if the MajorVersion of the OS is < 6 (VISTA) then it doesn't call
    > this function anyway. However that doesn't seem to be sufficient to
    > keep it from trying to find the entry point anyway. Is there a way
    > for me go get around this?


    You're offtopic. This is a Microsoft specific question, so you should be
    asking in a Microsoft-specifc newsgroup.
     
    Andre Kostur, May 22, 2007
    #2
    1. Advertising

  3. Rymfax

    JussiJ Guest

    On May 23, 4:58 am, Andre Kostur <> wrote:
    > Rymfax <> wrote in news:1179857234.224564.70540
    > @q66g2000hsg.googlegroups.com:
    >
    > You're offtopic. This is a Microsoft specific question, so
    > you should be asking in a Microsoft-specifc newsgroup.


    Looks very much on topic to me.

    The error is caused by the missing entry point added to the
    executable at link time.

    So as Robert suggests, the answer is take the entry out of the
    executable and use the LoadLibrary and GetProcAddress Win32 API's
    to late bind the troublesome Win32 API.

    Jussi Jumppanen
    Author: Zeus for Windows IDE
    http://www.zeusedit.com
     
    JussiJ, May 31, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TIMA
    Replies:
    9
    Views:
    352
    Steve C. Orr [MVP, MCSD]
    Jan 9, 2004
  2. Piet
    Replies:
    0
    Views:
    586
  3. kpd
    Replies:
    1
    Views:
    452
  4. Network/Software Buyer
    Replies:
    0
    Views:
    440
    Network/Software Buyer
    May 23, 2010
  5. J. M. Harper

    Way around 'permission denied' error? ActiveX?

    J. M. Harper, Jun 25, 2004, in forum: Javascript
    Replies:
    1
    Views:
    161
    Randy Webb
    Jun 25, 2004
Loading...

Share This Page