Link to home
Start Free TrialLog in
Avatar of mycuti08
mycuti08

asked on

How do I display String SID?

I used ConvertSidToStringSid to convert a Sid to a string SID. The problem is when I displayed the string SID using wprintf, I saw only a bunch of question marks "?????" displayed?
How do I display it appropriately?

The code snippet is:
TCHAR sidstring[254];
ConvertSidToStringSid(sid, (LPWSTR*)sidstring);
wprintf(L"%s", sidstring);

Thanks,
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mycuti08
mycuti08

ASKER

>>What is the return value of the call?
>>Also make sure function returned nonzero value, maybe sid value is invalid.
the return value of the call is > 0, so no error.

>>Try using the _tprintf instead:
I tried that and the result was the same

Any other thought, please?
Thanks
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial