I have this COM program,
in one of the method
STDMETHODIMP CCMSHdl::RecvMessage(BSTR msg)
fptr=fopen( "Status.txt", "a+" );
if ( NULL != fptr )
fprintf( fptr, "%s" , msg );
Then use another VB program to send in a string say "Hello".
But the textfile only written "H", or whatever first character of the string i sent.
Can anyone tell me what's wrong with it?
could it be this line -- fprintf(fptr, "%s", msg );
where i should put something else instead of "%s" for BSTR?
This post has been edited by V3i HoN6: Feb 21 2006, 04:57 PM
COM, write BSTR to text file