Opened 17 years ago

Closed 17 years ago

#358 closed enhancement (fixed)

Link dynamically with IPHLPAPI.LIB (thanks Jim Gomez)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-0.8.0
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

Quoting Jim's email:

The major difference is the dynamic explicit run-time linking
to the IpHlpApi.DLL, instead of the implicit linking that would normally
be used with import libraries. The new version of the file will only
load the DLL if it is actually used. Currently, the DLL is loaded and
mapped into the program executable space at startup of the application,
even though the DLL is never used by my application. Since there are
only two functions that are needed from this DLL, it makes sense to only
load it if they are needed.

I made this change because my application was crashing during shutdown.
The crash was occurring deep within the shutdown code of the
IpHlpApi.DLL. Since there wasn’t a clear way of debugging this, and my
code didn’t actually need any of the functions from that DLL, I made the
changes to the source file to explicitly link to it.

Change History (2)

comment:1 Changed 17 years ago by bennylp

  • Description modified (diff)

comment:2 Changed 17 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Done in r1409

Note: See TracTickets for help on using tickets.