FYI I am begginer in COM\ATL and unicode
I am using SafeArrayPutElement(safearray*,LONG,void*)
in my code and the problem is...
here, the function works fine when i give the third parameter as L"ItWorks"
i.e
SafeArrayPutElement(safearray*,LONG, L"ItWorks");
but if i use
wchar_t str;
str = 'a';
SafeArrayPutElement(safearray*,LONG,&str);
this function fails saying E_OUTOFMEMORY
here my need is, i have a string in char*
variable, some how i need to use this as the THIRD parameter for the above function.
Can anyone please help me in this regard.
TIA
Naveen