mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Alex finally paid attention to my code, so I'm fixing a few things...
svn path=/trunk/; revision=22301
This commit is contained in:
parent
3e3f927b36
commit
325be5eb8d
2 changed files with 9 additions and 5 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Some macros, structs, and vars are based or inspired from the great
|
Some macros, structs, and vars are based or inspired from the great
|
||||||
|
|
|
@ -67,6 +67,7 @@ HANDLE DirectoryHandle;
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* PRIVATE FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
NTAPI
|
||||||
DumpProc(IN PVOID Object,
|
DumpProc(IN PVOID Object,
|
||||||
IN POB_DUMP_CONTROL DumpControl)
|
IN POB_DUMP_CONTROL DumpControl)
|
||||||
{
|
{
|
||||||
|
@ -75,6 +76,7 @@ DumpProc(IN PVOID Object,
|
||||||
|
|
||||||
// prototype doesn't match Win2003! (causes BSOD)
|
// prototype doesn't match Win2003! (causes BSOD)
|
||||||
VOID
|
VOID
|
||||||
|
NTAPI
|
||||||
OpenProc(IN OB_OPEN_REASON OpenReason,
|
OpenProc(IN OB_OPEN_REASON OpenReason,
|
||||||
IN PEPROCESS Process,
|
IN PEPROCESS Process,
|
||||||
IN PVOID Object,
|
IN PVOID Object,
|
||||||
|
@ -87,6 +89,7 @@ OpenProc(IN OB_OPEN_REASON OpenReason,
|
||||||
|
|
||||||
// Tested in Win2k3
|
// Tested in Win2k3
|
||||||
VOID
|
VOID
|
||||||
|
NTAPI
|
||||||
CloseProc(IN PEPROCESS Process,
|
CloseProc(IN PEPROCESS Process,
|
||||||
IN PVOID Object,
|
IN PVOID Object,
|
||||||
IN ACCESS_MASK GrantedAccess,
|
IN ACCESS_MASK GrantedAccess,
|
||||||
|
@ -98,12 +101,14 @@ CloseProc(IN PEPROCESS Process,
|
||||||
|
|
||||||
// Tested in Win2k3
|
// Tested in Win2k3
|
||||||
VOID
|
VOID
|
||||||
|
NTAPI
|
||||||
DeleteProc(IN PVOID Object)
|
DeleteProc(IN PVOID Object)
|
||||||
{
|
{
|
||||||
DPRINT("DeleteProc() called for Object=0x%p\n", Object);
|
DPRINT("DeleteProc() called for Object=0x%p\n", Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
ParseProc(IN PVOID ParseObject,
|
ParseProc(IN PVOID ParseObject,
|
||||||
IN PVOID ObjectType,
|
IN PVOID ObjectType,
|
||||||
IN OUT PACCESS_STATE AccessState,
|
IN OUT PACCESS_STATE AccessState,
|
||||||
|
@ -124,16 +129,14 @@ ObtCreateObjectTypes()
|
||||||
{
|
{
|
||||||
USHORT i;
|
USHORT i;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
WCHAR Name[15];
|
||||||
|
|
||||||
for (i=0; i<NUM_OBTYPES; i++)
|
for (i=0; i<NUM_OBTYPES; i++)
|
||||||
{
|
{
|
||||||
// Prepare object type name
|
// Prepare object type name
|
||||||
// TODO: Generate type names and don't use this unprofessional,
|
// TODO: Generate type names and don't use this unprofessional,
|
||||||
// ugly looking, and otherwise bad if-condition
|
swprintf(Name, L"MyObjectType%lx", i);
|
||||||
if (i == 0)
|
RtlInitUnicodeString(&ObTypeName[i], Name);
|
||||||
RtlInitUnicodeString(&ObTypeName[i], L"MyObjectType1");
|
|
||||||
else
|
|
||||||
RtlInitUnicodeString(&ObTypeName[i], L"MyObjectType2");
|
|
||||||
|
|
||||||
// Prepare initializer
|
// Prepare initializer
|
||||||
RtlZeroMemory(&ObTypeInitializer[i], sizeof(ObTypeInitializer[i]));
|
RtlZeroMemory(&ObTypeInitializer[i], sizeof(ObTypeInitializer[i]));
|
||||||
|
|
Loading…
Reference in a new issue