[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DLL version of Gnokii for Win32
From: |
Feico de Boer |
Subject: |
DLL version of Gnokii for Win32 |
Date: |
Wed, 10 Apr 2002 13:08:58 +0200 |
Hello,
Currently I have on my local system a tree that allows to compile Gnokii
(almost CVS) into a DLL version. The following list of symbols is currently
exported as 'API'.
CFG_Get
CFG_Info
DefaultSubmitSMS
GSM_ClearBitmap
GSM_ClearPointBitmap
GSM_DataClear
GSM_ELogHandler
GSM_GetCountryCode
GSM_GetCountryName
GSM_GetNetworkCode
GSM_GetNetworkName
GSM_GetNote
GSM_Info
GSM_Initialise
GSM_IsPointBitmap
GSM_PackRingtone
GSM_PrintBitmap
GSM_ReadSMSBitmap
GSM_ResizeBitmap
GSM_SetPointBitmap
GSM_UnPackRingtone
GetFolderChanges
GetLine
GetSMS
GetSMSnoValidate
ParseSMS
RequestSMS
SM_Functions
SM_Loop
SaveSMS
SendSMS
StrToMemoryType
lock_device
print_error
readconfig
snprintf
strsep
unlock_device
vsnprintf
With Windows DLL's it is neccessary to explicetely export (DLL) and import
(app.) the symbols. I don't want to start a Windows flame war for this, but
to do so there are some code changes needed.
It looks like this for now:
// The following ifdef block is the standard way of creating macros which
make exporting
// from a DLL simpler. All files within this DLL are compiled with the
GNOKIIDLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on
any project
// that uses this DLL. This way any other project whose source files include
this file see
// GNOKIIDLL_API functions as being imported from a DLL, wheras this DLL
sees symbols
// defined with this macro as being exported.
#if defined(WIN32)
# ifdef GNOKIIDLL_EXPORTS
# define GNOKIIDLL_API __declspec(dllexport)
# else
# define GNOKIIDLL_API __declspec(dllimport)
# endif
#else /* !WIN32 */
# define GNOKIIDLL_API extern
#endif /* WIN32 */
This block of code needs to be in an include file (config.h ??) that is
included in (almost) everything.
What I would like to see is that all API functions/variables are prefixed.
This has IMHO two distinct advantages: (1) you get a clear description of
the API and (2) you have (almost) free Win32 DLL support.
Comments please.
Regards,
Feico.
- DLL version of Gnokii for Win32,
Feico de Boer <=
- Re: DLL version of Gnokii for Win32, Feico de Boer, 2002/04/10
- Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/10
- Re: DLL version of Gnokii for Win32, Feico de Boer, 2002/04/10
- Re: DLL version of Gnokii for Win32, Pavel Machek, 2002/04/15
- Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/15
- Re: DLL version of Gnokii for Win32, Feico de Boer, 2002/04/19
- Re: DLL version of Gnokii for Win32, Feico de Boer, 2002/04/26
- Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/27
- Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/28
- Re: DLL version of Gnokii for Win32, Gnokii for Win32, 2002/04/29