Author: fireball
Date: Sun Jun 11 01:17:43 2006
New Revision: 22301
URL:
http://svn.reactos.ru/svn/reactos?rev=22301&view=rev
Log:
Alex finally paid attention to my code, so I'm fixing a few things...
Modified:
trunk/reactos/drivers/test/kmtest/kmtest.h
trunk/reactos/drivers/test/kmtest/ntos_ob.c
Modified: trunk/reactos/drivers/test/kmtest/kmtest.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/kmtest.…
==============================================================================
--- trunk/reactos/drivers/test/kmtest/kmtest.h (original)
+++ trunk/reactos/drivers/test/kmtest/kmtest.h Sun Jun 11 01:17:43 2006
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdarg.h>
+#include <string.h>
/*
Some macros, structs, and vars are based or inspired from the great
Modified: trunk/reactos/drivers/test/kmtest/ntos_ob.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/ntos_ob…
==============================================================================
--- trunk/reactos/drivers/test/kmtest/ntos_ob.c (original)
+++ trunk/reactos/drivers/test/kmtest/ntos_ob.c Sun Jun 11 01:17:43 2006
@@ -67,6 +67,7 @@
/* PRIVATE FUNCTIONS **********************************************************/
VOID
+NTAPI
DumpProc(IN PVOID Object,
IN POB_DUMP_CONTROL DumpControl)
{
@@ -75,6 +76,7 @@
// prototype doesn't match Win2003! (causes BSOD)
VOID
+NTAPI
OpenProc(IN OB_OPEN_REASON OpenReason,
IN PEPROCESS Process,
IN PVOID Object,
@@ -87,6 +89,7 @@
// Tested in Win2k3
VOID
+NTAPI
CloseProc(IN PEPROCESS Process,
IN PVOID Object,
IN ACCESS_MASK GrantedAccess,
@@ -98,12 +101,14 @@
// Tested in Win2k3
VOID
+NTAPI
DeleteProc(IN PVOID Object)
{
DPRINT("DeleteProc() called for Object=0x%p\n", Object);
}
NTSTATUS
+NTAPI
ParseProc(IN PVOID ParseObject,
IN PVOID ObjectType,
IN OUT PACCESS_STATE AccessState,
@@ -124,16 +129,14 @@
{
USHORT i;
NTSTATUS Status;
+ WCHAR Name[15];
for (i=0; i<NUM_OBTYPES; i++)
{
// Prepare object type name
// TODO: Generate type names and don't use this unprofessional,
- // ugly looking, and otherwise bad if-condition
- if (i == 0)
- RtlInitUnicodeString(&ObTypeName[i], L"MyObjectType1");
- else
- RtlInitUnicodeString(&ObTypeName[i], L"MyObjectType2");
+ swprintf(Name, L"MyObjectType%lx", i);
+ RtlInitUnicodeString(&ObTypeName[i], Name);
// Prepare initializer
RtlZeroMemory(&ObTypeInitializer[i], sizeof(ObTypeInitializer[i]));