Click here to Skip to main content
16,017,015 members
Home / Discussions / COM
   

COM

 
AnswerRe: Can a method of COM-server return a string pointer Pin
justanotherprogrammer12-May-03 21:13
justanotherprogrammer12-May-03 21:13 
GeneralRe: Can a method of COM-server return a string pointer Pin
valikac13-May-03 16:01
valikac13-May-03 16:01 
GeneralRe: Can a method of COM-server return a string pointer Pin
Renjith Ramachandran15-May-03 5:57
Renjith Ramachandran15-May-03 5:57 
Generalactivex parent Pin
Shotgun12-May-03 15:28
Shotgun12-May-03 15:28 
GeneralSAFEARRAY question Pin
Stephane Routelous12-May-03 8:15
Stephane Routelous12-May-03 8:15 
GeneralRetrieving Pointer to IOleClientSite Pin
GeorgT12-May-03 4:15
GeorgT12-May-03 4:15 
GeneralUsing Updated Interface Pin
swarup12-May-03 3:17
swarup12-May-03 3:17 
Generalerror calling method in event Pin
particle2k11-May-03 23:44
particle2k11-May-03 23:44 
hello,

i have a problem passing objects in a event function.
i created a com object which listens for incoming tcp/ip connections in the background. the listening can be started by an method which returns immediatly. then a thread is created by the com object, waiting for incoming connections, and executing an event, to inform the client.
because the event is fired from a different thread, i marshalled the event source objects in the advise function and unmarshal when firing the event. this works fine as long as i pass only simple parameters like a long.
but i want to pass an com object which i created in the receiving thread to the client. for example an object which holds information about the established connection.
but when i fire the event, the object pointer is passed to the event function. if i call methods on this event in the client, i get an error, that the esp was not saved properly across a function call. why is that? and what can i do about this? maybe i have to marshal the transmitted objects pointer in some way, but i do not know how. do i have to marshal the object in a stream, transmit the stream, and unmarshal on the other side? but would make no difference, i think, because then i have to transmit the stream object, should cause the same error.
all is running inproc and the event source interface has the oleautomation attribute for standard marshalling.

then i changed the event to a dispinterface. fired the event by the invoke method passing the object as an variant parameter. the test with vbscript host was successful. there i can access the transmitted object. i think the invoke method does something with the object.

how can i get this working with an IUnknown derieved event source interface?

many thanks for help
enrico
GeneralRe: error calling method in event Pin
Vi215-May-03 3:43
Vi215-May-03 3:43 
Generalexe-server component's interface related Pin
satishsilla11-May-03 20:54
satishsilla11-May-03 20:54 
GeneralRe: exe-server component's interface related Pin
valikac13-May-03 16:04
valikac13-May-03 16:04 
Generalexe-server component's interface related Pin
satishsilla11-May-03 20:53
satishsilla11-May-03 20:53 
GeneralMSHTML & IStream Pin
luda10-May-03 13:13
luda10-May-03 13:13 
GeneralRe: MSHTML & IStream Pin
Stephane Rodriguez.12-May-03 3:43
Stephane Rodriguez.12-May-03 3:43 
GeneralATL components Pin
Ancient Dragon9-May-03 13:00
Ancient Dragon9-May-03 13:00 
GeneralRe: ATL components Pin
valikac15-May-03 7:59
valikac15-May-03 7:59 
GeneralCustom Outlook property sheet (C#) Pin
rkiesler9-May-03 12:45
rkiesler9-May-03 12:45 
QuestionHow to get (and use) the IStream interface from CFile Pin
Anders Sandberg8-May-03 22:30
Anders Sandberg8-May-03 22:30 
AnswerRe: How to get (and use) the IStream interface from CFile Pin
rkiesler11-May-03 13:17
rkiesler11-May-03 13:17 
GeneralCOM vs ActiveX vs OLE Pin
weichai7-May-03 16:28
weichai7-May-03 16:28 
GeneralRe: COM vs ActiveX vs OLE Pin
Davy Mitchell8-May-03 8:53
Davy Mitchell8-May-03 8:53 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
Stephane Rodriguez.7-May-03 20:47
Stephane Rodriguez.7-May-03 20:47 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
RGTx8-May-03 10:09
RGTx8-May-03 10:09 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
Vi27-May-03 22:52
Vi27-May-03 22:52 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
RGTx8-May-03 10:10
RGTx8-May-03 10:10 

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.