17#define ULONG_PTR unsigned char*
19#define NTSTATUS unsigned int
21#define STATUS_EA_LIST_INCONSISTENT 0x80000014L
22#define STATUS_SUCCESS 0x00000000L
34 ULONG NextEaBufferOffset;
44 while (IntEaLength >= 8)
48 if (IntEaLength >= NextEaBufferOffset)
57 IntEaLength = IntEaLength - NextEaBufferOffset;
70 NextEaBufferOffset = ((NextEaBufferOffset + 3) & 0xFFFFFFFC);
87 if (ErrorOffset !=
NULL)
102 printf(
"Subtest:%i Status:%x EaErrorOffset:%x TestEaLength:%i passed - ",iTestCount,WinStatus,WinErrorOffset,TestEaLength);
103 if (
memcmp(WinEaBuffer,ROSEaBuffer,iBufferLength)==0)
105 if (WinStatus == ROSStatus)
107 if (WinErrorOffset == ROSErrorOffset)
121#define RANDOM_INIT_ERROR 0xDEADBAD0
122#define TEST_BUFFER_LEN 256
143 char szTest[100] =
"FltMgr";
146 UCHAR TestEaBufferFlags;
149 TestEaBufferFlags = 0;
156 printf(
"1.) Test : *********************\n");
167 WinEaBuffer->
Flags = TestEaBufferFlags;
173 ROSEaBuffer->
Flags = TestEaBufferFlags;
180 printf(
"2.) Test : *********************\n");
191 WinEaBuffer->
Flags = TestEaBufferFlags;
204 printf(
"3.) Test : *********************\n");
216 WinEaBuffer->
Flags = TestEaBufferFlags;
224 ROSEaBuffer->
Flags = TestEaBufferFlags;
231 printf(
"4.) Test : *********************\n");
242 WinEaBuffer->
Flags = TestEaBufferFlags;
250 ROSEaBuffer->
Flags = TestEaBufferFlags;
257 printf(
"5.) Test : *********************\n");
269 WinEaBuffer->
Flags = TestEaBufferFlags;
278 ROSEaBuffer->
Flags = TestEaBufferFlags;
286 printf(
"6.) Test : *********************\n");
301 WinEaBuffer->
Flags = TestEaBufferFlags;
311 ROSEaBuffer->
Flags = TestEaBufferFlags;
318 printf(
"7.) Test : *********************\n");
332 WinEaBuffer->
Flags = TestEaBufferFlags;
342 ROSEaBuffer->
Flags = TestEaBufferFlags;
350 printf(
"8.) Test : *********************\n");
364 WinEaBuffer->
Flags = TestEaBufferFlags;
375 ROSEaBuffer->
Flags = TestEaBufferFlags;
384 printf(
"9.) Test : *********************\n");
398 WinEaBuffer->
Flags = TestEaBufferFlags;
409 ROSEaBuffer->
Flags = TestEaBufferFlags;
418 printf(
"10.) Test : *********************\n");
432 WinEaBuffer->
Flags = TestEaBufferFlags;
443 ROSEaBuffer->
Flags = TestEaBufferFlags;
452 printf(
"11.) Test : *********************\n");
465 WinEaBuffer->
Flags = TestEaBufferFlags;
476 ROSEaBuffer->
Flags = TestEaBufferFlags;
498 printf(
"ERROR_MOD_NOT_FOUND\n");
501 printf(
"ERROR_BAD_EXE_FORMAT\n");
struct _FILE_FULL_EA_INFORMATION * PFILE_FULL_EA_INFORMATION
void CheckROSAgainstWinAndPrintResult(PFILE_FULL_EA_INFORMATION WinEaBuffer, PFILE_FULL_EA_INFORMATION ROSEaBuffer, NTSTATUS WinStatus, NTSTATUS ROSStatus, ULONG WinErrorOffset, ULONG ROSErrorOffset, int iBufferLength, int iTestCount, ULONG TestEaLength)
#define RANDOM_INIT_ERROR
NTSTATUS NTAPI IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
#define STATUS_EA_LIST_INCONSISTENT
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
struct _FILE_FULL_EA_INFORMATION FILE_FULL_EA_INFORMATION
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
#define ERROR_MOD_NOT_FOUND
#define GetProcAddress(x, y)
IN PVCB IN PDIRENT OUT PULONG EaLength
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define sprintf(buf, format,...)
NTSTATUS NTAPI IoCheckEaBufferValidity(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
DWORD WINAPI GetLastError(void)
#define ERROR_BAD_EXE_FORMAT
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID EaBuffer