473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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

May 22 '07 #1
5 6572
"Rymfax" <cw*****@bigbangllc.comwrote in message
news:11*********************@q66g2000hsg.googlegro ups.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 need to use LoadLibrary/GetProcAddress to get a pointer to the
function - don't call the prototype that's provided by the Windows SDK.
This will remove the hard depedency on GetProductInfo from your image and
you can determine at runtime if the function is supported.

-cd
May 22 '07 #2
Rymfax <cw*****@bigbangllc.comwrote 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.

May 22 '07 #3
I removed comp.comp.lang.c++ from the list of newsgroups (to comply
with earlier post). More below (in line).
On 22 May 2007 11:07:14 -0700, Rymfax <cw*****@bigbangllc.comwrote:
>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
Yep. The loader tries to resolve all links before a program even
starts. So the "if" statement you added is irrelevant. Try using
LoadLibrary and GetProcAddress. Using them is a bit of a pain, but
they work for me, and I think are the only way to provide dynamic
support.

>
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
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 400
Boston, MA 02116
www.penfact.com
May 23 '07 #4
On May 23, 4:58 am, Andre Kostur <nntps...@kostur.netwrote:
Rymfax <cwal...@bigbangllc.comwrote 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

May 31 '07 #5
"JussiJ" <ju****@zeusedit.comwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
On May 23, 4:58 am, Andre Kostur <nntps...@kostur.netwrote:
>Rymfax <cwal...@bigbangllc.comwrote 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.

Andre was probably posting from comp.lang.c++, where they (in my limited
experience) don't like to discuss Microsoft-specific stuff. One could argue
it was a group the OP shouldn't have added. (I've taken it off the list of
groups to spare their tender feelings.)
May 31 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ari Royce Hidayat | last post by:
Dear ALL, Is there some one ever faces this problem? And fix it? The scenario is: There's an html page that hosts a .net object (using object tag), and this page opens the second html page...
2
by: Paul T. RONG | last post by:
Hi, It is very strange. The mde works very well in Access XP but will get "Module not found" error when closing a form in Access 2k. I tried from yesterday evening to solve this prolem but in...
4
by: mattsthompson | last post by:
Im writing a DLL that extends IHttpHandler to intercept requests for a certain file extension and deliver watermarked images. I'm using LeadTools' .NET framework for the image manipulation and it...
1
by: Casper Stendal | last post by:
Is it some how possible to handle a "directory not found" error through ASP.NET (or ASP), without having to make speciel a setup for the application in IIS, when it comes from an URL without...
2
by: johkar | last post by:
Why does if(win==null || win.closed) return true after one PDF is open. Something very wierd going on with IE 6. I also get a member not found error if a child window is already open. This script...
6
Tarantulus
by: Tarantulus | last post by:
if("dept"=='dept'){ document.getElementById('add').style.display='none'; }; <DIV id="add"> <some html here..> </DIV>
8
by: webgenius | last post by:
Whenever I click the SUBMIT button in my HTML page, I get the "Object not found!" error. It was working fine yesterday. This error started to occur after I installed Codelobster and made some changes...
3
by: masterofzen | last post by:
I've been playing around with this for a while. I bet the answer is pretty obvious, but I'm just not seeing it. I'm also reasonably certain I've run into this problem before. I'm trying to...
0
by: Brian Lampe | last post by:
On Apr 11, 7:25 am, subhash <chend...@hotmail.comwrote: If your service is using a port other than 80, you can specify it in the service instantiation's Url property: ...
3
maliksleo
by: maliksleo | last post by:
hi all i m having this "The resource cannot be found." error. I applied the url rewriting on my project every page is being browsed very well but i am getting the above error an some pages i dont...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.