rrbabu78
March 3rd, 2006, 05:17 AM
I am using windows 2000 platform, and i try to build the following line inside my cpp file,
#ifdef UNICODE
cout<<"inisde unicode block";
NETUSERGETINFO netUserGetInfo = (NETUSERGETINFO) GetProcAddress(netapi, "NetUserGetInfoW");
DSGETDCNAME dsGetDcName = (DSGETDCNAME) GetProcAddress(netapi, "DsGetDcNameW");
#else
cout<<"inside else block";
NETUSERGETINFO netUserGetInfo = (NETUSERGETINFO) GetProcAddress(netapi, "NetUserGetInfo");
DSGETDCNAME dsGetDcName = (DSGETDCNAME) GetProcAddress(netapi, "DsGetDcNameA");
#endif
i tested this code against japnese version of windows, it works fine and get the output as "inside unicode block";
but with english version of windows machine(after set the locale as japnese) doesn't got to UNICODE block it always goes to else block.
so i can't get the user information as dbcs in english version of windows machine.
Please tell me your thoughts on this issue
Ramesh
#ifdef UNICODE
cout<<"inisde unicode block";
NETUSERGETINFO netUserGetInfo = (NETUSERGETINFO) GetProcAddress(netapi, "NetUserGetInfoW");
DSGETDCNAME dsGetDcName = (DSGETDCNAME) GetProcAddress(netapi, "DsGetDcNameW");
#else
cout<<"inside else block";
NETUSERGETINFO netUserGetInfo = (NETUSERGETINFO) GetProcAddress(netapi, "NetUserGetInfo");
DSGETDCNAME dsGetDcName = (DSGETDCNAME) GetProcAddress(netapi, "DsGetDcNameA");
#endif
i tested this code against japnese version of windows, it works fine and get the output as "inside unicode block";
but with english version of windows machine(after set the locale as japnese) doesn't got to UNICODE block it always goes to else block.
so i can't get the user information as dbcs in english version of windows machine.
Please tell me your thoughts on this issue
Ramesh