aqstws 0 Posted December 26, 2008 Report Share Posted December 26, 2008 I'm old at c++ but new to COM. coinitialize() works if I remove all uses of cout. If I include a single cout, such as cout << "top" << endl; anywhere in the code...even much later than my coinitialize call, coinitialize() fails. Of course I #include to get cout to compile. I am using Visual Studio 2003. A lot of trial and error has not worked for me yet. Has anyone had this observation and gotten around it?aqstws Link to post
djwilliams 0 Posted January 3, 2009 Report Share Posted January 3, 2009 try using fprint? Link to post
aqstws 0 Posted January 5, 2009 Author Report Share Posted January 5, 2009 I am using printf. I don't have a problem printing. Even cout prints. But my problem is not getting strings out. It's that I don't know why it breaks a COM function. I have other COM code problems, and so I am trying to make sure that every COM function I use works exactly how it should work. How can an unrelated c++ function have this effect on COM? I'm learnign COM. Its' COM that's showing me something I don't understand. Does COM set up a streaming path, like cout uses? The convenience of cout is that in the strongly typed code of c and c++, I don't need to know the variable types of whatever I am printing. I don't know how c++ does this. Does COM need that streaming pathway? Link to post
djwilliams 0 Posted January 9, 2009 Report Share Posted January 9, 2009 no there are no conflicts that I know besides "getche()" are you using a loop or logical if thats being broken by value returned null? Link to post
herd 0 Posted January 9, 2009 Report Share Posted January 9, 2009 Are you doing multiple threads? COM is very stubborn with threading. If not, it still needs to have someone poll the window procedures so that its SendMessage based marshaller can operate... Link to post
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now