請問各位有知道我應該如何調用這個C寫的DLL文件中的FUNCTION呢?
需要調用:
SMODEM_DLL_API int fnSModem_GetFinderID(char *rfMAC, char *finderID);
SMODEM_DLL_API int fnSModem_Init(char *fname);
SMODEM_DLL_API int fnSModem_Exit();
下面是DLL文件的說明
// 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 SMODEM_DLL_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
// SMODEM_DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
//#ifdef SMODEM_DLL_EXPORTS
#define SMODEM_DLL_API __declspec(dllexport)
//#else
//#define SMODEM_DLL_API __declspec(dllimport)
//#endif
// This class is exported from the SModem_DLL.dll
class SMODEM_DLL_API CSModem_DLL {
public:
CSModem_DLL(void);
// TODO: add your methods here.
};
extern SMODEM_DLL_API int nSModem_DLL;
/*
fname: Filename for logging - like "f:\\logs.txt"
Please note this file is always appended so that there is no data
loss when application restarts. Each new session starts with
system data and time.
This file has to be kept safe by ASUS and sent to Sling Media on
regular basis.
return value:
0: success
-100: file (fname) could not be opened in append mode.
-200: another instance of this DLL might have been
instantiated.
*/
SMODEM_DLL_API int fnSModem_Init(char *fname);
/*
return value:
0: success
-100: not closed properly because of multiple active sessions.
*/
SMODEM_DLL_API int fnSModem_Exit();
/*
rfMAC: NULL terminated string with FinderID - like "0013B6000001".
This should of exactly 12 bytes for "strlen()".
6 byte MAC address needs 12 bytes in string format. 13th byte,
rfMAC[12], should be NULL.
finderID:
16 byte FinderID needs 32 bytes in string format. 33rd byte,
finderID[32], will be NULL.
return value:
0: success
-100: rfMAC is not a 12 byte string.
-200: another instance of this DLL might have been
instantiated.
-300: fnSModem_Init() was unable to open text log file.
*/
SMODEM_DLL_API int fnSModem_GetFinderID(char *rfMAC, char *finderID);
[此贴子已经被作者于2007-6-21 15:30:04编辑过]