"Microsoft C++ exception"?!?

This is a discussion on "Microsoft C++ exception"?!? within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I'm trying to make a C++ DLL that provides C and C++ programs with a simplified interface to ADO. ...

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,261

    Angry "Microsoft C++ exception"?!?

    Hi,

    I'm trying to make a C++ DLL that provides C and C++ programs with a simplified interface to ADO. The problem is, when the DLL is loaded, before any code is executed I get an unhandled exception "0xE06D7363: Microsoft C++ Exception".

    What does this mean? If I recompile in Borland C++ will it go away?

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,261
    Ah, don't worry about it. I've figured it out.

    I had declared 2 objects globally:-
    Code:
    _ConnectionPtr pConn("ADODB.Connection.1.5");
    _RecordsetPtr pRs("ADODB.Recordset.1.5");
    Before I had initialised COM. This is rectified thusly:-
    Code:
    // globals
    _ConnectionPtr pConn;
    _RecordsetPtr pRs;
    
    // in a function
    ::CoInitialize(NULL);
    pConn.CreateInstance("ADODB.Connection.1.5");
    pRs.CreateInstance("ADODB.Recordset.1.5");
    Damn this weird model...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unexplained "unhandled exception"
    By ulillillia in forum C Programming
    Replies: 6
    Last Post: 04-19-2007, 11:19 AM
  2. An "throwing exception" issue
    By viniciusMarques in forum Windows Programming
    Replies: 3
    Last Post: 06-02-2004, 10:38 AM
  3. trouble with installing "microsoft visual c++"
    By aleminio in forum C Programming
    Replies: 3
    Last Post: 04-28-2004, 09:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21