| 1 | // Header for using DDEClient.dll in other C/C++ programs |
|---|
| 2 | // |
|---|
| 3 | // Author: Robert Matovinovic |
|---|
| 4 | // Version: 0.02 |
|---|
| 5 | // Date: 04.10.2006 |
|---|
| 6 | // |
|---|
| 7 | |
|---|
| 8 | // DDE data structure for access data received by DDE transaction |
|---|
| 9 | typedef struct { |
|---|
| 10 | // pointer to begin of dde data returned by DdeAccessData |
|---|
| 11 | BYTE* pData; |
|---|
| 12 | // length of dde data returned by DdeAccessData |
|---|
| 13 | DWORD dwLen; |
|---|
| 14 | // string pointer to dde data, if the data should accessed as string |
|---|
| 15 | char* pszData; |
|---|
| 16 | // ID of transaction, used to determine completion of asynchronous transaction |
|---|
| 17 | DWORD dwTransID; |
|---|
| 18 | // ID of transaction, returned by callback function with asynch. transaction |
|---|
| 19 | DWORD dwCbTransID; |
|---|
| 20 | // string for access type of data |
|---|
| 21 | char szAccType[7]; |
|---|
| 22 | } DCDATAACCESS; |
|---|
| 23 | |
|---|
| 24 | #define DCDllImport extern "C" _declspec( dllimport ) |
|---|
| 25 | |
|---|
| 26 | // |
|---|
| 27 | // imported variables |
|---|
| 28 | // |
|---|
| 29 | // boolean used by DCLastError |
|---|
| 30 | DCDllImport bool bDCErrorExport; |
|---|
| 31 | // pointer to dde data access structure |
|---|
| 32 | DCDllImport DCDATAACCESS* *DCDA; |
|---|
| 33 | |
|---|
| 34 | // |
|---|
| 35 | // imported functions |
|---|
| 36 | // |
|---|
| 37 | DCDllImport bool DCRequestString(WORD wC, |
|---|
| 38 | char szItem[], |
|---|
| 39 | int nTimeout); |
|---|
| 40 | DCDllImport bool DCRequest(WORD wC, |
|---|
| 41 | char szItem[], |
|---|
| 42 | char szFormat[], |
|---|
| 43 | int nTimeout ); |
|---|
| 44 | DCDllImport bool DCTransaction(WORD wC, |
|---|
| 45 | char szType[], |
|---|
| 46 | char szItem[], |
|---|
| 47 | char szData[], |
|---|
| 48 | char szFormat[], |
|---|
| 49 | int nTimeout, |
|---|
| 50 | char szAccess[]); |
|---|
| 51 | DCDllImport bool DCConnect(WORD* pConvNo, |
|---|
| 52 | char szService[], |
|---|
| 53 | char szTopic[]); |
|---|
| 54 | DCDllImport bool DCDisconnect(WORD wConvNo); |
|---|
| 55 | DCDllImport bool DCInit(); |
|---|
| 56 | DCDllImport bool DCUninit(); |
|---|
| 57 | DCDllImport char* DCLastError(); |
|---|
| 58 | DCDllImport bool DCAsynchTransactionCompleted(WORD wC, DWORD dwTransID, bool bWait); |
|---|
| 59 | DCDllImport bool DCFreeDdeMem(WORD wC); |
|---|
| 60 | DCDllImport void DCFinalize(); |
|---|
| 61 | DCDllImport bool DCAbandonTransaction(WORD wC, DWORD dwTransID); |
|---|
| 62 | DCDllImport char* DCVersion(); |
|---|
| 63 | |
|---|