Click here to Skip to main content
15,507,147 members
Home / Discussions / COM
   

COM

 
GeneralRe: Convert document to PDF format Pin
Nitin K. Kawale12-Jul-11 1:34
professionalNitin K. Kawale12-Jul-11 1:34 
QuestionGetting an access to idispatch member of idispatch interface Pin
Altankhuu11-Sep-10 22:25
Altankhuu11-Sep-10 22:25 
AnswerRe: Getting an access to idispatch member of idispatch interface Pin
«_Superman_»12-Sep-10 20:21
professional«_Superman_»12-Sep-10 20:21 
GeneralRe: Getting an access to idispatch member of idispatch interface Pin
Altankhuu19-Sep-10 22:56
Altankhuu19-Sep-10 22:56 
AnswerRe: Getting an access to idispatch member of idispatch interface Pin
Lim Bio Liong26-Oct-10 2:38
Lim Bio Liong26-Oct-10 2:38 
QuestionreportAppFactory.OpenDocument throws Invalid Cast exception (No such interfaces supported) [modified] Pin
amitcoder836-Sep-10 18:54
amitcoder836-Sep-10 18:54 
AnswerCrosspost - ignore Pin
Richard MacCutchan6-Sep-10 22:37
mveRichard MacCutchan6-Sep-10 22:37 
QuestionHow to send NULL to a IUnknown** parameter when COM object is surrogate hosted Pin
Per Nilsson2-Sep-10 20:58
Per Nilsson2-Sep-10 20:58 
I'm developing a COM object in a dll. The object takes an IUnknown** parameter.

interface IPasser : IDispatch{ 
  [id(1), helpstring("method Pass")] 
  HRESULT Pass([in]IUnknown* ptr);};


When using it in-process I can send NULL as parameter, but when I instantiate the com object usign a surrogage usign CLSCTX_LOCAL_SERVER I get an error message 0x800706f4, "A null reference pointer was passed to the stub."


IPasserPtr   obj;
IUnknown*    ptr;hr = obj.CreateInstance (CLSID_Passer, 0, CLSCTX_LOCAL_SERVER);
hr = obj->raw_Pass (0);        // Returns 0x800706f4
hr = obj->raw_Pass (&ptr); // OK

This is only a problem when I use double indirection, not when I use an ordinary IUnknown*.

Can anyone tell me why this is not allowed and how to change the implementation to be able to send a NULL pointer.


/Per
AnswerRe: How to send NULL to a IUnknown** parameter when COM object is surrogate hosted Pin
tolw2-Sep-10 21:33
tolw2-Sep-10 21:33 
GeneralRe: How to send NULL to a IUnknown** parameter when COM object is surrogate hosted Pin
Per Nilsson2-Sep-10 21:42
Per Nilsson2-Sep-10 21:42 
AnswerRe: How to send NULL to a IUnknown** parameter when COM object is surrogate hosted [modified] Pin
tolw2-Sep-10 22:16
tolw2-Sep-10 22:16 
GeneralRe: How to send NULL to a IUnknown** parameter when COM object is surrogate hosted Pin
Per Nilsson3-Sep-10 0:07
Per Nilsson3-Sep-10 0:07 
QuestionWSACancelBlockingCall Pin
Bedke2-Sep-10 2:51
Bedke2-Sep-10 2:51 
QuestionHow to deal with such situation?(Need pass STL vector to dll under vs2008) [modified] Pin
fantasy121523-Aug-10 18:04
fantasy121523-Aug-10 18:04 
AnswerRe: How to deal with such situation?(Need pass STL vector to dll under vs2008) Pin
KingsGambit23-Aug-10 22:00
KingsGambit23-Aug-10 22:00 
QuestionQuestion about IOleObject::GetClipboardData Pin
edward barbu18-Aug-10 1:51
edward barbu18-Aug-10 1:51 
QuestionObject Initialization Problem Pin
pjdriverdude6-Aug-10 5:17
pjdriverdude6-Aug-10 5:17 
AnswerRe: Object Initialization Problem Pin
Sauro Viti6-Aug-10 5:42
professionalSauro Viti6-Aug-10 5:42 
GeneralRe: Object Initialization Problem Pin
pjdriverdude6-Aug-10 6:17
pjdriverdude6-Aug-10 6:17 
GeneralRe: Object Initialization Problem Pin
pjdriverdude6-Aug-10 6:28
pjdriverdude6-Aug-10 6:28 
GeneralRe: Object Initialization Problem Pin
Sauro Viti6-Aug-10 6:45
professionalSauro Viti6-Aug-10 6:45 
QuestionError in Excel Add in Pin
gahlawat5-Aug-10 21:01
gahlawat5-Aug-10 21:01 
QuestionHow to call C# function from unmanaged C++ code.? Pin
deadlyabbas20-Jul-10 20:59
deadlyabbas20-Jul-10 20:59 
AnswerRe: How to call C# function from unmanaged C++ code.? Pin
Sauro Viti21-Jul-10 21:50
professionalSauro Viti21-Jul-10 21:50 
QuestionWhy CreateWindowEx() function failed on 64 Bit window XP Pin
am 200920-Jul-10 7:02
am 200920-Jul-10 7:02 

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.