summaryrefslogtreecommitdiffstats
path: root/private/unimodem/new/slot/client.c
blob: c77d385ee3300b229ae436be72ebde5e572398b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//****************************************************************************
//
//  Module:     UNIMDM
//  File:       SLOT.C
//
//  Copyright (c) 1992-1996, Microsoft Corporation, all rights reserved
//
//  Revision History
//
//
//  3/25/96     JosephJ             Created
//
//
//  Description: Implements the unimodem TSP notification mechanism:
//				 The higher level API: UnimodemNotifyTSP()
//
//****************************************************************************
#define UNICODE
#include <windows.h>
#include "slot.h"
#include "..\..\inc\tspnotif.h"


BOOL WINAPI UnimodemNotifyTSP(PNOTIFICATION_FRAME pnf)
{
	BOOL fRet=FALSE;
    HNOTIFICATION hN=0;
	
	if (pnf->dwSig!=dwNFRAME_SIG || pnf->dwSize<sizeof(*pnf) ||
			pnf->dwSize>MAX_NOTIFICATION_FRAME_SIZE)
	{
		SetLastError(ERROR_INVALID_PARAMETER);
		goto end;
	}

	hN = notifCreate(FALSE, SLOTNAME_UNIMODEM_NOTIFY_TSP, 0, 0);

	if (hN)
	{
		fRet = notifWriteMsg(hN, (LPBYTE) pnf, pnf->dwSize);
		notifFree(hN); hN=0;
	}

end:

	return fRet;
}