By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,261 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,261 IT Pros & Developers. It's quick & easy.

problem with dll

P: n/a
When I use “IP Helper API’s functions” In my program, all is ok. until I
run it on Windows 98.

On Windows Xp everything is ok.

On 98 I get an error:

MsgBox:

File MyApp.exe is
linked with missing export IPHLPAPI.DLL:GetPerAdapterInfo


I checked it with IPHLPAPI.DLL 5.0.1717.2 and 5.1.2600.2.

The first one is from 98 and I get with it this error.

The second one is from xp (works fine), but she won’t work when I copy
it do 98.

How to fix his problem?
Jul 22 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"Eddie" <on*******@tenbit.pl> wrote in message
news:ce**********@nemesis.news.tpi.pl...
When I use “IP Helper API’s functions” In my program, all is ok. until I
run it on Windows 98.

On Windows Xp everything is ok.

On 98 I get an error:


Off topic. Please read the welcome message for this newsgroup -
http://www.slack.net/~shiva/welcome.txt.
Jul 22 '05 #2

P: n/a
Eddie posted:
When I use “IP Helper API’s functions” In my program, all is ok. until I
run it on Windows 98.

On Windows Xp everything is ok.

On 98 I get an error:

MsgBox:

File MyApp.exe is
linked with missing export IPHLPAPI.DLL:GetPerAdapterInfo


I checked it with IPHLPAPI.DLL 5.0.1717.2 and 5.1.2600.2.

The first one is from 98 and I get with it this error.

The second one is from xp (works fine), but she won’t work when I copy
it do 98.

How to fix his problem?

OFF-TOPIC

On the Win98 system, it can't find the function entitled
"GetPerAdapterInfo" inside the file "IPHLPAPI.DLL".

If I'd to guess, then I'd say that this particular function was only added
to the library recently.

You can go to "www.dependencywalker.com", and download a nice tool to see
what DLLs and functions are involved.

Anyway, to the solution...

Do you need the program to be able to run on Win98? If not, it doesn't
matter.

If you *do* want the program to run on Win98, how would you best describe
your situation:

A) The use of this function is vital in the program

B) The use of this function is a nice feature, but if needs be I won't use
it.

If your answer is A, then your only option is to package the newer version
of this DLL with your executable, or provide a readme.txt that contains a
link to DLL online or something like that.

Now, if you answer is B, here's the beauty:

HMODULE hDLL = LoadLibrary("IPHLPAPI.DLL");

if (!hDLL) { throw "Poo!"; }

return_value (*GetPerAdapterInfo)(arguments);

GetPerAdapterInfo = GetProcAddress(hDLL,"GetPerAdapterInfo");

if (!GetPerAdapterInfo)
{
FreeLibrary(hDLL);
throw "Poo!";
}

//Now you can use the function as normal

Don't forget to free the library at the end

FreeLibrary(hDLL);

I'm sure there must be some sort of template class out there that'll do this
for you, one that will free the library upon an exception and so on. If
there ain't, I might waste an hour or so of my time on one!
-JKop
Jul 22 '05 #3

P: n/a
thanks for advive, it's informative.
my program base on this function, it can't be run with out it.

Is there a replacement code to do the same as the missing one?
JKop wrote:
Eddie posted:

When I use “IP Helper API’s functions” In my program, all is ok. until I
run it on Windows 98.

On Windows Xp everything is ok.

On 98 I get an error:

MsgBox:

File MyApp.exe is
linked with missing export IPHLPAPI.DLL:GetPerAdapterInfo


I checked it with IPHLPAPI.DLL 5.0.1717.2 and 5.1.2600.2.

The first one is from 98 and I get with it this error.

The second one is from xp (works fine), but she won’t work when I copy
it do 98.

How to fix his problem?


OFF-TOPIC

On the Win98 system, it can't find the function entitled
"GetPerAdapterInfo" inside the file "IPHLPAPI.DLL".

If I'd to guess, then I'd say that this particular function was only added
to the library recently.

You can go to "www.dependencywalker.com", and download a nice tool to see
what DLLs and functions are involved.

Anyway, to the solution...

Do you need the program to be able to run on Win98? If not, it doesn't
matter.

If you *do* want the program to run on Win98, how would you best describe
your situation:

A) The use of this function is vital in the program

B) The use of this function is a nice feature, but if needs be I won't use
it.

If your answer is A, then your only option is to package the newer version
of this DLL with your executable, or provide a readme.txt that contains a
link to DLL online or something like that.

Now, if you answer is B, here's the beauty:

HMODULE hDLL = LoadLibrary("IPHLPAPI.DLL");

if (!hDLL) { throw "Poo!"; }

return_value (*GetPerAdapterInfo)(arguments);

GetPerAdapterInfo = GetProcAddress(hDLL,"GetPerAdapterInfo");

if (!GetPerAdapterInfo)
{
FreeLibrary(hDLL);
throw "Poo!";
}

//Now you can use the function as normal

Don't forget to free the library at the end

FreeLibrary(hDLL);

I'm sure there must be some sort of template class out there that'll do this
for you, one that will free the library upon an exception and so on. If
there ain't, I might waste an hour or so of my time on one!
-JKop

Jul 22 '05 #4

P: n/a
Eddie posted:
thanks for advive, it's informative.
my program base on this function, it can't be run with out it.

Is there a replacement code to do the same as the missing one?


No. You need the new version of that DLL. No buts about it.
-JKop
Jul 22 '05 #5

P: n/a

"Eddie" <on*******@tenbit.pl> wrote in message
news:ce**********@atlantis.news.tpi.pl...
thanks for advive, it's informative.
my program base on this function, it can't be run with out it.

Is there a replacement code to do the same as the missing one?


You *really* need to ask in a Windows newsgroup, not here.

It is highly likely that that function is only supported by the newer
operating system. In that case, if your program needs that function, then
your program simply does not support win98. That's really not that bad,
though,since 1998 was six years go. That's a long time in computer terms -
especially considering how often a new Windows system comes out! :-)

But you can ask in a Windows newsgroup (on the server news.microsoft.com) if
there is some suitable replacement that *does* work in win98.

-Howard

Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.