Click here to Skip to main content
15,891,513 members
Home / Discussions / COM
   

COM

 
AnswerRe: ActiveX component can't create object Pin
Member 427497711-Mar-09 15:59
Member 427497711-Mar-09 15:59 
Questionwhat is "double %" Pin
Larry Pan9-Mar-09 9:03
Larry Pan9-Mar-09 9:03 
AnswerRe: what is "double %" Pin
«_Superman_»9-Mar-09 18:40
professional«_Superman_»9-Mar-09 18:40 
GeneralRe: what is "double %" Pin
Larry Pan10-Mar-09 4:31
Larry Pan10-Mar-09 4:31 
Questionsend a COM object with a BSTR value type in a MSMQ message Pin
jxtamarc9-Mar-09 7:32
jxtamarc9-Mar-09 7:32 
AnswerRe: send a COM object with a BSTR value type in a MSMQ message Pin
Jonathan Davies9-Mar-09 7:59
Jonathan Davies9-Mar-09 7:59 
GeneralRe: send a COM object with a BSTR value type in a MSMQ message [modified] Pin
jxtamarc10-Mar-09 4:43
jxtamarc10-Mar-09 4:43 
GeneralRe: send a COM object with a BSTR value type in a MSMQ message Pin
Jonathan Davies10-Mar-09 23:53
Jonathan Davies10-Mar-09 23:53 
Great. Just for your information, if you inherit from IPersistStreamInitImpl and use the ATL property map, which contains, say a BSTR then call:
hr = pIPersistStreamInit->Save (pIStream, FALSE);

This ends up calling:
CComBSTR bstrWrite;
bstrWrite.Attach(*(BSTR*)pData);
hr = bstrWrite.WriteToStream(pStm);

which calls:
ULONG cb;
ULONG cbStrLen = CComBSTR::GetStreamSize(m_str) - sizeof(ULONG);
HRESULT hr = pStream->Write((void*) &cbStrLen, sizeof(cbStrLen), &cb);
if (FAILED(hr))
    return hr;
return cbStrLen ? pStream->Write((void*) m_str, cbStrLen, &cb) : S_OK;

so ATL already provides the code which does what your solution suggests.
GeneralRe: send a COM object with a BSTR value type in a MSMQ message Pin
jxtamarc11-Mar-09 0:59
jxtamarc11-Mar-09 0:59 
QuestionUsing IAuthenticate with an MSHTML control Pin
Taka Muraoka9-Mar-09 0:42
Taka Muraoka9-Mar-09 0:42 
Questionproblem during accesing serial port Pin
rexhrishi8-Mar-09 23:20
rexhrishi8-Mar-09 23:20 
AnswerRe: problem during accesing serial port Pin
Jonathan Davies10-Mar-09 1:18
Jonathan Davies10-Mar-09 1:18 
Questionadding actions in "additional actions" in MS outlook Pin
nikhil318-Mar-09 18:12
nikhil318-Mar-09 18:12 
QuestionProblem in using VARIANT Pin
b2cc7-Mar-09 4:14
b2cc7-Mar-09 4:14 
AnswerRe: Problem in using VARIANT Pin
Jonathan Davies8-Mar-09 3:41
Jonathan Davies8-Mar-09 3:41 
Questionwrite a program which is register activex automatically in vista Pin
mazizi6-Mar-09 20:41
mazizi6-Mar-09 20:41 
AnswerRe: write a program which is register activex automatically in vista Pin
Jonathan Davies8-Mar-09 6:02
Jonathan Davies8-Mar-09 6:02 
GeneralRe: write a program which is register activex automatically in vista Pin
mazizi10-Mar-09 20:16
mazizi10-Mar-09 20:16 
GeneralRe: write a program which is register activex automatically in vista Pin
zon_cpp11-Mar-09 21:22
zon_cpp11-Mar-09 21:22 
GeneralRe: write a program which is register activex automatically in vista Pin
Jonathan Davies12-Mar-09 0:09
Jonathan Davies12-Mar-09 0:09 
GeneralRe: write a program which is register activex automatically in vista Pin
zon_cpp15-Mar-09 20:53
zon_cpp15-Mar-09 20:53 
QuestionRead and write to a file in a COM application Pin
Elsie5-Mar-09 23:57
Elsie5-Mar-09 23:57 
AnswerRe: Read and write to a file in a COM application Pin
«_Superman_»6-Mar-09 18:58
professional«_Superman_»6-Mar-09 18:58 
AnswerRe: Read and write to a file in a COM application Pin
Cruel Handsome6-Mar-09 22:27
Cruel Handsome6-Mar-09 22:27 
QuestionHow to handle an LPDISPATCH return value from an Activex RDP Client Control hosted in MFC dialog Pin
IsleOfTechno5-Mar-09 21:30
IsleOfTechno5-Mar-09 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.