Java VM messing with COM

M

Murrgon

Using Sun JavaVM 1.4.2_04 on a windows 2000 machine. I have
C++ code that initializes directShow and enumerates the available
video capture devices, which works fine. However, after having
initilized the java VM, any attempt to actually use DShow and
one of the enumerated capture devices, I get the wonderful error:
"CoInitialize() has not been called". So what I want to know is
what is java doing with the COM stuff and how do I get it to not
shut it down?

Murrgon
 
M

Murrgon

Nevermind, I fixed it. I had to use
CoInitializeEx(NULL, COINIT_MULTITHREADED) in my C++ stuff.
CoInitialize() only initializes COM for single threaded apps.
 
J

James D Carroll

Well, duh! Jeesh!! What were you thinking ?!?

Actually I'm just a humble VB/Java programmer.

I ENVY and WORSHIP you C++/COM/ATL/MFC folks.

I am truly humbled by the knowledge that must be contained in your noggin.

You're a better man than me, GungaDin.
 
C

Chris Smith

James said:
Actually I'm just a humble VB/Java programmer.

I ENVY and WORSHIP you C++/COM/ATL/MFC folks.

I'm trying to figure out if this is a joke or not...

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
J

James D Carroll

Actually its quite true. I entered the programming world as a VB5
programmer, but then moved onto VB6, ASP, Java, etc. COM was always
something "hidden" from me. And whenever I tried to learn it (I own books by
Petzoid, Richter, Procise, Box, Chappel, and Brockshmidt and many others;
every single one has a dusty bookmark about 150 pages in) I've been left
stupified by all the HRESULTS and such. My career has been more of a "jack
of all trades" type (training on the latest techs), but I was always
fascinated by COM/ATL/MFC and really, honestly, regret that I was never able
to get neck deep into it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top