Java VM messing with COM

Discussion in 'Java' started by Murrgon, Jun 25, 2004.

  1. Murrgon

    Murrgon Guest

    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
    Murrgon, Jun 25, 2004
    #1
    1. Advertising

  2. Murrgon

    Murrgon Guest

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

    Murrgon wrote:
    > 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
    Murrgon, Jun 25, 2004
    #2
    1. Advertising

  3. 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.




    "Murrgon" <> wrote in message
    news:nyZCc.37752$...
    > Nevermind, I fixed it. I had to use
    > CoInitializeEx(NULL, COINIT_MULTITHREADED) in my C++ stuff.
    > CoInitialize() only initializes COM for single threaded apps.




    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.711 / Virus Database: 467 - Release Date: 6/26/2004
    James D Carroll, Jun 26, 2004
    #3
  4. Murrgon

    Chris Smith Guest

    James D Carroll wrote:
    > 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
    Chris Smith, Jun 26, 2004
    #4
  5. 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.

    "Chris Smith" <> wrote in message
    news:...
    > James D Carroll wrote:
    > > 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



    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.714 / Virus Database: 470 - Release Date: 7/2/2004
    James D Carroll, Jul 5, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anders K. Jacobsen [DK]

    How to stop HTML View from messing up HTML code

    Anders K. Jacobsen [DK], Jan 21, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    659
    Anders K. Jacobsen [DK]
    Jan 22, 2005
  2. Jensen bredal

    IE messing up with font of web pages.

    Jensen bredal, Mar 21, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    305
    Patrice
    Mar 21, 2005
  3. =?Utf-8?B?cmdyYW5kaWRpZXI=?=

    Is ViewState messing with me?

    =?Utf-8?B?cmdyYW5kaWRpZXI=?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    329
    George Ter-Saakov
    Jan 10, 2006
  4. =?Utf-8?B?RGFiYmxlcg==?=

    validators messing up layout in IE before being triggered?

    =?Utf-8?B?RGFiYmxlcg==?=, Apr 11, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    626
    Swanand Mokashi
    Apr 12, 2006
  5. Alex Paransky
    Replies:
    5
    Views:
    1,391
    harrison_ford
    Feb 23, 2008
Loading...

Share This Page