mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
Added a magic number to the WDML_CONV structure to fix some failing
tests.
This commit is contained in:
parent
c5c6968e96
commit
c61f11eadf
@ -1742,6 +1742,7 @@ WDML_CONV* WDML_AddConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
|
||||
pConv->instance = pInstance;
|
||||
WDML_IncHSZ(pInstance, pConv->hszService = hszService);
|
||||
WDML_IncHSZ(pInstance, pConv->hszTopic = hszTopic);
|
||||
pConv->magic = WDML_CONV_MAGIC;
|
||||
pConv->hwndServer = hwndServer;
|
||||
pConv->hwndClient = hwndClient;
|
||||
pConv->transactions = NULL;
|
||||
@ -1835,7 +1836,7 @@ void WDML_RemoveConv(WDML_CONV* pRef, WDML_SIDE side)
|
||||
{
|
||||
pPrev->next = pCurrent->next;
|
||||
}
|
||||
|
||||
pCurrent->magic = 0;
|
||||
HeapFree(GetProcessHeap(), 0, pCurrent);
|
||||
break;
|
||||
}
|
||||
@ -1913,7 +1914,7 @@ WDML_CONV* WDML_GetConv(HCONV hConv, BOOL checkConnected)
|
||||
WDML_CONV* pConv = (WDML_CONV*)hConv;
|
||||
|
||||
/* FIXME: should do better checking */
|
||||
if (pConv == NULL) return NULL;
|
||||
if (pConv == NULL || pConv->magic != WDML_CONV_MAGIC) return NULL;
|
||||
|
||||
if (checkConnected && !(pConv->wStatus & ST_CONNECTED))
|
||||
{
|
||||
|
@ -127,6 +127,7 @@ typedef struct tagWDML_CONV
|
||||
struct tagWDML_INSTANCE* instance;
|
||||
HSZ hszService; /* pmt used for connection */
|
||||
HSZ hszTopic; /* pmt used for connection */
|
||||
UINT magic; /* magic number to check validity */
|
||||
UINT afCmd; /* service name flag */
|
||||
CONVCONTEXT convContext;
|
||||
HWND hwndClient; /* source of conversation (ClientConvClass) */
|
||||
@ -137,6 +138,8 @@ typedef struct tagWDML_CONV
|
||||
DWORD wConvst; /* same values as convinfo.wConvst */
|
||||
} WDML_CONV;
|
||||
|
||||
#define WDML_CONV_MAGIC 0xbabe1234
|
||||
|
||||
/* DDE_LINK struct defines hot, warm, and cold links */
|
||||
typedef struct tagWDML_LINK {
|
||||
struct tagWDML_LINK* next; /* to link all the active links */
|
||||
|
Loading…
Reference in New Issue
Block a user