Plan 9 from User Space's /usr/local/plan9/9pm/src/libwindows/CreateEvent.c

#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>

HANDLE WINAPI
CreateEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
	BOOL bInitialState, LPCWSTR lpName)
{
	char *name;
	HANDLE h;

	if(win_useunicode)
		return CreateEventW(lpEventAttributes, bManualReset,
			bInitialState, lpName);

	name = win_wstr2utf(lpName);
	h = CreateEventA(lpEventAttributes, bManualReset,
			bInitialState, name);
	win_free(name);
	return h;
}

Space Glenda

Copyright © 2005 Lucent Technologies, Russ Cox, MIT.
See license for details.