Click here to Skip to main content
15,882,388 members
Home / Discussions / COM
   

COM

 
AnswerRe: Porting Win32/COM to Linux Pin
Jörgen Sigvardsson26-Nov-05 12:55
Jörgen Sigvardsson26-Nov-05 12:55 
QuestionGetUIObjectOf for objects on different drives Pin
yarp25-Nov-05 2:35
yarp25-Nov-05 2:35 
QuestionWord automation problem with C++ Pin
panzerdivisionmarkus24-Nov-05 1:47
panzerdivisionmarkus24-Nov-05 1:47 
AnswerRe: Word automation problem with C++ Pin
JonEngle6-Dec-05 18:55
JonEngle6-Dec-05 18:55 
QuestionHow to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez23-Nov-05 18:09
Diana Fernandez23-Nov-05 18:09 
AnswerRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Gizzo24-Nov-05 6:11
Gizzo24-Nov-05 6:11 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez24-Nov-05 20:11
Diana Fernandez24-Nov-05 20:11 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Gizzo24-Nov-05 21:25
Gizzo24-Nov-05 21:25 
Diana Fernandez wrote:
IClass1 pointer is available in COM through type library and object of the class is passed to COM as VARIANT. I have reached till this point and don't know how to proceed. Or is there any other way to implement it?


If I have undertood well you have a VARIANT that contains a IClass1 pointer...so you can

VARIANT vtPointer; // <--- let's say this is the VARIANT<br />
<br />
if(vtPointer == VT_DISPATCH) // <br />
{<br />
	IDispatch * pDisp = vtPointer.pdispVal; // I asume here that IClass1 is derived from IDispatch<br />
	IClass1 * pClass1 = NULL;<br />
	HRESULT hr = pDisp->QueryInterface(IID_IClass1, (void**)&pClass1);<br />
	if(FAILED(hr))<br />
	{<br />
		// ... manage error<br />
	}<br />
    <br />
	// ... and here you should be able to use pClass1 to call IClass1 methods<br />
	// and then...release the object when you finish<br />
	pClass1->Release();<br />
	// ....<br />
}


I hope it helps.

Best regards.

-- modified at 3:29 Friday 25th November, 2005

aaarrggh!!! I don't know how to insert tabs in the code!! sorry for the bad format
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez24-Nov-05 22:43
Diana Fernandez24-Nov-05 22:43 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Gizzo24-Nov-05 23:12
Gizzo24-Nov-05 23:12 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Jörgen Sigvardsson25-Nov-05 9:04
Jörgen Sigvardsson25-Nov-05 9:04 
GeneralRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez27-Nov-05 18:48
Diana Fernandez27-Nov-05 18:48 
QuestionOleRun freezes Pin
WernerP23-Nov-05 1:42
WernerP23-Nov-05 1:42 
QuestionShell Extensions in win2003 64-bit Pin
ragavan22-Nov-05 22:08
ragavan22-Nov-05 22:08 
Questionm_hWnd is missing while using the ActiveX Pin
Maddie from Dartford22-Nov-05 19:37
Maddie from Dartford22-Nov-05 19:37 
QuestionPass javascript function to ActiveX member in C# Pin
write_to_billy20-Nov-05 20:19
write_to_billy20-Nov-05 20:19 
QuestionActiveX DLL --Print Web Page Pin
Rajkamal_dfine17-Nov-05 18:31
Rajkamal_dfine17-Nov-05 18:31 
QuestionPassing events from activex control property page to control Pin
Ashwin kumar Gurujala16-Nov-05 19:36
Ashwin kumar Gurujala16-Nov-05 19:36 
QuestionOLE_COLOR property is not getting reflected Pin
Maddie from Dartford15-Nov-05 2:44
Maddie from Dartford15-Nov-05 2:44 
QuestionActiveX without a container Pin
Ahsan Askare14-Nov-05 23:30
Ahsan Askare14-Nov-05 23:30 
AnswerRe: ActiveX without a container Pin
Roger Stoltz22-Nov-05 11:33
Roger Stoltz22-Nov-05 11:33 
QuestionActiveX control and HTML Pin
FJK12-Nov-05 18:39
FJK12-Nov-05 18:39 
QuestionNew to COM. Help needed. Pin
Owner drawn10-Nov-05 23:49
Owner drawn10-Nov-05 23:49 
AnswerRe: New to COM. Help needed. Pin
Gizzo11-Nov-05 6:33
Gizzo11-Nov-05 6:33 
AnswerRe: New to COM. Help needed. Pin
Brian C Hart30-Dec-05 23:25
professionalBrian C Hart30-Dec-05 23:25 

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.