Prefixes sz and pwsz in WinAPI

Now I'm a little confused with the Hungarian designation prefixes in WinAPI for CHAR strings and WCHAR strings. When we use the CHAR string, the following prefix is ​​usually used:

CHAR szString[] = "Hello";

We have a szString with zero completion, so everything is fine. But when we use the WCHAR string, the following prefix is ​​usually used:

WCHAR pwszString[] = L"Hello";

It denotes a pointer to a wide line with zero completion ... but our type does not look like this. A pointer to a null-terminated string is WCHAR ** or PWSTR *. Am I mistaken? Why is it sz for CHAR and pwsz lines, but not wsz for WCHAR lines?

+5
source share
2 answers

The second example is misleading (although not uncommon). It must be either one of the following:

WCHAR wszString[] = L"Hello";
WCHAR *pwszString = L"Hello";

, , .

, .

+6

CHAR szString [] CHAR * szString. . - CHAR *, WCHAR * ( WCHAR **).

, , () , CHAR [] - , "rgc" .

-2

All Articles