Posted on 2004-04-21
I am writing a COM component. I declared my method as following:
HRESULT __stdcall PACK([in]TCHAR *src, [in]int srclen, [out, retval]TCHAR *retval);
After compiling and registered the COM, I checked the component using OLE/COM object viewer, and I saw the following:
HRESULT PACK([in] short* src, [in] int srclen, [out, retval] short* retval);
Why is my TCHAR being converted to "short", but not char or wchar?? I think this messed up my string manipulation in the code. I want the src and retval to be "char" just like in regular C++.