C
chaozhou
I want to develop a NSP(NameSpaceProvider), and in my NSP I use
NS_NDS(system's DNS NSP) to communicate .My code like that:
HINSTANCE hInstance = LoadLibrary(lpsName);//lpsName is
"%SystemRoot%\System32\mswsock.dll" under XP,under Windows2000 is
""%SystemRoot%\System32\rnr20.dll"
NspStartup = (NSPSTARTUP)GetProcAddress(hInstance ,"NSPStartup");
lpnspRoutines = (LPNSP_ROUTINE)malloc(sizeof(NSP_ROUTINE));
memset(lpnspRoutines,0,sizeof(NSP_ROUTINE));
ret = NspStartup(&nsinfo->NSProviderId,lpnspRoutines);//nsinfo->NSProviderId
is the GUID of DNS NSP which is read form register.
The code is run correct under Win2000,but under XP when run to
NspStartup(...) this is error, error code is 10104(the meaning is "The
procedure call table is invalid.").Checked under softice ,I find
hInstance/NspStartup/lpnspRoutines's point are all correct(not NULL)!
why is that , anybody can tall me ? thanks !
NS_NDS(system's DNS NSP) to communicate .My code like that:
HINSTANCE hInstance = LoadLibrary(lpsName);//lpsName is
"%SystemRoot%\System32\mswsock.dll" under XP,under Windows2000 is
""%SystemRoot%\System32\rnr20.dll"
NspStartup = (NSPSTARTUP)GetProcAddress(hInstance ,"NSPStartup");
lpnspRoutines = (LPNSP_ROUTINE)malloc(sizeof(NSP_ROUTINE));
memset(lpnspRoutines,0,sizeof(NSP_ROUTINE));
ret = NspStartup(&nsinfo->NSProviderId,lpnspRoutines);//nsinfo->NSProviderId
is the GUID of DNS NSP which is read form register.
The code is run correct under Win2000,but under XP when run to
NspStartup(...) this is error, error code is 10104(the meaning is "The
procedure call table is invalid.").Checked under softice ,I find
hInstance/NspStartup/lpnspRoutines's point are all correct(not NULL)!
why is that , anybody can tall me ? thanks !