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

register.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

VOID SendRegisterMessageToClass (ATOM atomClass, UINT msg, GATOM ga, HWND hwndFrom, BOOL fPost)
VOID RegisterService (BOOL fRegister, GATOM gaApp, HWND hwndListen)
LRESULT ProcessRegistrationMessage (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)


Function Documentation

LRESULT ProcessRegistrationMessage HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam
 

Definition at line 90 of file register.c.

References tagCL_INSTANCE_INFO::afCmd, CheckDDECritOut, DoCallback(), EnterDDECrit, GATOM, GetWindowLongPtr(), GlobalToLocalAtom(), GWLP_INSTANCE_INFO, HMValidateHandleNoRip(), INST_SPECIFIC_HSZ_FROM_LATOM, L, LATOM, LeaveDDECrit, MakeInstSpecificAtom(), msg, NORMAL_HSZ_FROM_LATOM, NULL, PtoH, and TYPE_WINDOW.

Referenced by DDEMLMotherWndProc().

00095 { 00096 PCL_INSTANCE_INFO pcii; 00097 LRESULT lRet = 0; 00098 00099 CheckDDECritOut; 00100 00101 /* 00102 * wParam = GATOM of app 00103 * lParam = hwndListen of source - may be a WOW DDEML source unthunked. 00104 */ 00105 lParam = (LPARAM)HMValidateHandleNoRip((HWND)lParam, TYPE_WINDOW); 00106 lParam = (LPARAM)PtoH((PVOID)lParam); 00107 00108 if (lParam == 0) { 00109 return(0); 00110 } 00111 00112 EnterDDECrit; 00113 00114 pcii = (PCL_INSTANCE_INFO)GetWindowLongPtr(hwnd, GWLP_INSTANCE_INFO); 00115 if (pcii != NULL && 00116 !((msg == UM_REGISTER) && (pcii->afCmd & CBF_SKIP_REGISTRATIONS)) && 00117 !((msg == UM_UNREGISTER) && (pcii->afCmd & CBF_SKIP_UNREGISTRATIONS))) { 00118 00119 LATOM la, lais; 00120 00121 la = GlobalToLocalAtom((GATOM)wParam); 00122 lais = MakeInstSpecificAtom(la, (HWND)lParam); 00123 00124 DoCallback(pcii, 00125 (WORD)((msg == UM_REGISTER) ? XTYP_REGISTER : XTYP_UNREGISTER), 00126 0, 00127 (HCONV)0L, 00128 (HSZ)NORMAL_HSZ_FROM_LATOM(la), 00129 INST_SPECIFIC_HSZ_FROM_LATOM(lais), 00130 (HDDEDATA)0L, 00131 0L, 00132 0L); 00133 00134 DeleteAtom(la); 00135 DeleteAtom(lais); 00136 lRet = 1; 00137 } 00138 00139 GlobalDeleteAtom((ATOM)wParam); // receiver frees 00140 LeaveDDECrit; 00141 return(1); 00142 }

VOID RegisterService BOOL  fRegister,
GATOM  gaApp,
HWND  hwndListen
 

Definition at line 68 of file register.c.

References tagSERVERINFO::atomSysClass, CheckDDECritOut, gpsi, ICLS_DDEML16BIT, ICLS_DDEMLMOTHER, SendRegisterMessageToClass(), and VOID().

Referenced by DdeNameService().

00072 { 00073 CheckDDECritOut; 00074 00075 /* 00076 * Send notification to each DDEML32 listening window. 00077 */ 00078 SendRegisterMessageToClass(gpsi->atomSysClass[ICLS_DDEMLMOTHER], fRegister ? UM_REGISTER : UM_UNREGISTER, 00079 gaApp, hwndListen, fRegister); 00080 /* 00081 * Send notification to each DDEML16 listening window. 00082 */ 00083 SendRegisterMessageToClass(gpsi->atomSysClass[ICLS_DDEML16BIT], fRegister ? UM_REGISTER : UM_UNREGISTER, 00084 gaApp, hwndListen, fRegister); 00085 }

VOID SendRegisterMessageToClass ATOM  atomClass,
UINT  msg,
GATOM  ga,
HWND  hwndFrom,
BOOL  fPost
 

Definition at line 30 of file register.c.

References tagCLS::atomClassName, GetDesktopWindow(), GetWindow(), IncGlobalAtomCount(), msg, NULL, PostMessage(), REBASEALWAYS, SendMessage(), ValidateHwndNoRip(), and VOID().

Referenced by RegisterService().

00036 { 00037 HWND hwnd; 00038 PWND pwnd; 00039 PCLS pcls; 00040 00041 hwnd = GetWindow(GetDesktopWindow(), GW_CHILD); 00042 while (hwnd != NULL) { 00043 pwnd=ValidateHwndNoRip(hwnd); 00044 if (pwnd) { 00045 pcls = (PCLS)REBASEALWAYS(pwnd, pcls); 00046 if (pcls->atomClassName == atomClass) { 00047 IncGlobalAtomCount(ga); // receiver frees 00048 if (fPost) { 00049 PostMessage(hwnd, msg, (WPARAM)ga, (LPARAM)hwndFrom); 00050 } else { 00051 SendMessage(hwnd, msg, (WPARAM)ga, (LPARAM)hwndFrom); 00052 } 00053 } 00054 } 00055 hwnd = GetWindow(hwnd, GW_HWNDNEXT); 00056 } 00057 }


Generated on Sat May 15 19:45:27 2004 for test by doxygen 1.3.7