kc2592
asked on
COM question
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++.
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++.
ASKER
Please HELP!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER