question to tfai
Posted on 1998-02-27
To get ordinal nos of functions in a dll
dumpbin \exports my.dll workes fine under NT, but not
win95 ? any thing that you know of for this ?
and the other problem is that, kernel32.dll functions
under win95 does not support ordinal calls, (ole32.dll
for example works for win95, and win NT all works.
the following gives correct result under NT,
but fails under win95.
typedef BOOL (CALLBACK* LPFUNC) (OSVERSIONINFO*);
LPFUNC lpfunc1, lpfunc2;
hDLL = LoadLibrary("Kernel32");
if(hDLL != NULL)
lpfunc1 = (LPFUNC) GetProcAddress(hDLL, "GetVersionExA");
for(int i = 0; i < 1000; i++)
GETVERSIONEX = i;
lpfunc2 = (LPFUNC) GetProcAddress(hDLL, (char*) GETVERSIONEX);
if(lpfunc1 == lpfunc2)
mess.Format("ordinal is : %d",i);
error_no = GetLastError();
mess.Format("error # %d",error_no);
in here I wanted to find the ordinal no for a specific
function, programatically. Is there a better way ? thanks