Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ddemlsvr.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

DWORD xxxCsDdeInitialize (PHANDLE phInst, HWND *phwndEvent, LPDWORD pMonitorFlags, DWORD afCmd, PVOID pcii)
DWORD _CsUpdateInstance (HANDLE hInst, LPDWORD pMonitorFlags, DWORD afCmd)
BOOL _CsDdeUninitialize (HANDLE hInst)
VOID xxxDestroyThreadDDEObject (PTHREADINFO pti, PSVR_INSTANCE_INFO psii)

Variables

PSVR_INSTANCE_INFO psiiList


Function Documentation

BOOL _CsDdeUninitialize HANDLE  hInst  ) 
 

Definition at line 110 of file ddemlsvr.c.

References BOOL, CheckCritIn, hInst, HMValidateHandleNoRip(), NULL, PtiCurrent, TRUE, TYPE_DDEACCESS, and xxxDestroyThreadDDEObject().

00112 { 00113 PSVR_INSTANCE_INFO psii; 00114 00115 CheckCritIn(); 00116 00117 psii = HMValidateHandleNoRip(hInst, TYPE_DDEACCESS); 00118 if (psii == NULL) { 00119 return TRUE; 00120 } 00121 00122 xxxDestroyThreadDDEObject(PtiCurrent(), psii); 00123 return TRUE; 00124 }

DWORD _CsUpdateInstance HANDLE  hInst,
LPDWORD  pMonitorFlags,
DWORD  afCmd
 

Definition at line 88 of file ddemlsvr.c.

References CheckCritIn, DWORD, hInst, HMValidateHandleNoRip(), MonitorFlags, NULL, TYPE_DDEACCESS, and xxxChangeMonitorFlags().

Referenced by NtUserUpdateInstance().

00092 { 00093 PSVR_INSTANCE_INFO psii; 00094 00095 CheckCritIn(); 00096 00097 psii = (PSVR_INSTANCE_INFO)HMValidateHandleNoRip(hInst, TYPE_DDEACCESS); 00098 if (psii == NULL) { 00099 return DMLERR_INVALIDPARAMETER; 00100 } 00101 xxxChangeMonitorFlags(psii, afCmd); 00102 *pMonitorFlags = MonitorFlags; 00103 return DMLERR_NO_ERROR; 00104 }

DWORD xxxCsDdeInitialize PHANDLE  phInst,
HWND *  phwndEvent,
LPDWORD  pMonitorFlags,
DWORD  afCmd,
PVOID  pcii
 

Definition at line 19 of file ddemlsvr.c.

References tagSERVERINFO::atomSysClass, CheckCritIn, CW_FLAGS_DIFFHMOD, DWORD, FALSE, gpsi, GWLP_PSII, HMAllocObject(), HMFreeObject(), hModuleWin, ICLS_DDEMLEVENT, Lock, MonitorFlags, tagSVR_INSTANCE_INFO::nextInThisThread, NULL, psiiList, tagTHREADINFO::psiiList, PtiCurrent, PtoH, tagSVR_INSTANCE_INFO::spwndEvent, SVR_INSTANCE_INFO, TYPE_DDEACCESS, VER31, xxxChangeMonitorFlags(), xxxCreateWindowEx(), and xxxSetWindowLongPtr.

Referenced by NtUserDdeInitialize().

00025 { 00026 PSVR_INSTANCE_INFO psii; 00027 PTHREADINFO ptiCurrent = PtiCurrent(); 00028 00029 CheckCritIn(); 00030 00031 psii = (PSVR_INSTANCE_INFO)HMAllocObject(PtiCurrent(), NULL, 00032 TYPE_DDEACCESS, sizeof(SVR_INSTANCE_INFO)); 00033 if (psii == NULL) { 00034 return DMLERR_SYS_ERROR; 00035 } 00036 00037 /* 00038 * We have to tell CreateWindow that window is not created for the same 00039 * module has the app, (CW_FLAGS_DIFFHMOD), so CreateWindow doesn't 00040 * assign a hotkey to this window. Other window are done in the 00041 * client-server thunk 00042 */ 00043 Lock(&(psii->spwndEvent), xxxCreateWindowEx( 00044 0, 00045 (PLARGE_STRING)gpsi->atomSysClass[ICLS_DDEMLEVENT], 00046 NULL, 00047 WS_POPUP | WS_CHILD, 00048 0, 0, 0, 0, 00049 (PWND)NULL, 00050 (PMENU)NULL, 00051 hModuleWin, 00052 NULL, 00053 CW_FLAGS_DIFFHMOD | VER31)); 00054 00055 if (psii->spwndEvent == NULL) { 00056 HMFreeObject((PVOID)psii); 00057 return DMLERR_SYS_ERROR; 00058 } 00059 /* 00060 * This GWL offset does NOT leave the critical section! 00061 */ 00062 xxxSetWindowLongPtr(psii->spwndEvent, GWLP_PSII, (LONG_PTR)PtoH(psii), FALSE); 00063 psii->afCmd = 0; 00064 psii->pcii = pcii; 00065 // 00066 // Link into global list 00067 // 00068 psii->next = psiiList; 00069 psiiList = psii; 00070 00071 // 00072 // Link into per-process list 00073 // 00074 psii->nextInThisThread = ptiCurrent->psiiList; 00075 ptiCurrent->psiiList = psii; 00076 00077 *phInst = PtoH(psii); 00078 *phwndEvent = PtoH(psii->spwndEvent); 00079 xxxChangeMonitorFlags(psii, afCmd); // sets psii->afCmd; 00080 *pMonitorFlags = MonitorFlags; 00081 return DMLERR_NO_ERROR; 00082 }

VOID xxxDestroyThreadDDEObject PTHREADINFO  pti,
PSVR_INSTANCE_INFO  psii
 

Definition at line 127 of file ddemlsvr.c.

References CheckCritIn, HMFreeObject(), HMIsMarkDestroy, HMMarkObjectDestroy(), tagSVR_INSTANCE_INFO::next, tagSVR_INSTANCE_INFO::nextInThisThread, NULL, psiiList, tagTHREADINFO::psiiList, tagSVR_INSTANCE_INFO::spwndEvent, Unlock, VOID(), and xxxDestroyWindow().

Referenced by _CsDdeUninitialize(), NtUserDdeInitialize(), and xxxDestroyThreadInfo().

00130 { 00131 PSVR_INSTANCE_INFO psiiT; 00132 00133 CheckCritIn(); 00134 00135 if (HMIsMarkDestroy(psii)) { 00136 return; 00137 } 00138 00139 // 00140 // Unlink psii from the global list. 00141 // 00142 if (psii == psiiList) { 00143 psiiList = psii->next; 00144 } else { 00145 for (psiiT = psiiList; psiiT->next != psii; psiiT = psiiT->next) { 00146 UserAssert(psiiT->next != NULL); 00147 } 00148 psiiT->next = psii->next; 00149 } 00150 // psii->next = NULL; 00151 00152 // 00153 // Unlink psii from the per-process list. 00154 // 00155 if (psii == pti->psiiList) { 00156 pti->psiiList = psii->nextInThisThread; 00157 } else { 00158 for (psiiT = pti->psiiList; psiiT->nextInThisThread != psii; psiiT = psiiT->nextInThisThread) { 00159 UserAssert(psiiT->nextInThisThread != NULL); 00160 } 00161 psiiT->nextInThisThread = psii->nextInThisThread; 00162 } 00163 // psii->nextInThisThread = NULL; 00164 00165 if (HMMarkObjectDestroy(psii)) { 00166 xxxDestroyWindow(psii->spwndEvent); 00167 Unlock(&(psii->spwndEvent)); 00168 00169 HMFreeObject(psii); 00170 } 00171 }


Variable Documentation

PSVR_INSTANCE_INFO psiiList
 

Definition at line 17 of file ddemlsvr.c.

Referenced by xxxCsDdeInitialize(), xxxCsEvent(), and xxxDestroyThreadDDEObject().


Generated on Sat May 15 19:43:24 2004 for test by doxygen 1.3.7