Download Source Code

CClientDde Class Reference

Simple wrapper for the Windows DDE API. More...

#include <ClientDde.h>

Collaboration diagram for CClientDde:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void Destroy ()
 Releases all resources for this class.
LPCTSTR GetData ()
 Returns a pointer to any received data.
BOOL PokeString (LPCTSTR pName, LPCTSTR pString, DWORD dwTimeout=3000)
 Sends a string to the connected DDE server.
BOOL PokeData (LPCTSTR pName, LPBYTE pData, DWORD dwSize, DWORD dwTimeout=3000)
 Sends binary data to the connected DDE server.
BOOL RequestData (LPCTSTR pName, DWORD dwTimeout=3000)
 Requests data from DDE server.
void Disconnect ()
 Disconnects from remote DDE server.
BOOL Connect (LPCTSTR pService, LPCTSTR pTopic)
 Connects to remote DDE server.
 CClientDde ()
 Constructor.
virtual ~CClientDde ()
 Destructor.
HDDEDATA OnDdeCallback (UINT uType, UINT uFmt, HCONV hconv, HSZ hsz1, HSZ hsz2, HDDEDATA hdata, DWORD dwData1, DWORD dwData2)
 Resolved function is called when DDE server responds with data.

Static Public Member Functions

static BOOL Init ()
 Initializes the Windows DDE API.
static void Uninit ()
 Uninitializes the Windows DDE API.
static HDDEDATA CALLBACK DdeCallback (UINT uType, UINT uFmt, HCONV hconv, HSZ hsz1, HSZ hsz2, HDDEDATA hdata, DWORD dwData1, DWORD dwData2)
 This function is called when DDE server responds with data.

Detailed Description

Simple wrapper for the Windows DDE API.

This class provides basic Client DDE functionality.


Member Function Documentation

BOOL CClientDde::Connect LPCTSTR  pService,
LPCTSTR  pTopic
 

Connects to remote DDE server.

Parameters:
[in] pService - Name of DDE service
[in] pTopic - Name of DDE topic
Returns:
Non-zero if success.

HDDEDATA CClientDde::DdeCallback UINT  uType,
UINT  uFmt,
HCONV  hconv,
HSZ  hsz1,
HSZ  hsz2,
HDDEDATA  hdata,
DWORD  dwData1,
DWORD  dwData2
[static]
 

This function is called when DDE server responds with data.

Parameters:
[in] uType - Type of callback
[in] uFmt - Format of data
[in] hconv - Handle to conversation.
[in] hsz1 - Handle to string
[in] hsz2 - Handle to string
[in] hdata - Handle to data
[in] dwData1 - DWORD data
[in] dwData2 - DWORD data
Returns:
Handle to data
See also:

LPCTSTR CClientDde::GetData  ) 
 

Returns a pointer to any received data.

Returns:
Pointer to character string.
See also:

BOOL CClientDde::Init  )  [static]
 

Initializes the Windows DDE API.

Returns:
Non-zero if success.
See also:
Uninit()

HDDEDATA CClientDde::OnDdeCallback UINT  uType,
UINT  uFmt,
HCONV  hconv,
HSZ  hsz1,
HSZ  hsz2,
HDDEDATA  hdata,
DWORD  dwData1,
DWORD  dwData2
 

Resolved function is called when DDE server responds with data.

Parameters:
[in] uType - Type of callback
[in] uFmt - Format of data
[in] hconv - Handle to conversation.
[in] hsz1 - Handle to string
[in] hsz2 - Handle to string
[in] hdata - Handle to data
[in] dwData1 - DWORD data
[in] dwData2 - DWORD data
Returns:
Handle to data
See also:

BOOL CClientDde::PokeData LPCTSTR  pName,
LPBYTE  pData,
DWORD  dwSize,
DWORD  dwTimeout = 3000
 

Sends binary data to the connected DDE server.

Parameters:
[in] pName - Name of value
[in] pData - Pointer to buffer containing data
[in] dwSize - Size of buffer in pData
[in] dwTimeout - Number of milliseconds to wait for response.
Returns:
Non-zero if success, otherwise zero.
See also:

BOOL CClientDde::PokeString LPCTSTR  pName,
LPCTSTR  pString,
DWORD  dwTimeout = 3000
[inline]
 

Sends a string to the connected DDE server.

Parameters:
[in] pName - Name of value
[in] pString - String data to send
[in] dwTimeout - Number of milliseconds to wait for response.
Returns:
Non-zero if success, otherwise zero.
See also:

BOOL CClientDde::RequestData LPCTSTR  pName,
DWORD  dwTimeout = 3000
 

Requests data from DDE server.

Parameters:
[in] pName - Name of data to request
[in] dwTimeout - Number of milliseconds to wait for response.
Returns:
Non-zero if success
See also:

void CClientDde::Uninit  )  [static]
 

Uninitializes the Windows DDE API.

Returns:
See also:
Init()


The documentation for this class was generated from the following files:
  • inc/ClientDde.h
  • ClientDde.cpp
Copyright Robert Umbehant
This documentation is covered by the LGPL