CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005
    Posts
    3

    DBCS problem with English version of Windows

    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

  2. #2
    Join Date
    Jul 2005
    Location
    Germany
    Posts
    1,194

    Re: DBCS problem with English version of Windows

    Conclusion: UNICODE is not defined.
    Code:
    #define UNICODE
    Please don't forget to rate users who helped you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured