|
Definition at line 45 of file rtflush.c.
References exit, L, NT_SUCCESS, NtClose(), NtFlushKey(), NtOpenKey(), NTSTATUS(), NULL, ObjectAttributes, processargs(), WORK_SIZE, workbuffer, and WorkName.
00049 {
00050 NTSTATUS status;
00051 OBJECT_ATTRIBUTES ObjectAttributes;
00052 HANDLE BaseHandle;
00053
00054
00055
00056
00057
00058 WorkName.MaximumLength = WORK_SIZE;
00059 WorkName.Length = 0 L;
00060 WorkName.Buffer = &( workbuffer[0]);
00061
00062 processargs(argc, argv);
00063
00064
00065
00066
00067
00068
00069 printf( "rtflush: starting\n");
00070
00071 InitializeObjectAttributes(
00072 &ObjectAttributes,
00073 &WorkName,
00074 0,
00075 (HANDLE)NULL,
00076 NULL
00077 );
00078 ObjectAttributes.Attributes |= OBJ_CASE_INSENSITIVE;
00079
00080 status = NtOpenKey(
00081 &BaseHandle,
00082 MAXIMUM_ALLOWED,
00083 &ObjectAttributes
00084 );
00085 if (! NT_SUCCESS(status)) {
00086 printf( "rtflush: t0: %08lx\n", status);
00087 exit(1);
00088 }
00089
00090 status = NtFlushKey(BaseHandle);
00091 if (! NT_SUCCESS(status)) {
00092 printf( "rtflush: t0: %08lx\n", status);
00093 exit(1);
00094 }
00095
00096 NtClose(BaseHandle);
00097 exit(0);
00098 }
|