Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

explicit linking 1

Status
Not open for further replies.

ADoozer

Programmer
Dec 15, 2002
3,487
AU
having a git of a time trying to load a particular call from version.dll

im hoping its just a typo, but im going blind looking for the problem.

Code:
HINSTANCE hiVERSION = LoadLibrary("VERSION.DLL");
		if( hiVERSION==NULL) return 0;
        
		typedef DWORD (WINAPI *LPGETFILEVERSIONINFOSIZE)( LPTSTR ,  LPDWORD);
		typedef BOOL (WINAPI *LPGETFILEVERSIONINFO)(LPTSTR,DWORD,DWORD,LPVOID);
		typedef BOOL (WINAPI *LPVERQUERYVALUE)(const LPVOID,LPTSTR,LPVOID,PUINT );

		LPGETFILEVERSIONINFOSIZE lpfGetFileVersionInfoSize=(LPGETFILEVERSIONINFOSIZE)GetProcAddress(hiVERSION,"GetFileVersionInfoSizeA");
		LPGETFILEVERSIONINFO lpfGetFileVersionInfo = (LPGETFILEVERSIONINFO)GetProcAddress(hiVERSION,"GetFileVersionInfoA");
		LPVERQUERYVALUE lpfVerQueryValue = (LPVERQUERYVALUE)GetProcAddress(hiVERSION,"VerQueryValA");[/quote]

GetFileVersionInfoSizeA
and
GetFileVersionInfoA
both return valid addresses, but
VerQueryValA returns 0x0.

any help appreciated.

If somethings hard to do, its not worth doing - Homer Simpson
 
doh..

i knew it would be something and nothing.

have a star courtasy of my sanity

If somethings hard to do, its not worth doing - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top