UCHAR to WCHAR conversion

  • Thread starter Thread starter skri
  • Start date Start date
S

skri

Guest
Hi All,

I am seeing the following code in the scanner minifilter sample code converting array of UCHAR to PWCHAR and finding the number of strings as shown below. Is this correct code. Here valueBuffer->Data is UCHAR array.


ch = (PWCHAR)(valueBuffer->Data);

count = 0;

//
// Count how many strings are in the multi string
//

while (*ch != '\0') {

ch = ch + wcslen( ch ) + 1;
count++;
}


Thanks

Continue reading...
 
Back
Top