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

R

Rymfax

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
 
A

Andre Kostur

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

JussiJ

@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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top