This is not an answer. just a discussion
Why did you declare
myData as BSTR. cant you just define as string? cause in the calling function you are using string to store base64 data
besides Base64 encoded data only contain ASCII data not multibyte data is present there. To understand base64 please check
base64 RFC.
even though
wstring will not change the data that would be passed to
NotifyData. but (I am not sure) wouldnt it make type casting error?
by the way what is
wstring?
in visual C i have used
wchar_t. this is 16bit in
wchar_t data is stored as two byte. say if you store 'a' to wchar_t it would be equivalent to "0a"(char[2]).