/* INCLUDES ******************************************************************/
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
-#include <windows.h>
+#include <k32.h>
#define NDEBUG
#include <kernel32/kernel32.h>
-#include <kernel32/error.h>
/* GLOBAL VARIABLES **********************************************************/
Length = RtlUnicodeStringToAnsiSize (&WindowsDirectory); //len of ansi str incl. nullchar
- printf("windirlen incl term %i\n", Length);
-
if (uSize >= Length){
- printf("ok: enoug space\n");
-
String.Length = 0;
String.MaximumLength = uSize;
String.Buffer = lpBuffer;
if (!NT_SUCCESS(Status))
return 0;
- printf("good: ret chars %i\n",Length-1);
- printf("dir: %s\n",lpBuffer);
return Length-1; //good: ret chars excl. nullchar
}
- printf("bad: ret chars needed %i\n",Length);
return Length; //bad: ret space needed incl. nullchar
}