Commit 6a03ac0e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Merge from Corel tree. Contributors are:

- Corel (Sean Langley, Michael Abd-El-Malek, Rick Mutzke, Bill Xing) - Macadamian on behalf of Corel (Louis-Philippe Gagnon, Jean-Claude Batista) Also added a few bits: - Complete window model for several instances and conversations. - Support for asynchronous transactions. - Fixed some code (WM_DDE_REQUEST, WM_DDE_ADVISE, WM_DDE_REQUEST) handling. - Support for wild connections.
parent f4b14106
......@@ -10,7 +10,10 @@ IMPORTS = gdi32 kernel32 ntdll
C_SRCS = \
bidi16.c \
cache.c \
ddeml.c \
dde/client.c \
dde/ddeml16.c \
dde/misc.c \
dde/server.c \
display.c \
exticon.c \
lstr.c \
......@@ -42,6 +45,7 @@ SUBDIRS = \
$(TOPOBJDIR)/windows
EXTRASUBDIRS = \
dde \
resources
@MAKE_DLL_RULES@
......
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*
* DDEML library
*
* Copyright 1997 Alexandre Julliard
* Copyright 1997 Len White
* Copyright 1999 Keith Matthews
* Copyright 2000 Corel
* Copyright 2001 Eric Pouech
*/
#ifndef __WINE_DDEML_PRIVATE_H
#define __WINE_DDEML_PRIVATE_H
/* defined in atom.c file.
*/
#define MAX_ATOM_LEN 255
/* Maximum buffer size ( including the '\0' ).
*/
#define MAX_BUFFER_LEN (MAX_ATOM_LEN + 1)
/* This is a simple list to keep track of the strings created
* by DdeCreateStringHandle. The list is used to free
* the strings whenever DdeUninitialize is called.
* This mechanism is not complete and does not handle multiple instances.
* Most of the DDE API use a DWORD parameter indicating which instance
* of a given program is calling them. The API are supposed to
* associate the data to the instance that created it.
*/
/* The internal structures (prefixed by WDML) are used as follows:
* + a WDML_INSTANCE is created for each instance creation (DdeInitialize)
* - a popup windows (InstanceClass) is created for each instance. It will be
* used to receive all the DDEML events (server registration, conversation
* confirmation...)
* + when registring a server (DdeNameService) a WDML_SERVER is created
* - a popup window (ServerNameClass) is created
* + a conversation is represented by two WDML_CONV structures:
* - one on the client side, the other one on the server side
* - this is needed because the address spaces may be different
* - therefore, two lists of links are kept for each instance
* - two windows are created for a conversation:
* o a popup window on client side (ClientConvClass)
* o a child window (of the ServerName) on the server side
* (ServerConvClass)
* - all the exchanges then take place between those two windows
* + a (warm or link) is represented by two WDML_LINK structures:
* - one on client side, the other one on server side
* - therefore, two lists of links are kept for each instance
*
* To help getting back to data, WDML windows store information:
* - offset 0: the DDE instance
* - offset 4: the current conversation (for ClientConv and ServerConv only)
*
*/
typedef struct tagHSZNode
{
struct tagHSZNode* next;
HSZ hsz;
HSZ hsz2;
} HSZNode;
typedef struct tagWDML_SERVER
{
struct tagWDML_SERVER* next;
HSZ hszService;
HSZ hszTopic;
BOOL filterOn;
HWND hwndServer;
} WDML_SERVER;
typedef struct tagWDML_XACT {
struct tagWDML_XACT* next;
DWORD xActID;
UINT ddeMsg;
HDDEDATA hDdeData;
DWORD dwTimeout;
DWORD hUser;
union {
struct {
UINT wType;
UINT wFmt;
HSZ hszItem;
HGLOBAL hDdeAdvise;
} advise;
struct {
UINT wFmt;
HSZ hszItem;
} unadvise;
struct {
HGLOBAL hMem;
} execute;
struct {
HGLOBAL hMem;
HSZ hszItem;
} poke;
struct {
HSZ hszItem;
} request;
} u;
} WDML_XACT;
typedef struct tagWDML_CONV
{
struct tagWDML_CONV* next; /* to link all the conversations */
struct tagWDML_INSTANCE* thisInstance;
HSZ hszService; /* pmt used for connection */
HSZ hszTopic; /* pmt used for connection */
UINT afCmd; /* service name flag */
CONVCONTEXT convContext;
HWND hwndClient; /* source of conversation (ClientConvClass) */
HWND hwndServer; /* destination of conversation (ServerConvClass) */
WDML_XACT* transactions; /* pending transactions (client only) */
DWORD hUser; /* user defined value */
} WDML_CONV;
/* DDE_LINK struct defines hot, warm, and cold links */
typedef struct tagWDML_LINK {
struct tagWDML_LINK* next; /* to link all the active links */
HCONV hConv; /* to get back to the converstaion */
UINT transactionType;/* 0 for no link */
HSZ hszItem; /* item targetted for (hot/warm) link */
UINT uFmt; /* format for data */
HDDEDATA hDdeData; /* data them selves */
} WDML_LINK;
typedef struct tagWDML_INSTANCE
{
struct tagWDML_INSTANCE* next;
DWORD instanceID; /* needed to track monitor usage */
BOOL monitor; /* have these two as full Booleans cos they'll be tested frequently */
BOOL clientOnly; /* bit wasteful of space but it will be faster */
BOOL unicode; /* Flag to indicate Win32 API used to initialise */
BOOL win16; /* flag to indicate Win16 API used to initialize */
HSZNode* nodeList; /* for cleaning upon exit */
PFNCALLBACK callback;
DWORD CBFflags;
DWORD monitorFlags;
UINT txnCount; /* count transactions open to simplify closure */
DWORD lastError;
HWND hwndEvent;
WDML_SERVER* servers; /* list of registered servers */
WDML_CONV* convs[2]; /* active conversations for this instance (client and server) */
WDML_LINK* links[2]; /* active links for this instance (client and server) */
} WDML_INSTANCE;
extern WDML_INSTANCE* WDML_InstanceList; /* list of created instances, a process can create many */
extern DWORD WDML_MaxInstanceID; /* FIXME: OK for present, may have to worry about wrap-around later */
extern HANDLE handle_mutex;
/* header for the DDE Data objects */
typedef struct tagDDE_DATAHANDLE_HEAD
{
short cfFormat;
} DDE_DATAHANDLE_HEAD;
typedef enum tagWDML_SIDE
{
WDML_CLIENT_SIDE = 0, WDML_SERVER_SIDE = 1
} WDML_SIDE;
/* server calls this. */
extern WDML_SERVER* WDML_AddServer(WDML_INSTANCE* thisInstance, HSZ hszService, HSZ hszTopic);
extern void WDML_RemoveServer(WDML_INSTANCE* thisInstance, HSZ hszService, HSZ hszTopic);
extern WDML_SERVER* WDML_FindServer(WDML_INSTANCE* thisInstance, HSZ hszService, HSZ hszTopic);
/* called both in DdeClientTransaction and server side. */
extern WDML_CONV* WDML_AddConv(WDML_INSTANCE* thisInstance, WDML_SIDE side,
HSZ hszService, HSZ hszTopic, HWND hwndClient, HWND hwndServer);
extern void WDML_RemoveConv(WDML_INSTANCE* thisInstance, WDML_SIDE side, HCONV hConv);
extern WDML_CONV* WDML_GetConv(HCONV hConv);
extern WDML_CONV* WDML_FindConv(WDML_INSTANCE* thisInstance, WDML_SIDE side,
HSZ hszService, HSZ hszTopic);
extern void WDML_AddLink(WDML_INSTANCE* thisInstance, HCONV hConv, WDML_SIDE side,
UINT wType, HSZ hszItem, UINT wFmt);
extern WDML_LINK* WDML_FindLink(WDML_INSTANCE* thisInstance, HCONV hConv, WDML_SIDE side,
HSZ hszItem, UINT uFmt);
extern void WDML_RemoveLink(WDML_INSTANCE* thisInstance, HCONV hConv, WDML_SIDE side,
HSZ hszItem, UINT wFmt);
extern void WDML_RemoveAllLinks(WDML_INSTANCE* thisInstance, HCONV hConv, WDML_SIDE side);
/* client calls these */
extern WDML_XACT* WDML_AllocTransaction(WDML_INSTANCE* thisInstance, UINT ddeMsg);
extern void WDML_QueueTransaction(WDML_CONV* pConv, WDML_XACT* pXAct);
extern BOOL WDML_UnQueueTransaction(WDML_CONV* pConv, WDML_XACT* pXAct);
extern void WDML_FreeTransaction(WDML_XACT* pXAct);
extern WDML_XACT* WDML_FindTransaction(WDML_CONV* pConv, DWORD tid);
extern HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
BOOL fDeferUpd, BOOL dAckReq);
extern HDDEDATA WDML_Global2DataHandle(HGLOBAL hMem);
extern WDML_INSTANCE* WDML_FindInstance(DWORD InstId);
extern BOOL WDML_WaitForMutex(HANDLE mutex);
extern DWORD WDML_ReleaseMutex(HANDLE mutex, LPSTR mutex_name, BOOL release_handle_m);
extern void WDML_FreeAllHSZ(WDML_INSTANCE* thisInstance);
extern void WDML_ReleaseAtom(WDML_INSTANCE* thisInstance, HSZ hsz);
extern void WDML_ReserveAtom(WDML_INSTANCE* thisInstance, HSZ hsz);
/* broadcasting to DDE windows */
extern void WDML_BroadcastDDEWindows(const char* clsName, UINT uMsg,
WPARAM wParam, LPARAM lParam);
extern const char WDML_szEventClass[]; /* class of window for events (aka instance) */
#define WM_WDML_REGISTER (WM_USER + 0x200)
#define WM_WDML_UNREGISTER (WM_USER + 0x201)
#endif /* __WINE_DDEML_PRIVATE_H */
/* -*- tab-width: 8; c-basic-offset: 8 -*- */
/*
* DDEML library
*
* Copyright 1997 Alexandre Julliard
* Copyright 1997 Len White
* Copyright 1999 Keith Matthews
* Copyright 2000 Corel
* Copyright 2001 Eric Pouech
*/
#include <string.h>
#include "winbase.h"
#include "windef.h"
#include "wine/windef16.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "dde.h"
#include "ddeml.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ddeml);
typedef HDDEDATA CALLBACK (*PFNCALLBACK16)(UINT16,UINT16,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
typedef struct
{
UINT16 cb;
UINT16 wFlags;
UINT16 wCountryID;
INT16 iCodePage;
DWORD dwLangID;
DWORD dwSecurity;
} CONVCONTEXT16, *LPCONVCONTEXT16;
typedef struct
{
DWORD cb;
DWORD hUser;
HCONV hConvPartner;
HSZ hszSvcPartner;
HSZ hszServiceReq;
HSZ hszTopic;
HSZ hszItem;
UINT16 wFmt;
UINT16 wType;
UINT16 wStatus;
UINT16 wConvst;
UINT16 wLastError;
HCONVLIST hConvList;
CONVCONTEXT16 ConvCtxt;
} CONVINFO16, *LPCONVINFO16;
/******************************************************************************
* DdeInitialize16 (DDEML.2)
*/
UINT16 WINAPI DdeInitialize16(LPDWORD pidInst, PFNCALLBACK16 pfnCallback,
DWORD afCmd, DWORD ulRes)
{
return (UINT16)DdeInitializeA(pidInst,(PFNCALLBACK)pfnCallback,
afCmd, ulRes);
}
/*****************************************************************
* DdeUninitialize16 (DDEML.3)
*/
BOOL16 WINAPI DdeUninitialize16(DWORD idInst)
{
FIXME(" stub calling DdeUninitialize\n");
return (BOOL16)DdeUninitialize(idInst);
}
/*****************************************************************
* DdeConnectList16 [DDEML.4]
*/
HCONVLIST WINAPI DdeConnectList16(DWORD idInst, HSZ hszService, HSZ hszTopic,
HCONVLIST hConvList, LPCONVCONTEXT16 pCC)
{
return DdeConnectList(idInst, hszService, hszTopic, hConvList,
(LPCONVCONTEXT)pCC);
}
/*****************************************************************
* DdeQueryNextServer16 [DDEML.5]
*/
HCONV WINAPI DdeQueryNextServer16(HCONVLIST hConvList, HCONV hConvPrev)
{
return DdeQueryNextServer(hConvList, hConvPrev);
}
/*****************************************************************
* DdeDisconnectList (DDEML.6)
*/
BOOL16 WINAPI DdeDisconnectList16(HCONVLIST hConvList)
{
return (BOOL16)DdeDisconnectList(hConvList);
}
/*****************************************************************
* DdeQueryString16 (DDEML.23)
*/
DWORD WINAPI DdeQueryString16(DWORD idInst, HSZ hsz, LPSTR lpsz, DWORD cchMax, INT16 codepage)
{
FIXME("(%ld, 0x%x, %p, %ld, %d): stub \n",
idInst, hsz, lpsz, cchMax, codepage);
return 0;
}
/*****************************************************************
* DdeConnect16 (DDEML.7)
*/
HCONV WINAPI DdeConnect16(DWORD idInst, HSZ hszService, HSZ hszTopic,
LPCONVCONTEXT16 pCC16)
{
CONVCONTEXT cc;
CONVCONTEXT* pCC = NULL;
if (pCC16) {
pCC = &cc;
cc.cb = sizeof(cc);
cc.wFlags = pCC16->wFlags;
cc.iCodePage = pCC16->iCodePage;
cc.dwLangID = pCC16->dwLangID;
cc.dwSecurity = pCC16->dwSecurity;
}
return DdeConnect(idInst, hszService, hszTopic, pCC);
}
/*****************************************************************
* DdeDisconnect16 (DDEML.8)
*/
BOOL16 WINAPI DdeDisconnect16(HCONV hConv)
{
return (BOOL16)DdeDisconnect(hConv);
}
/*****************************************************************
* DdeSetUserHandle16 (DDEML.10)
*/
BOOL16 WINAPI DdeSetUserHandle16(HCONV hConv, DWORD id, DWORD hUser)
{
FIXME("(%d,%ld,%ld): stub\n",hConv,id, hUser);
return 0;
}
/*****************************************************************
* DdeCreateDataHandle16 (DDEML.14)
*/
HDDEDATA WINAPI DdeCreateDataHandle16(DWORD idInst, LPBYTE pSrc, DWORD cb,
DWORD cbOff, HSZ hszItem, UINT16 wFmt,
UINT16 afCmd)
{
return DdeCreateDataHandle(idInst, pSrc, cb, cbOff, hszItem, wFmt, afCmd);
}
/*****************************************************************
* DdeCreateStringHandle16 (DDEML.21)
*/
HSZ WINAPI DdeCreateStringHandle16(DWORD idInst, LPCSTR str, INT16 codepage)
{
if (codepage)
{
return DdeCreateStringHandleA(idInst, str, codepage);
} else {
TRACE("Default codepage supplied\n");
return DdeCreateStringHandleA(idInst, str, CP_WINANSI);
}
}
/*****************************************************************
* DdeFreeStringHandle16 (DDEML.22)
*/
BOOL16 WINAPI DdeFreeStringHandle16(DWORD idInst, HSZ hsz)
{
FIXME("idInst %ld hsz 0x%x\n",idInst,hsz);
return (BOOL)DdeFreeStringHandle(idInst, hsz);
}
/*****************************************************************
* DdeFreeDataHandle16 (DDEML.19)
*/
BOOL16 WINAPI DdeFreeDataHandle16(HDDEDATA hData)
{
return (BOOL)DdeFreeDataHandle(hData);
}
/*****************************************************************
* DdeKeepStringHandle16 (DDEML.24)
*/
BOOL16 WINAPI DdeKeepStringHandle16(DWORD idInst, HSZ hsz)
{
return (BOOL)DdeKeepStringHandle(idInst, hsz);
}
/*****************************************************************
* DdeClientTransaction16 (DDEML.11)
*/
HDDEDATA WINAPI DdeClientTransaction16(LPVOID pData, DWORD cbData,
HCONV hConv, HSZ hszItem, UINT16 wFmt,
UINT16 wType, DWORD dwTimeout,
LPDWORD pdwResult)
{
return DdeClientTransaction((LPBYTE)pData, cbData, hConv, hszItem,
wFmt, wType, dwTimeout, pdwResult);
}
/*****************************************************************
*
* DdeAbandonTransaction16 (DDEML.12)
*
*/
BOOL16 WINAPI DdeAbandonTransaction16(DWORD idInst, HCONV hConv,
DWORD idTransaction)
{
FIXME("empty stub\n");
return TRUE;
}
/*****************************************************************
* DdePostAdvise16 [DDEML.13]
*/
BOOL16 WINAPI DdePostAdvise16(DWORD idInst, HSZ hszTopic, HSZ hszItem)
{
return (BOOL16)DdePostAdvise(idInst, hszTopic, hszItem);
}
/*****************************************************************
* DdeAddData16 (DDEML.15)
*/
HDDEDATA WINAPI DdeAddData16(HDDEDATA hData, LPBYTE pSrc, DWORD cb,
DWORD cbOff)
{
return DdeAddData(hData, pSrc, cb, cbOff);
}
/*****************************************************************
* DdeGetData16 [DDEML.16]
*/
DWORD WINAPI DdeGetData16(
HDDEDATA hData,
LPBYTE pDst,
DWORD cbMax,
DWORD cbOff)
{
return DdeGetData(hData, pDst, cbMax, cbOff);
}
/*****************************************************************
* DdeAccessData16 (DDEML.17)
*/
LPBYTE WINAPI DdeAccessData16(HDDEDATA hData, LPDWORD pcbDataSize)
{
return DdeAccessData(hData, pcbDataSize);
}
/*****************************************************************
* DdeUnaccessData16 (DDEML.18)
*/
BOOL16 WINAPI DdeUnaccessData16(HDDEDATA hData)
{
return DdeUnaccessData(hData);
}
/*****************************************************************
* DdeEnableCallback16 (DDEML.26)
*/
BOOL16 WINAPI DdeEnableCallback16(DWORD idInst, HCONV hConv, UINT16 wCmd)
{
return DdeEnableCallback(idInst, hConv, wCmd);
}
/*****************************************************************
* DdeNameService16 (DDEML.27)
*/
HDDEDATA WINAPI DdeNameService16(DWORD idInst, HSZ hsz1, HSZ hsz2,
UINT16 afCmd)
{
return DdeNameService(idInst, hsz1, hsz2, afCmd);
}
/*****************************************************************
* DdeGetLastError16 (DDEML.20)
*/
UINT16 WINAPI DdeGetLastError16(DWORD idInst)
{
return (UINT16)DdeGetLastError(idInst);
}
/*****************************************************************
* DdeCmpStringHandles16 (DDEML.36)
*/
INT16 WINAPI DdeCmpStringHandles16(HSZ hsz1, HSZ hsz2)
{
return DdeCmpStringHandles(hsz1, hsz2);
}
/******************************************************************
* DdeQueryConvInfo16 (DDEML.9)
*
*/
UINT16 WINAPI DdeQueryConvInfo16(HCONV hconv, DWORD idTransaction, LPCONVINFO16 lpConvInfo)
{
FIXME("stub.\n");
return 0;
}
/*
* DDEML 16-bit library definitions
*
* Copyright 1997 Alexandre Julliard
* Copyright 1997 Len White
*/
#ifndef __WINE_WINE_DDEML16_H
#define __WINE_WINE_DDEML16_H
#include "windef.h"
#include "wine/windef16.h"
#define QID_SYNC16 -1L
typedef HDDEDATA CALLBACK (*PFNCALLBACK16)(UINT16,UINT16,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
/***************************************************
Externally visible data structures
***************************************************/
typedef struct
{
UINT16 cb;
UINT16 wFlags;
UINT16 wCountryID;
INT16 iCodePage;
DWORD dwLangID;
DWORD dwSecurity;
} CONVCONTEXT16, *LPCONVCONTEXT16;
typedef struct
{
DWORD cb;
DWORD hUser;
HCONV hConvPartner;
HSZ hszSvcPartner;
HSZ hszServiceReq;
HSZ hszTopic;
HSZ hszItem;
UINT16 wFmt;
UINT16 wType;
UINT16 wStatus;
UINT16 wConvst;
UINT16 wLastError;
HCONVLIST hConvList;
CONVCONTEXT16 ConvCtxt;
} CONVINFO16, *LPCONVINFO16;
/* Interface Definitions */
UINT16 WINAPI DdeInitialize16(LPDWORD,PFNCALLBACK16,DWORD,DWORD);
BOOL16 WINAPI DdeUninitialize16(DWORD);
HCONVLIST WINAPI DdeConnectList16(DWORD,HSZ,HSZ,HCONVLIST,LPCONVCONTEXT16);
HCONV WINAPI DdeQueryNextServer16(HCONVLIST, HCONV);
BOOL16 WINAPI DdeDisconnectList16(HCONVLIST);
HCONV WINAPI DdeConnect16(DWORD,HSZ,HSZ,LPCONVCONTEXT16);
BOOL16 WINAPI DdeDisconnect16(HCONV);
BOOL16 WINAPI DdeSetUserHandle16(HCONV,DWORD,DWORD);
HDDEDATA WINAPI DdeCreateDataHandle16(DWORD,LPBYTE,DWORD,DWORD,HSZ,UINT16,UINT16);
HSZ WINAPI DdeCreateStringHandle16(DWORD,LPCSTR,INT16);
BOOL16 WINAPI DdeFreeStringHandle16(DWORD,HSZ);
BOOL16 WINAPI DdeFreeDataHandle16(HDDEDATA);
BOOL16 WINAPI DdeKeepStringHandle16(DWORD,HSZ);
HDDEDATA WINAPI DdeClientTransaction16(LPVOID,DWORD,HCONV,HSZ,UINT16,UINT16,DWORD,LPDWORD);
BOOL16 WINAPI DdeAbandonTransaction16(DWORD,HCONV,DWORD);
BOOL16 WINAPI DdePostAdvise16(DWORD,HSZ,HSZ);
HDDEDATA WINAPI DdeAddData16(HDDEDATA,LPBYTE,DWORD,DWORD);
LPBYTE WINAPI DdeAccessData16(HDDEDATA,LPDWORD);
BOOL16 WINAPI DdeUnaccessData16(HDDEDATA);
BOOL16 WINAPI DdeEnableCallback16(DWORD,HCONV,UINT16);
INT16 WINAPI DdeCmpStringHandles16(HSZ,HSZ);
HDDEDATA WINAPI DdeNameService16(DWORD,HSZ,HSZ,UINT16);
UINT16 WINAPI DdeGetLastError16(DWORD);
UINT16 WINAPI DdeQueryConvInfo16(HCONV,DWORD,LPCONVINFO16);
#endif /* __WINE_WINE_DDEML16_H */
......@@ -8,7 +8,7 @@ import advapi32.dll
import kernel32.dll
import ntdll.dll
debug_channels (accel caret class clipboard combo cursor dc ddeml dialog driver
debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog driver
edit event graphics hook icon key keyboard listbox local mdi
menu message msg nonclient prop relay resource scroll sendmsg
shell static string syscolor system text timer win win32 wnet)
......@@ -331,7 +331,7 @@ debug_channels (accel caret class clipboard combo cursor dc ddeml dialog driver
@ stdcall GrayStringW(long long ptr long long long long long long) GrayStringW
@ stdcall HideCaret(long) HideCaret
@ stdcall HiliteMenuItem(long long long long) HiliteMenuItem
@ stub ImpersonateDdeClientWindow
@ stdcall ImpersonateDdeClientWindow(long long) ImpersonateDdeClientWindow
@ stdcall InSendMessage() InSendMessage
@ stdcall InSendMessageEx(ptr) InSendMessageEx
@ stdcall InflateRect(ptr long long) InflateRect
......
......@@ -32,7 +32,7 @@ extern "C" {
/* DDEACK: wStatus in WM_DDE_ACK message */
struct tagDDEACK
{
unsigned bAppReturnCode:8, reserved:6, fBusy:1, fAck:1;
unsigned short bAppReturnCode:8, reserved:6, fBusy:1, fAck:1;
};
typedef struct tagDDEACK DDEACK;
......@@ -61,6 +61,11 @@ struct tagDDEPOKE
};
typedef struct tagDDEPOKE DDEPOKE;
BOOL WINAPI DdeSetQualityOfService(HWND hwndClient,
CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
PSECURITY_QUALITY_OF_SERVICE pqosPrev);
BOOL WINAPI ImpersonateDdeClientWindow(HWND hWndClient, HWND hWndServer);
/* lParam packing/unpacking API */
......
......@@ -32,12 +32,49 @@ extern "C" {
#define EXPENTRY CALLBACK
#define SZDDESYS_TOPIC TEXT("System")
#define SZDDESYS_ITEM_TOPICS TEXT("Topics")
#define SZDDESYS_ITEM_SYSITEMS TEXT("SysItems")
#define SZDDESYS_ITEM_RTNMSG TEXT("ReturnMessage")
#define SZDDESYS_ITEM_STATUS TEXT("Status")
#define SZDDESYS_ITEM_FORMATS TEXT("Formats")
#define SZDDESYS_ITEM_HELP TEXT("Help")
#define SZDDE_ITEM_ITEMLIST TEXT("TopicItemList")
/***************************************************
FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
***************************************************/
#define XST_NULL 0
#define XST_INCOMPLETE 1
#define XST_CONNECTED 2
#define XST_INIT1 3
#define XST_INIT2 4
#define XST_REQSENT 5
#define XST_DATARCVD 6
#define XST_POKESENT 7
#define XST_POKEACKRCVD 8
#define XST_EXECSENT 9
#define XST_EXECACKRCVD 10
#define XST_ADVSENT 11
#define XST_UNADVSENT 12
#define XST_ADVACKRCVD 13
#define XST_UNADVACKRCVD 14
#define XST_ADVDATASENT 15
#define XST_ADVDATAACKRCVD 16
#define ST_CONNECTED 0x0001
#define ST_ADVISE 0x0002
#define ST_ISLOCAL 0x0004
#define ST_BLOCKED 0x0008
#define ST_CLIENT 0x0010
#define ST_TERMINATED 0x0020
#define ST_INLIST 0x0040
#define ST_BLOCKNEXT 0x0080
#define ST_ISSELF 0x0100
/*
* Callback filter flags for use with standard apps.
*/
......@@ -138,6 +175,8 @@ extern "C" {
#define XTYP_MASK 0x00F0
#define XTYP_SHIFT 4
#define TIMEOUT_ASYNC 0xFFFFFFFF
/**************************************************
End of Message Types Section
......@@ -159,6 +198,10 @@ extern "C" {
#define DDE_FAPPSTATUS 0x00FF
#define DDE_FNOTPROCESSED 0x0000
#define DDE_FACKRESERVED (~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS))
#define DDE_FADVRESERVED (~(DDE_FACKREQ | DDE_FDEFERUPD))
#define DDE_FDATRESERVED (~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED))
#define DDE_FPOKRESERVED (~(DDE_FRELEASE))
/*****************************************************
......@@ -197,6 +240,8 @@ extern "C" {
#define DMLERR_LAST 0x4011
#define HDATA_APPOWNED 0x0001
/*****************************************************
End of Return Codes and Microsoft section
......@@ -205,10 +250,10 @@ extern "C" {
DECLARE_OLD_HANDLE(HCONVLIST);
DECLARE_OLD_HANDLE(HCONV);
DECLARE_OLD_HANDLE(HSZ);
DECLARE_OLD_HANDLE(HDDEDATA);
DECLARE_HANDLE(HCONVLIST);
DECLARE_HANDLE(HCONV);
DECLARE_HANDLE(HSZ);
DECLARE_HANDLE(HDDEDATA);
......@@ -218,8 +263,8 @@ DECLARE_OLD_HANDLE(HDDEDATA);
*******************************************************/
typedef HDDEDATA CALLBACK (*PFNCALLBACK)(UINT,UINT,HCONV,HSZ,HSZ,
HDDEDATA,DWORD,DWORD);
typedef HDDEDATA CALLBACK (*PFNCALLBACK)(UINT, UINT, HCONV, HSZ, HSZ,
HDDEDATA, DWORD, DWORD);
/***************************************************
......@@ -227,7 +272,13 @@ typedef HDDEDATA CALLBACK (*PFNCALLBACK)(UINT,UINT,HCONV,HSZ,HSZ,
***************************************************/
typedef struct
typedef struct tagHSZPAIR
{
HSZ hszSvc;
HSZ hszTopic;
} HSZPAIR, *PHSZPAIR, *LPHSZPAIR;
typedef struct tagCONVCONTEXT
{
UINT cb;
UINT wFlags;
......@@ -237,7 +288,7 @@ typedef struct
DWORD dwSecurity;
} CONVCONTEXT, *LPCONVCONTEXT;
typedef struct
typedef struct tagCONVINFO
{
DWORD cb;
DWORD hUser;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment