Connecting Tech Pros Worldwide Help | Site Map

How do I use classes from a DLL?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 05:28 PM
Jake D
Guest
 
Posts: n/a
Default How do I use classes from a DLL?

I have found many examples on how to use a function from a DLL, but I
have a DLL (not written by me) that has various classes, and functions
within.
How can I create an object of a class type defined in the DLL and
access functions from the class?

  #2  
Old July 19th, 2005, 05:28 PM
Alf P. Steinbach
Guest
 
Posts: n/a
Default Re: How do I use classes from a DLL?

On 13 Sep 2003 09:08:37 -0700, jdenley@richmondnursery.com (Jake D) wrote:
[color=blue]
>I have found many examples on how to use a function from a DLL, but I
>have a DLL (not written by me) that has various classes, and functions
>within.
>How can I create an object of a class type defined in the DLL and
>access functions from the class?[/color]

The C++ standard has nothing to say on the subject of DLLs (except a very
indirect adaption in the wording for when statics are initialized).

It doesn't even have anything to say on the subject of name mangling.

Not even on the existence of linkers.

In short, if you're using a different compiler than the one used to
create the DLL, there is little chance that you can use that DLL, unless
the DLL is designed to be language-independent, e.g. COM conventions.

On the other hand, _if_ you have a compatible compiler, see that compiler's
documentation. <ot>Presumably, judging from the terminology, this is on
the Windows platform, and so check out 'dllimport' & friends; MS keywords
that most/many/some compilers for that platform understand.</ot>

  #3  
Old July 19th, 2005, 05:28 PM
shakahshakah@yahoo.com
Guest
 
Posts: n/a
Default Re: How do I use classes from a DLL?

The developer of the DLL should supply you with header files to compile
against and an import library to link with.

In article <d323dfa0.0309130808.28b6d2c1@posting.google.com >,
jdenley@richmondnursery.com (Jake D) wrote:[color=blue]
>I have found many examples on how to use a function from a DLL, but I
>have a DLL (not written by me) that has various classes, and functions
>within.
>How can I create an object of a class type defined in the DLL and
>access functions from the class?[/color]
  #4  
Old July 19th, 2005, 05:28 PM
Kevin Goodsell
Guest
 
Posts: n/a
Default Re: How do I use classes from a DLL?

shakahshakah@yahoo.com wrote:
[color=blue]
> The developer of the DLL should supply you with header files to compile
> against and an import library to link with.[/color]

Please don't top post. See section 5 of the FAQ for posting guidelines.

http://www.parashift.com/c++-faq-lite/

Also, DLLs are not topical here. Please avoid posting off-topic
messages, even as a reply to a question. An alternative would be to send
the reply to a group where it is topical, and email the author of the
question with the location of your answer. Or you could email the author
directly with your answer.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.