|
From: Viatcheslav B. <sl...@el...> - 2002-04-17 13:33:05
|
Try to use VARIANT_TRUE constant as a value of the parameter insted of 1 (actually OLE's TRUE is -1) and VT_BOOL as a type. HTH Slav. -----Original Message----- From: Tom Blauwendraat [mailto:an...@dd...] Sent: 17 April 2002 13:45 To: min...@li... Subject: [Mingw-users] OLE test program works with MSVC but fails with MinGW? Hello, I was looking on MSDN for help on controlling the IDispatch object, and I found an example. In MSVC it compiles ok, and does what it is supposed to. But when I try this example in MinGW (1.1) it compiles ok but doesn't work. The example is supposed to start Excel using CoCreateInstance, and use the IDispatch object to tell the window to make itself visible. As far as I can see the first part is ok, I see a program "Excel" pop up and disappear in my task list correctly. But the window doesn't become visible. I figure this must have something to do with the Variant that is used to transfer the "Visible" parameter. But I can't see anything wrong with the example. I hope one of you can take a look at it and tell me what's wrong or if MinGW supports this at all. I included a ZIP file "testcase.zip" with the source and two batchfiles, one i use for compiling MW the other for MSVC. Tom |