Problems importing DLL

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: John A. Byerly (jbyerly_at_ess-quality_remove.com)
Date: 06/11/04


Date: Fri, 11 Jun 2004 14:55:17 GMT

Hi,

I am sure this is a basic question, but it is driving me crazy.

I received a DLL containing a COM object from a third party which I am
trying to import. I put in the following lines of code to try to accomplish
this:

// Import the DLL
#import "TheDLL.dll"

// Create an instance of the object
TheNamespace::TheClass myObject;

When I compile the file containing these lines of code, I get the following
error message:

'myObject' uses undefined struct 'TheClass'

This is the only error message I get.

I have tried "using namespace TheNamespace;", and also supplying
"no_namespace" to the #import. Neither of these made any difference.

Can anyone offer a suggestion?

TIA,

JAB



Relevant Pages

  • Problems importing DLL
    ... I received a DLL containing a COM object from a third party which I am ... TheNamespace::TheClass myObject; ... This is the only error message I get. ...
    (microsoft.public.vc.language)
  • RE: fax notification
    ... Thank you for posting in the SBS newsgroup. ... message "mail system wrong DLL", and the inbound fax cannot was deliver to ... Please copy the exact error message and paste it in your reply. ...
    (microsoft.public.windows.server.sbs)
  • Re: Redirecting stderr
    ... console application that makes calls to the DLL. ... That sounds like a question more appropriate for a Windows ... libraries). ... it doesn't print an error message; ...
    (comp.lang.c)
  • Re: DllImport with ASP.NET ?
    ... > attibute didn't work. ... It was exactly the same error message. ... >> is it possible to use DllImport to call a DLL in ASP.NET? ... >> public static extern int PaqGetVersion(); ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: C++/TCL Need Solution to Compile Error c2784
    ... jnior_300.h"}" and created other errors where it didn't even compile. ... Error Message: ... Which appears to be an error because it depending on the SDK dll ... DLL properties to see dependencies and where the dependencies should ...
    (comp.lang.tcl)