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 5 6588
"Rymfax" <cw*****@bigban gllc.comwrote in message
news:11******** *************@q 66g2000hsg.goog legroups.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
Rymfax <cw*****@bigban gllc.comwrote in news:1179857234 .224564.70540
@q66g2000hsg.go oglegroups.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.
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*****@bigban gllc.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
On May 23, 4:58 am, Andre Kostur <nntps...@kostu r.netwrote:
Rymfax <cwal...@bigban gllc.comwrote in news:1179857234 .224564.70540
@q66g2000hsg.go oglegroups.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" <ju****@zeusedi t.comwrote in message
news:11******** **************@ i13g2000prf.goo glegroups.com.. .
On May 23, 4:58 am, Andre Kostur <nntps...@kostu r.netwrote:
>Rymfax <cwal...@bigban gllc.comwrote in news:1179857234 .224564.70540 @q66g2000hsg.g ooglegroups.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.) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
that
also hosts a .net object (e.g. by click a hyperlink).
|
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 vain.
Any help will be greatly appreciated.
Thanks.
|
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
is their Codecs.Load which issues the error.
I have the code working when the image is loaded from my local machine
but when loading from a network share I receive a File Not Found error
from the framework that is attempting to load then file...
|
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 extension, like this:
http://www.mywebpage.com/folder/notfound/
Any comments are preciated?
|
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 works fine
if the child window contains HTML, just not a PDF. Ideas? Note: These
are not my PDFs, I just found some on the Net so you could test.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
| |
by: Tarantulus |
last post by:
if("dept"=='dept'){
document.getElementById('add').style.display='none';
};
<DIV id="add">
<some html here..>
</DIV>
|
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 to the php file CheckLogin.php.
This is a small part of the HTML page with the button:
When I enter the username and password and click on the Submit button, I get the error:
Plase help me on this.
|
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 dynamically insert a few nodes into a webpage using insertBefore. Here's the HTML in question. (Yes, I know the HTML is terrible, but I didn't write it and can't edit it, which is why I have to insert things through the DOM instead. Long story.)
<div...
|
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:
http://msdn2.microsoft.com/en-us/library/ms153652.aspx
From this example,
ReportingService2005 rs = new ReportingService2005();
|
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 know why? can any one suggest some solution.
When i click on the button on that page i got this error with something like this
"Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |