home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
wint1_92
/
shaw
/
dde.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-11-04
|
1KB
|
63 lines
// dde.h RHS 10/15/91
#if !defined(DDE_H)
#define DDE_H
#include"winapp.h"
extern "C"
{
#include<ddeml.h>
}
class DDE : WinApplication
{
static WORD conversations;
FARPROC CallBack;
DWORD filters;
WORD lasterr;
protected:
DWORD instanceID;
static BOOL DDEOK;
BOOL result;
public:
DDE(FARPROC NewCallBack, DWORD filters);
~DDE(void);
HSZ CreateStrHandle(LPSTR str, int codepage = CP_WINANSI);
void DestroyStrHandle(HSZ hsz);
BOOL Initialize(void);
void SetCallBack(FARPROC NewCallBack);
void SetFilters(DWORD newFilters);
WORD GetLastError(void);
BOOL GetResult(void);
};
class DDEClient : public DDE
{
char *server, *topic, *item, *data;
HCONV hConv;
HSZ hServer,hTopic,hItem;
DWORD timeout;
BOOL Connect(void);
BOOL MakeRequest(void);
public:
DDEClient(char *server, char *topic,
FARPROC ClientCallBack, DWORD filters = APPCLASS_STANDARD);
~DDEClient(void);
char *GetData(void);
char *GetServer(void);
char *GetTopic(void);
char *GetItem(void);
void SetTimeOut(DWORD newtimeout);
WORD Request(char *item);
};
#endif