BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dll function exporting

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Command Line Tools)
View previous topic :: View next topic  
Author Message
Brian Bennett
Guest





PostPosted: Fri Oct 27, 2006 2:17 am    Post subject: dll function exporting Reply with quote



I have written a DLL but apparently I need to export the function name.
How do I go about doing this?

Also how to export the function with a different name, ie someFunc to be
known as anotherFunc.

Thanks!
brian
Back to top
Ed Mulroy
Guest





PostPosted: Fri Oct 27, 2006 5:37 am    Post subject: Re: dll function exporting Reply with quote



Exporting functions in 32 bit windows code is done by decorating the
function header with
__declspec(dllexport)

You typically want to also make it extern "C" and __stdcall (or WINAPI which
is the same thing).

If you go here you can follow throught he web pages which show simple demos
that include creating DLL's and programs which use them.

http://www.mulroy.org/howto.htm

This zip file contains many simple demo programs, some of which have DLL's
and programs which use them. Make sure that you enable the unzipper program
to create the directories the zip file contains when you unzip it.

http://www.mulroy.org/hello.zip

.. Ed

Quote:
Brian Bennett wrote in message
news:454125d1$1 (AT) newsgroups (DOT) borland.com...

I have written a DLL but apparently I need to export the function name. How
do I go about doing this?

Also how to export the function with a different name, ie someFunc to be
known as anotherFunc.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Command Line Tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.