You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
856 B
32 lines
856 B
// ----------------------------------------------------------------------------
|
|
//
|
|
// Event.c
|
|
//
|
|
//
|
|
// Author: Jost Eckhardt
|
|
//
|
|
// This code was written for ECO Kommunikation Insight
|
|
// (c) 1997-99 ECO Kommunikation
|
|
// ----------------------------------------------------------------------------
|
|
#include <windows.h>
|
|
#include <TCHAR.h>
|
|
#include <WinSvc.h>
|
|
#include "_UMTool.h"
|
|
// -----------------------
|
|
HANDLE BuildEvent(LPTSTR name,BOOL manualRest,BOOL initialState,BOOL inherit)
|
|
{
|
|
HANDLE ev;
|
|
LPSECURITY_ATTRIBUTES psa = NULL;
|
|
obj_sec_attr_ts sa;
|
|
if (!name)
|
|
return CreateEvent(NULL, manualRest, initialState, NULL);
|
|
if (inherit)
|
|
{
|
|
psa = &sa.sa;
|
|
InitSecurityAttributes(&sa);
|
|
}
|
|
ev = CreateEvent(psa, manualRest, initialState, name);
|
|
if (inherit)
|
|
ClearSecurityAttributes(&sa);
|
|
return ev;
|
|
}//BuildEvent
|