Click here to Skip to main content
15,913,610 members
Home / Discussions / COM
   

COM

 
GeneralRe: DCOM & Dual LAN Pin
pba_9-Apr-03 12:55
pba_9-Apr-03 12:55 
GeneralDCOM & Dual LAN Pin
Deepak Bajaj2-Apr-03 17:56
Deepak Bajaj2-Apr-03 17:56 
General"The stub received bad data" error when no marshalling is taking place in Win98 Pin
Alberto Bar-Noy2-Apr-03 8:33
Alberto Bar-Noy2-Apr-03 8:33 
GeneralWord automation Pin
Martyn Pearson2-Apr-03 1:48
Martyn Pearson2-Apr-03 1:48 
GeneralRe: Word automation Pin
Martyn Pearson2-Apr-03 2:12
Martyn Pearson2-Apr-03 2:12 
Generalthreading problems Pin
Dietmar Goetz1-Apr-03 3:49
Dietmar Goetz1-Apr-03 3:49 
GeneralRe: threading problems Pin
pba_9-Apr-03 13:07
pba_9-Apr-03 13:07 
Generalsome questions about events Pin
particle2k31-Mar-03 4:34
particle2k31-Mar-03 4:34 
hello,
i try to create com objects which can be used by scripting clients and by c++ clients
very easily. this is no problem with the objects itself. but i have some trouble with
the events.
if i create the source interface as a standard interface based on idispatch the
wscript.exe crashes. if i look at the event proxy class generated by msvc, i see that
the methods on the interface are called directly, i think this will not work on script
clients. so i changed the interface to a dispinterface, now the generated proxy class
calls the method via invoke, scripting client works fine. but if i want to receive this
event in a simple c++ app the methods are not called directly, well, of course the
invoke method is called instead. so it is not so easy usable in c++. therefore i always
implement two source interfaces per object, on dispinterface as [default,source] for
script clients, and another iunknown based interface with the same methods as [source]
for c++ clients. this works fine, although it is more work to do. i do not know, if
there is a better way to support idispatch clients via invoke, and vtable clients directly
via the method calls? i thought maybe i can qi the interface connected to the cp, and
the idispatch connection will only return the idispatch interface, but it also returns
the event interface without error, but the method call fails.
second problem is that i do not get the automagic in wscript running. the event handler
is called the right way, but it is not executed. i always have to use the
WScript.ConnectObject obj, "obj_" method to connect to the events, then it is working
with vbscript. any idea why? do i need to support additional interfaces for the automagic
support? i added the IProvideClassInfo2Impl and IObjectWithSiteImpl to get the connect-
object method working.
and i have no idea how to use the events in a html-page with jscript. i do not get the
automagic working there, too, maybe the same problem. and attaching a function directly
to an event, like obj.event = myeventfunc, does not work, i always get the error, that
the object does not support the method or property. does it make any problems that the
event has parameters? the sample for onload, onclick do not have parameters. or is something
like the wscript.connectobject available for jscript and html?

well, that all for now, i hope someone could answer one or another? would be great.
many thanks in advance

enrico
GeneralRe: some questions about events Pin
Vi231-Mar-03 23:39
Vi231-Mar-03 23:39 
GeneralRe: some questions about events Pin
particle2k1-Apr-03 1:03
particle2k1-Apr-03 1:03 
GeneralRe: some questions about events Pin
Vi21-Apr-03 2:15
Vi21-Apr-03 2:15 
GeneralRe: some questions about events Pin
particle2k1-Apr-03 2:32
particle2k1-Apr-03 2:32 
QuestionCan com post message to app? I own the COM and app. Pin
xiaochnegwx29-Mar-03 15:35
xiaochnegwx29-Mar-03 15:35 
AnswerRe: Can com post message to app? I own the COM and app. Pin
geo_m29-Mar-03 22:56
geo_m29-Mar-03 22:56 
GeneralI only want to post WM_USER to app.How can I do? Pin
xiaochnegwx1-Apr-03 6:56
xiaochnegwx1-Apr-03 6:56 
GeneralRe: I only want to post WM_USER to app.How can I do? Pin
geo_m1-Apr-03 7:45
geo_m1-Apr-03 7:45 
GeneralBasic ATL-COM problem Pin
Francisco José Sen del Prado29-Mar-03 6:27
Francisco José Sen del Prado29-Mar-03 6:27 
GeneralRe: Basic ATL-COM problem Pin
Brian Shifrin29-Mar-03 13:12
Brian Shifrin29-Mar-03 13:12 
GeneralReturn Icon/Bitmap data from a method Pin
thowra29-Mar-03 1:35
thowra29-Mar-03 1:35 
GeneralRe: Return Icon/Bitmap data from a method Pin
Vi231-Mar-03 22:54
Vi231-Mar-03 22:54 
GeneralMIDL: Error related to Forward Dec;aration Pin
Ahsan Abbas27-Mar-03 22:28
Ahsan Abbas27-Mar-03 22:28 
GeneralRe: MIDL: Error related to Forward Dec;aration Pin
safee ullah28-Mar-03 0:29
safee ullah28-Mar-03 0:29 
GeneralRe: MIDL: Error related to Forward Dec;aration Pin
Ahsan Abbas28-Mar-03 0:54
Ahsan Abbas28-Mar-03 0:54 
GeneralRe: MIDL: Error related to Forward Dec;aration Pin
safee ullah30-Mar-03 19:05
safee ullah30-Mar-03 19:05 
GeneralReverse engineering Information on MsOCF! Pin
safee ullah27-Mar-03 18:49
safee ullah27-Mar-03 18:49 

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.