(a) 
HRESULT _stdcall characters(
       [in] unsigned short* pwchChars, 
       [in] int cchChars);

(b) 
HRESULT characters(
       [in] const wchar_t * pwchChars, 
       [in] int cchChars);

(c) 
function  characters(
       var pwchChars: Word; // * WRONG * //
       cchChars: SYSINT): HResult; stdcall;

(d)
function  characters(
       const pwchChars: pWideChar;
       cchChars: SYSINT): HResult; stdcall;

Example 1: The problem with the code generated by the Import Type Library wizard: (a) the type library definition; (b) the C++ definition in the SDK; (c) the wizard-generated Pascal definition; (d) a better Pascal definition.

Back to Article