Click here to Skip to main content
15,917,702 members
Home / Discussions / COM
   

COM

 
GeneralEXCEL and MFC Pin
Daniela12329-May-03 10:08
Daniela12329-May-03 10:08 
GeneralRe: EXCEL and MFC Pin
Daniela1233-Jun-03 10:58
Daniela1233-Jun-03 10:58 
GeneralRe: EXCEL and MFC Pin
Mardigin18-Jul-03 10:11
Mardigin18-Jul-03 10:11 
Generalhelp resolve access violation in ole32.lib Pin
safee ullah28-May-03 23:19
safee ullah28-May-03 23:19 
GeneralRe: help resolve access violation in ole32.lib Pin
safee ullah4-Jun-03 1:35
safee ullah4-Jun-03 1:35 
GeneralCOM+ error in evt log. 0x80070008, error comsvcs.cpp line 289... Pin
Anonymous27-May-03 22:29
Anonymous27-May-03 22:29 
Generalcreate a activex control from a VC++ project Pin
A.Satish Kumar27-May-03 6:00
A.Satish Kumar27-May-03 6:00 
GeneralDCOM Server - Problem with Parameters Pin
Anand Vinod27-May-03 3:59
Anand Vinod27-May-03 3:59 
Hi,

I've created a DCOM Server through the ATL COM Appwizard, I've added a custom (IUnknown) interface and added some methods as below;

[helpstring("method GetComputerName")] HRESULT GetComputerName([out] BSTR *pName);
[helpstring("method GetComputerTime")] HRESULT GetComputerTime([out] long *lTime);

I was able to compile and call these methods thru the client and successfully get the values even from a remote machine.

Now I added a CLIENTINFO Structure in a header file and included the file in the idl using the #import directive,

#import "ClientInfo.h"

I added another method with a pointer to the ClientInfo structure as the parameter as follows

[helpstring("method GetComputerName")] HRESULT GetComputerName([out] LPCLIENTINFO pClInfo);

I was able to compile the code, but when i call this function from the client code, i get an exception and it crashes.

I want to know if we can pass User-Defined Data structures as parameters in a DCOM server? Why is this giving a problem even though i have derived the interface thru IUnknown? Shud we use VARIANTs here, but why shud we since i havent specified an IDispatct \ Automation interface?

The same thing works fine if i create an IN_PROC DLL.

Please tell me how we can achieve this in DCOM, also pls direct me to any examples or tutorials or articles on this.

Thanks,
Anand
GeneralRe: DCOM Server - Problem with Parameters Pin
John M. Drescher27-May-03 4:32
John M. Drescher27-May-03 4:32 
GeneralRe: DCOM Server - Problem with Parameters Pin
Anand Vinod27-May-03 18:40
Anand Vinod27-May-03 18:40 
GeneralRe: DCOM Server - Problem with Parameters Pin
John M. Drescher28-May-03 2:46
John M. Drescher28-May-03 2:46 
GeneralRe: DCOM Server - Problem with Parameters Pin
jduncalf27-May-03 21:47
jduncalf27-May-03 21:47 
GeneralRe: DCOM Server - Problem with Parameters Pin
jduncalf27-May-03 21:48
jduncalf27-May-03 21:48 
Generalcreation of client to Com-EXE-Server Pin
satishsilla26-May-03 18:01
satishsilla26-May-03 18:01 
GeneralRe: creation of client to Com-EXE-Server Pin
Anand Vinod27-May-03 3:26
Anand Vinod27-May-03 3:26 
GeneralCOM client app resulting in Error code C2018 Pin
Obi-Wan-Kenobi24-May-03 1:43
Obi-Wan-Kenobi24-May-03 1:43 
GeneralRe: COM client app resulting in Error code C2018 Pin
AlexO27-May-03 7:28
AlexO27-May-03 7:28 
GeneralRe: COM client app resulting in Error code C2018 Pin
Obi-Wan-Kenobi27-May-03 18:24
Obi-Wan-Kenobi27-May-03 18:24 
GeneralError handling events in wscript Pin
particle2k23-May-03 3:15
particle2k23-May-03 3:15 
GeneralRe: Error handling events in wscript Pin
Erik Juhl27-May-03 8:20
Erik Juhl27-May-03 8:20 
GeneralOLE-Automation debugging problem. Pin
vcseeker22-May-03 2:45
vcseeker22-May-03 2:45 
GeneralSee VC++ forum Pin
AlexO22-May-03 4:21
AlexO22-May-03 4:21 
GeneralSysAllocString hangs on Windows 2003 server Pin
Sachin R. Laddha22-May-03 1:36
Sachin R. Laddha22-May-03 1:36 
GeneralRe: SysAllocString hangs on Windows 2003 server Pin
Hugo Hallman25-May-03 11:29
Hugo Hallman25-May-03 11:29 
GeneralRe: SysAllocString hangs on Windows 2003 server Pin
jan larsen26-May-03 22:18
jan larsen26-May-03 22:18 

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.