Exemplo n.º 1
0
/***************************************************************************\
* xxxEventWndProc
*
* Description:
*   Window proc for DDEML event windows.  These windows serve to get user
*   into the proper context for callbacks to DDEML applications.
*
* History:
* 11-1-91   sanfords    Created.
\***************************************************************************/
LRESULT xxxEventWndProc(
PWND pwnd,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
    PSVR_INSTANCE_INFO psii;

    CheckCritIn();
    CheckLock(pwnd);

    psii = HMValidateHandleNoRip((HANDLE)_GetWindowLongPtr(pwnd, GWLP_PSII),
                                 TYPE_DDEACCESS);
    if (psii == NULL) {
        goto CallDWP;
    }

    switch (message) {
    case WM_DDEMLEVENT:
#define pep ((PEVENT_PACKET)lParam)
        if (((psii->afCmd & pep->EventType) && pep->fSense) ||
                (!(psii->afCmd & pep->EventType) && !pep->fSense)) {
            ClientEventCallback(psii->pcii, pep);
        }
#undef pep
        break;

    case WM_DESTROY:
        xxxChangeMonitorFlags(psii, 0);
        break;

    default:
CallDWP:
        return xxxDefWindowProc(pwnd, message, wParam, lParam);
    }
    return 0;
}
Exemplo n.º 2
0
PVOID ZHMValidateHandleNoRip(HANDLE h, BYTE b ) 
{
    return HMValidateHandleNoRip(h, b )  ;
}