Note: The PCSZ data type is defined in the C++ header files included with this product. The use of the "const" keyword is not necessarily specific to C++. Certain C compilers support it as well.
If a function takes as a parameter a string that is not changed by the function, the string parameter can be declared as a "const" string or a PCSZ. PCSZ is defined in the C++ header files as a "const" pointer to a NULL-delimited string. The "const" indicates that the function will not change the contents of the string.
Declaring the parameter as PCSZ informs the C++ compiler that the function will not change the string. Therefore, the compiler simply passes a pointer to the string in the function parameter list. If the parameter is declared as a normal PSZ (not "const"), the compiler assumes that the function might change the string. Under these circumstances the compiler will add code to make a copy of the string and then pass a pointer to the copy, rather than pass a pointer to the original string.
A smaller, faster executable is often produced if the data item passed in a parameter list is declared as "const".
If the data item is declared as "const" then it must not be changed by the function.