35#define CONTROL_Z '\x1a'
36#define MAX_SECTION_NAME_LEN 255
37#define MAX_FIELD_LEN 511
39#define MAX_STRING_LEN (MAX_INF_STRING_LENGTH+1)
143static const WCHAR WindowsNT[] = {
'$',
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'N',
'T',
'$',0};
144static const WCHAR Windows95[] = {
'$',
'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'9',
'5',
'$',0};
145static const WCHAR LayoutFile[] = {
'L',
'a',
'y',
'o',
'u',
't',
'F',
'i',
'l',
'e',0};
152 if (new_count < 32) new_count = 32;
172 return file->filename;
181 for (
i = 0;
i <
file->nb_sections;
i++)
194 if (section_index < 0 || section_index >=
file->nb_sections)
return NULL;
210 if (
file->nb_sections >=
file->alloc_sections)
213 sizeof(
file->sections[0]) )))
return -1;
220 return file->nb_sections++;
230 ASSERT( section_index >= 0 && section_index < file->nb_sections );
250 unsigned int line_index )
254 if (section_index >=
file->nb_sections)
return NULL;
284 if (
file->nb_fields >=
file->alloc_fields)
287 sizeof(
file->fields[0]) )))
return NULL;
310 BOOL no_trailing_slash )
312 static const WCHAR percent =
'%';
314 struct section *strings_section;
321 WCHAR StringLangId[13] = {
'S',
't',
'r',
'i',
'n',
'g',
's',
'.',0};
329 if (
file->strings_section == -1)
goto not_found;
330 strings_section =
file->sections[
file->strings_section];
331 for (
j = 0,
line = strings_section->
lines; j < strings_section->nb_lines;
j++,
line++)
341 strcpyW(StringLangId + 8, Lang + 2);
343 for (
i = 0;
i <
file->nb_sections;
i++)
347 strings_section =
file->sections[
i];
348 for (
j = 0,
line = strings_section->
lines; j < strings_section->nb_lines;
j++,
line++)
361 strcpyW(StringLangId + 8, Lang);
363 for (
i = 0;
i <
file->nb_sections;
i++)
367 strings_section =
file->sections[
i];
368 for (
j = 0,
line = strings_section->
lines; j < strings_section->nb_lines;
j++,
line++)
392 if (no_trailing_slash &&
ret && *
len &&
ret[*
len - 1] ==
'\\') *
len -= 1;
413 if (*
p !=
'%')
continue;
561 return section_index;
683 if (*
p ==
',')
break;
914 static const WCHAR Strings[] = {
'S',
't',
'r',
'i',
'n',
'g',
's',0};
935 if (
file->alloc_sections >
file->nb_sections)
938 file->nb_sections *
sizeof(
file->sections[0]) );
939 file->alloc_sections =
file->nb_sections;
941 if (
file->alloc_fields >
file->nb_fields)
944 file->nb_fields *
sizeof(
file->fields[0]) );
945 file->alloc_fields =
file->nb_fields;
979 ppnext = &
next->next;
1017 file->strings_section = -1;
1044 if (*new_buff == 0xfeff)
1052 if (version_index != -1)
1063 if (error_line) *error_line = 0;
1087 return file->filename;
1130 if (len2 &&
ptr >
ret &&
ptr[-1] !=
'\\') *
ptr++ =
'\\';
1181 if (
ret && ClassName ==
NULL && ClassNameSize == 0)
1208 if (ClassNameSize < 1)
1257 static const WCHAR Inf[] = {
'\\',
'i',
'n',
'f',
'\\',0};
1258 static const WCHAR System32[] = {
'\\',
's',
'y',
's',
't',
'e',
'm',
'3',
'2',
'\\',0};
1311 else if (
strcmpW(
class, ClassName) != 0)
1380 static const WCHAR Layout[] = {
'\\',
'i',
'n',
'f',
'\\',
'l',
'a',
'y',
'o',
'u',
't',
'.',
'i',
'n',
'f', 0};
1504 ret +=
file->sections[section_index]->nb_lines;
1542 if (index < file->
sections[section_index]->nb_lines)
1546 context->Section = section_index;
1549 TRACE(
"(%p,%s): returning %d/%d\n",
1553 index -=
file->sections[section_index]->nb_lines;
1606 ctx.Section = section_index;
1610 if (
file->sections[section_index]->nb_lines)
1614 context->Section = section_index;
1617 TRACE(
"(%p,%s,%s): returning %d/0\n",
1641 if (context_out != context_in) *context_out = *context_in;
1642 context_out->
Line++;
1652 if (section_index == -1)
continue;
1653 if (
file->sections[section_index]->nb_lines)
1655 context_out->
Inf = context_in->
Inf;
1657 context_out->
Section = section_index;
1658 context_out->
Line = 0;
1713 if (context_out != context_in) *context_out = *context_in;
1714 context_out->
Line =
i;
1716 TRACE(
"(%p,%s,%s): returning %d\n",
1727 if (section_index == -1)
continue;
1734 context_out->
Inf = context_in->
Inf;
1736 context_out->
Section = section_index;
1737 context_out->
Line =
i;
1739 TRACE(
"(%p,%s,%s): returning %d/%d\n",
1745 TRACE(
"(%p,%s,%s): not found\n",
1785 if (required) *required =
total;
1836 if (required) *required =
total;
1863 if (!
line)
return 0;
1881 if (required) *required =
len + 1;
1891 TRACE(
"context %p/%p/%d/%d index %d returning %s\n",
1912 if (required) *required =
len + 1;
1922 TRACE(
"context %p/%p/%d/%d index %d returning %s\n",
1990 if (size < line->nb_fields -
index)
2002 if ((
value <<= 4) > 255)
2007 if (*
p <=
'9')
value |= (*
p -
'0');
2014 TRACE(
"%p/%p/%d/%d index %d returning:\n",
2053 if (required) *required =
total;
2102 if (required) *required =
total;
2152 DWORD requiredSize = 0;
2176 if (DirectoryPath !=
NULL)
2184 if (pFullFileName ==
NULL)
2193 strcpyW(pFullFileName, DirectoryPath);
2194 if (*pFullFileName && pFullFileName[
strlenW(pFullFileName) - 1] !=
'\\')
2202 if (pFullFileName[
strlenW(pFullFileName) - 1] !=
'\\')
2206 pFileName = &pFullFileName[
strlenW(pFullFileName)];
2221 strcpyW(pFileName, wfdFileInfo.cFileName);
2286 if (DirectoryPath !=
NULL)
2300 if (
ret && ReturnBufferW !=
NULL)
2361 if (InfName !=
NULL)
2367 if (ClassName !=
NULL && ClassNameSize != 0)
2375 if (
ret && ClassNameW !=
NULL)
2397 for (
i = 0;
i <
file->nb_sections;
i++)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static WCHAR *(* get_line)(FILE *)
static const WCHAR nameW[]
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
const WCHAR * DIRID_get_string(int dirid)
#define MAX_GUID_STRING_LEN
static const WCHAR Strings[]
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static void cleanup(void)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
UINT WINAPI GetSystemWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI SetupDiClassNameFromGuidW(const GUID *ClassGuid, PWSTR ClassName, DWORD ClassNameSize, PDWORD RequiredSize)
LPWSTR WINAPI pSetupMultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage)
LPVOID WINAPI MyMalloc(DWORD dwSize)
VOID WINAPI MyFree(LPVOID lpMem)
BOOL WINAPI SetupFindNextMatchLineA(PINFCONTEXT context_in, PCSTR key, PINFCONTEXT context_out)
static const WCHAR * key_name_state(struct parser *parser, const WCHAR *pos)
static const WCHAR * value_name_state(struct parser *parser, const WCHAR *pos)
const WCHAR * PARSER_get_inf_filename(HINF hinf)
static int add_section(struct inf_file *file, const WCHAR *name)
BOOL WINAPI SetupEnumInfSectionsW(HINF hinf, UINT index, PWSTR buffer, DWORD size, DWORD *need)
WCHAR * PARSER_get_src_root(HINF hinf)
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
static const WCHAR ClassGUID[]
static struct field * add_field_from_token(struct parser *parser, BOOL is_key)
LONG WINAPI SetupGetLineCountW(HINF hinf, PCWSTR section)
static void push_state(struct parser *parser, enum parser_state state)
static BOOL is_eol(const struct parser *parser, const WCHAR *ptr)
static const WCHAR * section_name_state(struct parser *parser, const WCHAR *pos)
void WINAPI SetupCloseInfFile(HINF hinf)
DWORD WINAPI SetupGetFieldCount(PINFCONTEXT context)
BOOL WINAPI SetupGetMultiSzFieldW(PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, LPDWORD required)
static WCHAR * push_string(struct inf_file *file, const WCHAR *string)
BOOL WINAPI SetupGetBinaryField(PINFCONTEXT context, DWORD index, BYTE *buffer, DWORD size, LPDWORD required)
static const WCHAR WindowsNT[]
static void append_inf_file(struct inf_file *parent, struct inf_file *child)
static const WCHAR * get_dirid_subst(const struct inf_file *file, int dirid, unsigned int *len)
static const WCHAR * leading_spaces_state(struct parser *parser, const WCHAR *pos)
static void * grow_array(void *array, unsigned int *count, size_t elem)
static void close_current_line(struct parser *parser)
static BOOL is_eof(const struct parser *parser, const WCHAR *ptr)
static void pop_state(struct parser *parser)
static BOOL PARSER_GetInfClassW(IN HINF hInf, OUT LPGUID ClassGuid, OUT PWSTR ClassName, IN DWORD ClassNameSize, OUT PDWORD RequiredSize OPTIONAL)
static unsigned int PARSER_string_substA(const struct inf_file *file, const WCHAR *text, char *buffer, unsigned int size)
static const WCHAR Signature[]
static struct field * add_field(struct inf_file *file, const WCHAR *text)
static const WCHAR * get_inf_dir(const struct inf_file *file, unsigned int *len)
static const WCHAR Chicago[]
BOOL WINAPI SetupFindFirstLineW(HINF hinf, PCWSTR section, PCWSTR key, INFCONTEXT *context)
static const WCHAR LayoutFile[]
BOOL WINAPI SetupFindNextLine(PINFCONTEXT context_in, PINFCONTEXT context_out)
static enum parser_state set_state(struct parser *parser, enum parser_state state)
static int add_section_from_token(struct parser *parser)
static int find_section(const struct inf_file *file, const WCHAR *name)
static const WCHAR * line_start_state(struct parser *parser, const WCHAR *pos)
static const WCHAR * get_string_subst(const struct inf_file *file, const WCHAR *str, unsigned int *len, BOOL no_trailing_slash)
const WCHAR *(* parser_state_func)(struct parser *parser, const WCHAR *pos)
BOOL WINAPI SetupDiGetINFClassA(IN PCSTR InfName, OUT LPGUID ClassGuid, OUT PSTR ClassName, IN DWORD ClassNameSize, OUT PDWORD RequiredSize OPTIONAL)
BOOL WINAPI SetupGetStringFieldW(PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, PDWORD required)
BOOL EnumerateSectionsStartingWith(IN HINF hInf, IN LPCWSTR pStr, IN FIND_CALLBACK Callback, IN PVOID Context)
static const WCHAR BackSlash[]
WCHAR * PARSER_get_dest_dir(INFCONTEXT *context)
BOOL WINAPI SetupGetIntField(PINFCONTEXT context, DWORD index, PINT result)
BOOL WINAPI SetupOpenAppendInfFileA(PCSTR name, HINF parent_hinf, UINT *error)
static const WCHAR Windows95[]
BOOL WINAPI SetupGetLineByIndexW(HINF hinf, PCWSTR section, DWORD index, INFCONTEXT *context)
BOOL WINAPI SetupFindFirstLineA(HINF hinf, PCSTR section, PCSTR key, INFCONTEXT *context)
BOOL WINAPI SetupGetMultiSzFieldA(PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, LPDWORD required)
HINF WINAPI SetupOpenInfFileA(PCSTR name, PCSTR class, DWORD style, UINT *error)
LPCWSTR WINAPI pSetupGetField(PINFCONTEXT context, DWORD index)
BOOL WINAPI SetupEnumInfSectionsA(HINF hinf, UINT index, PSTR buffer, DWORD size, DWORD *need)
BOOL WINAPI SetupGetLineTextA(PINFCONTEXT context, HINF hinf, PCSTR section_name, PCSTR key_name, PSTR buffer, DWORD size, PDWORD required)
static struct inf_file * parse_file(HANDLE handle, UINT *error_line, DWORD style)
static struct line * add_line(struct inf_file *file, int section_index)
static const WCHAR * eol_backslash_state(struct parser *parser, const WCHAR *pos)
static struct field * get_field(struct inf_file *file, int section_index, int line_index, int field_index)
static const WCHAR * quotes_state(struct parser *parser, const WCHAR *pos)
BOOL WINAPI SetupOpenAppendInfFileW(PCWSTR name, HINF parent_hinf, UINT *error)
BOOL WINAPI SetupGetInfFileListW(IN PCWSTR DirectoryPath OPTIONAL, IN DWORD InfStyle, IN OUT PWSTR ReturnBuffer OPTIONAL, IN DWORD ReturnBufferSize OPTIONAL, OUT PDWORD RequiredSize OPTIONAL)
static unsigned int PARSER_string_substW(const struct inf_file *file, const WCHAR *text, WCHAR *buffer, unsigned int size)
LONG WINAPI SetupGetLineCountA(HINF hinf, PCSTR name)
static void free_inf_file(struct inf_file *file)
BOOL WINAPI SetupGetStringFieldA(PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, PDWORD required)
BOOL WINAPI SetupGetInfFileListA(IN PCSTR DirectoryPath OPTIONAL, IN DWORD InfStyle, IN OUT PSTR ReturnBuffer OPTIONAL, IN DWORD ReturnBufferSize OPTIONAL, OUT PDWORD RequiredSize OPTIONAL)
BOOL WINAPI SetupGetLineByIndexA(HINF hinf, PCSTR section, DWORD index, INFCONTEXT *context)
static const WCHAR InfFileSpecification[]
static const WCHAR * comment_state(struct parser *parser, const WCHAR *pos)
static const WCHAR InfDirectory[]
static int push_token(struct parser *parser, const WCHAR *pos)
#define MAX_SECTION_NAME_LEN
BOOL WINAPI SetupDiGetINFClassW(IN PCWSTR InfName, OUT LPGUID ClassGuid, OUT PWSTR ClassName, IN DWORD ClassNameSize, OUT PDWORD RequiredSize OPTIONAL)
static struct line * find_line(struct inf_file *file, int section_index, const WCHAR *name)
static const WCHAR * trailing_spaces_state(struct parser *parser, const WCHAR *pos)
HINF WINAPI SetupOpenMasterInf(VOID)
BOOL WINAPI SetupFindNextMatchLineW(PINFCONTEXT context_in, PCWSTR key, PINFCONTEXT context_out)
BOOL WINAPI SetupGetLineTextW(PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required)
static const parser_state_func parser_funcs[NB_PARSER_STATES]
static const WCHAR Cleanup[]
GLuint GLuint GLsizei count
GLenum GLenum GLenum GLenum mapping
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
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 GLint GLint j
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
#define InterlockedCompareExchangePointer
#define memcpy(s1, s2, n)
struct section sections[2]
static UINT PSTR DWORD UINT * need
NTSYSAPI BOOLEAN NTAPI RtlIsTextUnicode(_In_ CONST VOID *Buffer, _In_ INT Size, _Inout_opt_ INT *Flags)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define HEAP_REALLOC_IN_PLACE_ONLY
#define LOCALE_SYSTEM_DEFAULT
static unsigned __int64 next
#define strncmpiW(s1, s2, n)
RPC_STATUS WINAPI UuidFromStringW(RPC_WSTR s, UUID *uuid)
#define ERROR_WRONG_INF_STYLE
#define ERROR_BAD_SECTION_NAME_LINE
#define ERROR_EXPECTED_SECTION_NAME
#define ERROR_SECTION_NOT_FOUND
#define ERROR_CLASS_MISMATCH
#define ERROR_SECTION_NAME_TOO_LONG
_In_ DWORD _In_ DWORD ReturnBufferSize
#define ERROR_LINE_NOT_FOUND
BOOL(* FIND_CALLBACK)(LPCWSTR SectionName, PVOID Context)
PULONG MinorVersion OPTIONAL
unsigned int alloc_sections
unsigned int alloc_fields
struct section ** sections
PINFCACHESECTION cur_section
CHAR token[MAX_FIELD_LEN+1]
enum parser_state stack[4]
static const WCHAR classW[]
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
DWORD WINAPI GetLastError(void)
#define ERROR_INVALID_USER_BUFFER
#define ERROR_INVALID_DATA