Click here to Skip to main content
16,004,836 members
Home / Discussions / COM
   

COM

 
Generalwindows Message loop Pin
Abhi Lahare23-Jul-04 18:32
Abhi Lahare23-Jul-04 18:32 
GeneralHelp, COM advanced programmer help me. Pin
yellowdragon21-Jul-04 20:24
yellowdragon21-Jul-04 20:24 
GeneralRe: Help, COM advanced programmer help me. Pin
Milton Karimbekallil22-Jul-04 17:54
Milton Karimbekallil22-Jul-04 17:54 
GeneralRe: Help, COM advanced programmer help me. Pin
yellowdragon24-Jul-04 0:21
yellowdragon24-Jul-04 0:21 
GeneralCDialog in In-Process Server (DLL) Pin
Anonymous21-Jul-04 0:58
Anonymous21-Jul-04 0:58 
Generalshortcut Pin
ANDYFA20-Jul-04 14:23
ANDYFA20-Jul-04 14:23 
GeneralRe: shortcut Pin
Abhi Lahare23-Jul-04 18:20
Abhi Lahare23-Jul-04 18:20 
GeneralMixing COM event handling techniques Pin
zumichu20-Jul-04 11:48
zumichu20-Jul-04 11:48 
So I have one project in VC 7 that I'd like to use COM events with. I successfully set up the event server by using the __event __interface, and __raise attributes. I even set up a client program in VB 6 that worked and caught the event.

The problem is that I can't get another C++/COM project to work with it. This project is done already and it's not an attributed project and dosen't work by adding __hook attributes. I tried setting it up to catch the events through IDispEventSimpleImpl and adding an entry to the sink map. This is the way I'd like to do it anyway, because I handle events from other objects in this prject this way and I'd like to keep it consistant.

Anyway, everything seemed to go smoothly until I ran it and got a Run-Time Check Failure #0 that says the value of ESP was not properly saved across the function call, usually indicating a function pointer declared with a different calling convention than the function.

my SINK_MAP looks like this:

BEGIN_SINK_MAP(CClass)
...
SINK_ENTRY_INFO(10,__uuidof(IEvents),/*dispinterface*/0xf001,OnEvent,&EventInfo)
END_SINK_MAP()

My handler looks like this:

void __stdcall OnEvent(int i, int j, BSTR bstrMessage)
{
::MessageBox(NULL,_bstr_t(bstrMessage),NULL,MB_OK);
}

and I have my info struct defined like this:

_ATL_FUNC_INFO EventInfo={CC_STDCALL,VT_EMPTY,3,{VT_INT, VT_INT, VT_BSTR}};

Any ideas of what could be wrong? Or does mixing the attributed server with the client using IDispEventSimpleImpl just not work?
GeneralRe: Mixing COM event handling techniques Pin
Vi221-Jul-04 18:10
Vi221-Jul-04 18:10 
GeneralRe: Mixing COM event handling techniques Pin
zumichu21-Jul-04 18:41
zumichu21-Jul-04 18:41 
GeneralRe: Mixing COM event handling techniques Pin
Vi221-Jul-04 19:19
Vi221-Jul-04 19:19 
GeneralRe: Mixing COM event handling techniques Pin
zumichu21-Jul-04 19:44
zumichu21-Jul-04 19:44 
GeneralIHTMLWindow2 navigate opening new window Pin
zumichu20-Jul-04 11:11
zumichu20-Jul-04 11:11 
GeneralRe: IHTMLWindow2 navigate opening new window Pin
Alexander Wiseman20-Jul-04 11:40
Alexander Wiseman20-Jul-04 11:40 
GeneralRe: IHTMLWindow2 navigate opening new window Pin
zumichu20-Jul-04 12:50
zumichu20-Jul-04 12:50 
GeneralRe: IHTMLWindow2 navigate opening new window Pin
Alexander Wiseman20-Jul-04 14:25
Alexander Wiseman20-Jul-04 14:25 
GeneralRe: IHTMLWindow2 navigate opening new window Pin
zumichu20-Jul-04 16:22
zumichu20-Jul-04 16:22 
GeneralGUIDs and MIDL.exe Pin
Tropicana20-Jul-04 7:58
Tropicana20-Jul-04 7:58 
Questionhow to marshal interface Pin
yingkou19-Jul-04 18:30
yingkou19-Jul-04 18:30 
GeneralCreateObjrefMoniker - missing Pin
Sara Burns19-Jul-04 12:30
Sara Burns19-Jul-04 12:30 
GeneralAxWebBrowser.ExecWB printing error "Trying to revoke a drop target ..." Pin
alexatn16-Jul-04 12:14
alexatn16-Jul-04 12:14 
Generaldefaultvalue doesn't work with late-binding when using attributed objects Pin
Member 54073115-Jul-04 2:59
Member 54073115-Jul-04 2:59 
GeneralWord OLE temp document ~wroxxxx.doc Pin
vishalmore14-Jul-04 20:35
vishalmore14-Jul-04 20:35 
GeneralSuggestion for solved problems Pin
darkbyte14-Jul-04 14:04
darkbyte14-Jul-04 14:04 
QuestionHow to integrate out of process server with client Pin
piks14-Jul-04 0:50
piks14-Jul-04 0:50 

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.