ReactOS 0.4.16-dev-125-g798ea90
|
#include <stdio.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <conutils.h>
#include <strsafe.h>
#include "resource.h"
Go to the source code of this file.
Classes | |
struct | _OPTION |
Macros | |
#define | EVENT_ID_MIN 0 |
#define | EVENT_ID_MAX 65535 |
#define | APPLICATION_NAME L"EventCreate" |
#define | MAX_KEY_LENGTH 255 |
#define | OPTION_ALLOWED_LIST 0x01 |
#define | OPTION_NOT_EMPTY 0x02 |
#define | OPTION_TRIM_SPACE 0x04 |
#define | OPTION_EXCLUSIVE 0x08 |
#define | OPTION_MANDATORY 0x10 |
#define | NEW_OPT(Name, Type, Flags, MaxOfInstances, ValueSize, ValueBuffer) {(Name), (Type), (Flags), (MaxOfInstances), NULL, NULL, 0, (ValueSize), (ValueBuffer)} |
#define | NEW_OPT_EX(Name, Type, Flags, AllowedValues, MaxOfInstances, ValueSize, ValueBuffer) {(Name), (Type), (Flags), (MaxOfInstances), (AllowedValues), NULL, 0, (ValueSize), (ValueBuffer)} |
#define | OPT_SYSTEM (Options[1]) |
#define | OPT_USER (Options[2]) |
#define | OPT_PASSWD (Options[3]) |
#define | OPT_EVTID (Options[8]) |
Typedefs | |
typedef struct _OPTION | OPTION |
typedef struct _OPTION * | POPTION |
typedef enum _PARSER_ERROR | PARSER_ERROR |
typedef VOID(__cdecl * | PRINT_ERROR_FUNC) (IN PARSER_ERROR,...) |
Enumerations | |
enum | TYPE { TYPE_None = 0 , TYPE_Str , TYPE_U32 } |
enum | _PARSER_ERROR { Success = 0 , InvalidSyntax , InvalidOption , ValueRequired , ValueIsEmpty , InvalidValue , ValueNotAllowed , TooManySameOption , MandatoryOptionAbsent } |
Functions | |
VOID | PrintError (DWORD dwError) |
static BOOL | GetUserToken (OUT PTOKEN_USER *ppUserToken) |
static LONG | InstallEventSource (IN HKEY hEventLogKey, IN LPCWSTR EventLogSource) |
static BOOL | CheckLogOrSourceExistence (IN LPCWSTR UNCServerName OPTIONAL, IN LPCWSTR EventLogName, IN LPCWSTR EventLogSource, IN BOOL AllowAppSources OPTIONAL) |
static PWSTR | TrimLeftRightWhitespace (IN PWSTR String) |
BOOL | DoParse (IN INT argc, IN WCHAR *argv[], IN OUT POPTION Options, IN ULONG NumOptions, IN PRINT_ERROR_FUNC PrintErrorFunc OPTIONAL) |
static VOID __cdecl | PrintParserError (PARSER_ERROR Error,...) |
int | wmain (int argc, WCHAR *argv[]) |
#define APPLICATION_NAME L"EventCreate" |
Definition at line 108 of file eventcreate.c.
#define EVENT_ID_MAX 65535 |
Definition at line 102 of file eventcreate.c.
#define EVENT_ID_MIN 0 |
Definition at line 101 of file eventcreate.c.
#define MAX_KEY_LENGTH 255 |
#define NEW_OPT | ( | Name, | |
Type, | |||
Flags, | |||
MaxOfInstances, | |||
ValueSize, | |||
ValueBuffer | |||
) | {(Name), (Type), (Flags), (MaxOfInstances), NULL, NULL, 0, (ValueSize), (ValueBuffer)} |
Definition at line 684 of file eventcreate.c.
#define NEW_OPT_EX | ( | Name, | |
Type, | |||
Flags, | |||
AllowedValues, | |||
MaxOfInstances, | |||
ValueSize, | |||
ValueBuffer | |||
) | {(Name), (Type), (Flags), (MaxOfInstances), (AllowedValues), NULL, 0, (ValueSize), (ValueBuffer)} |
Definition at line 687 of file eventcreate.c.
#define OPTION_ALLOWED_LIST 0x01 |
Definition at line 660 of file eventcreate.c.
#define OPTION_EXCLUSIVE 0x08 |
Definition at line 663 of file eventcreate.c.
#define OPTION_MANDATORY 0x10 |
Definition at line 664 of file eventcreate.c.
#define OPTION_NOT_EMPTY 0x02 |
Definition at line 661 of file eventcreate.c.
#define OPTION_TRIM_SPACE 0x04 |
Definition at line 662 of file eventcreate.c.
typedef enum _PARSER_ERROR PARSER_ERROR |
typedef VOID(__cdecl * PRINT_ERROR_FUNC) (IN PARSER_ERROR,...) |
Definition at line 723 of file eventcreate.c.
Enumerator | |
---|---|
Success | |
InvalidSyntax | |
InvalidOption | |
ValueRequired | |
ValueIsEmpty | |
InvalidValue | |
ValueNotAllowed | |
TooManySameOption | |
MandatoryOptionAbsent |
Definition at line 710 of file eventcreate.c.
Enumerator | |
---|---|
TYPE_None | |
TYPE_Str | |
TYPE_U32 |
Definition at line 651 of file eventcreate.c.
|
static |
Definition at line 260 of file eventcreate.c.
Referenced by wmain().
BOOL DoParse | ( | IN INT | argc, |
IN WCHAR * | argv[], | ||
IN OUT POPTION | Options, | ||
IN ULONG | NumOptions, | ||
IN PRINT_ERROR_FUNC PrintErrorFunc | OPTIONAL | ||
) |
FIXME: This test is problematic if this concerns the last option in the command-line! A hack-fix is to repeat this check after the 'for'-loop.
HACK-fix for the check done inside the 'for'-loop.
Definition at line 726 of file eventcreate.c.
Referenced by wmain().
|
static |
Definition at line 123 of file eventcreate.c.
Referenced by wmain().
Definition at line 178 of file eventcreate.c.
Referenced by CheckLogOrSourceExistence().
Definition at line 111 of file eventcreate.c.
Referenced by CheckLogOrSourceExistence(), and wmain().
|
static |
Definition at line 996 of file eventcreate.c.
Referenced by wmain().
Definition at line 691 of file eventcreate.c.
Referenced by DoParse().
Definition at line 1029 of file eventcreate.c.