ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2019
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
225 discussions
Start a n
N
ew thread
[reactos] 01/01: [WMIUTILS] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd00327109e05b237b60c…
commit bd00327109e05b237b60c070acef20d42a494b3b Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:10:01 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:10:01 2019 +0100 [WMIUTILS] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/wmiutils/main.c | 1 - dll/win32/wmiutils/path.c | 49 +++++++++++++++++------------------ dll/win32/wmiutils/statuscode.c | 6 ++--- dll/win32/wmiutils/wmiutils_private.h | 3 +-- media/doc/README.WINE | 2 +- 5 files changed, 28 insertions(+), 33 deletions(-) diff --git a/dll/win32/wmiutils/main.c b/dll/win32/wmiutils/main.c index 89fd26b248d..9befe016bd4 100644 --- a/dll/win32/wmiutils/main.c +++ b/dll/win32/wmiutils/main.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdarg.h> #define COBJMACROS diff --git a/dll/win32/wmiutils/path.c b/dll/win32/wmiutils/path.c index 61386d95f32..6a7587ad23f 100644 --- a/dll/win32/wmiutils/path.c +++ b/dll/win32/wmiutils/path.c @@ -18,7 +18,6 @@ #define COBJMACROS -#include "config.h" #include <stdarg.h> #include "windef.h" @@ -379,7 +378,7 @@ static HRESULT parse_key( struct key *key, const WCHAR *str, unsigned int *ret_l p = q = str; while (*q && *q != '=') { - if (*q == ',' || isspaceW( *q )) return WBEM_E_INVALID_PARAMETER; + if (*q == ',' || iswspace( *q )) return WBEM_E_INVALID_PARAMETER; q++; } len = q - p; @@ -389,7 +388,7 @@ static HRESULT parse_key( struct key *key, const WCHAR *str, unsigned int *ret_l key->len_name = len; p = ++q; - if (!*p || *p == ',' || isspaceW( *p )) return WBEM_E_INVALID_PARAMETER; + if (!*p || *p == ',' || iswspace( *p )) return WBEM_E_INVALID_PARAMETER; while (*q && *q != ',') q++; len = q - p; @@ -423,7 +422,7 @@ static HRESULT parse_text( struct path *path, ULONG mode, const WCHAR *text ) path->flags |= WBEMPATH_INFO_PATH_HAD_SERVER; } p = q; - if (strchrW( p, '\\' ) || strchrW( p, '/' )) + if (wcschr( p, '\\' ) || wcschr( p, '/' )) { if (*q != '\\' && *q != '/' && *q != ':') { @@ -528,14 +527,14 @@ static HRESULT WINAPI path_SetText( if (!pszPath[0]) goto done; if ((hr = parse_text( path, uMode, pszPath )) != S_OK) goto done; - len = strlenW( pszPath ); + len = lstrlenW( pszPath ); if (!(path->text = heap_alloc( (len + 1) * sizeof(WCHAR) ))) { clear_path( path ); hr = E_OUTOFMEMORY; goto done; } - strcpyW( path->text, pszPath ); + lstrcpyW( path->text, pszPath ); path->len_text = len; done: @@ -576,7 +575,7 @@ static WCHAR *build_server( struct path *path, int *len ) if (path->len_server) { p[0] = p[1] = '\\'; - strcpyW( p + 2, path->server ); + lstrcpyW( p + 2, path->server ); } else { @@ -641,15 +640,15 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len ) heap_free( keylist ); return NULL; } - strcpyW( ret, namespace ); + lstrcpyW( ret, namespace ); if (path->len_class) { ret[len_namespace] = ':'; - strcpyW( ret + len_namespace + 1, path->class ); + lstrcpyW( ret + len_namespace + 1, path->class ); if (path->num_keys) { ret[len_namespace + path->len_class + 1] = '.'; - strcpyW( ret + len_namespace + path->len_class + 2, keylist ); + lstrcpyW( ret + len_namespace + path->len_class + 2, keylist ); } } heap_free( namespace ); @@ -672,11 +671,11 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len ) heap_free( keylist ); return NULL; } - strcpyW( ret, path->class ); + lstrcpyW( ret, path->class ); if (path->num_keys) { ret[path->len_class] = '.'; - strcpyW( ret + path->len_class + 1, keylist ); + lstrcpyW( ret + path->len_class + 1, keylist ); } heap_free( keylist ); return ret; @@ -708,18 +707,18 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len ) heap_free( keylist ); return NULL; } - strcpyW( p, server ); + lstrcpyW( p, server ); p += len_server; - strcpyW( p, namespace ); + lstrcpyW( p, namespace ); p += len_namespace; if (path->len_class) { *p++ = ':'; - strcpyW( p, path->class ); + lstrcpyW( p, path->class ); if (path->num_keys) { p[path->len_class] = '.'; - strcpyW( p + path->len_class + 1, keylist ); + lstrcpyW( p + path->len_class + 1, keylist ); } } heap_free( namespace ); @@ -746,9 +745,9 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len ) heap_free( server ); return NULL; } - strcpyW( p, server ); + lstrcpyW( p, server ); p += len_server; - strcpyW( p, namespace ); + lstrcpyW( p, namespace ); heap_free( namespace ); heap_free( server ); return ret; @@ -795,7 +794,7 @@ static HRESULT WINAPI path_GetText( hr = WBEM_E_INVALID_PARAMETER; goto done; } - if (str) strcpyW( pszText, str ); + if (str) lstrcpyW( pszText, str ); else pszText[0] = 0; *puBufferLength = len + 1; @@ -866,7 +865,7 @@ static HRESULT WINAPI path_SetServer( } heap_free( path->server ); path->server = server; - path->len_server = strlenW( path->server ); + path->len_server = lstrlenW( path->server ); path->flags |= flags; } else @@ -899,7 +898,7 @@ static HRESULT WINAPI path_GetServer( LeaveCriticalSection( &path->cs ); return WBEM_E_NOT_AVAILABLE; } - if (*len > path->len_server) strcpyW( name, path->server ); + if (*len > path->len_server) lstrcpyW( name, path->server ); *len = path->len_server + 1; LeaveCriticalSection( &path->cs ); @@ -975,7 +974,7 @@ static HRESULT WINAPI path_SetNamespaceAt( path->len_namespaces[i + 1] = path->len_namespaces[i]; } path->namespaces[idx] = new; - path->len_namespaces[idx] = strlenW( new ); + path->len_namespaces[idx] = lstrlenW( new ); path->num_namespaces++; path->flags |= flags; @@ -1000,7 +999,7 @@ static HRESULT WINAPI path_GetNamespaceAt( LeaveCriticalSection( &path->cs ); return WBEM_E_INVALID_PARAMETER; } - if (*len > path->len_namespaces[idx]) strcpyW( name, path->namespaces[idx] ); + if (*len > path->len_namespaces[idx]) lstrcpyW( name, path->namespaces[idx] ); *len = path->len_namespaces[idx] + 1; LeaveCriticalSection( &path->cs ); @@ -1134,7 +1133,7 @@ static HRESULT WINAPI path_SetClassName( heap_free( path->class ); path->class = class; - path->len_class = strlenW( path->class ); + path->len_class = lstrlenW( path->class ); path->flags |= WBEMPATH_INFO_V2_COMPLIANT | WBEMPATH_INFO_CIM_COMPLIANT; LeaveCriticalSection( &path->cs ); @@ -1159,7 +1158,7 @@ static HRESULT WINAPI path_GetClassName( LeaveCriticalSection( &path->cs ); return WBEM_E_INVALID_OBJECT_PATH; } - if (*len > path->len_class) strcpyW( name, path->class ); + if (*len > path->len_class) lstrcpyW( name, path->class ); *len = path->len_class + 1; LeaveCriticalSection( &path->cs ); diff --git a/dll/win32/wmiutils/statuscode.c b/dll/win32/wmiutils/statuscode.c index 719f3af8b5d..a2df50357f1 100644 --- a/dll/win32/wmiutils/statuscode.c +++ b/dll/win32/wmiutils/statuscode.c @@ -18,7 +18,6 @@ #define COBJMACROS -#include "config.h" #include <stdarg.h> #include <stdio.h> @@ -28,7 +27,6 @@ #include "wbemcli.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "wmiutils_private.h" WINE_DEFAULT_DEBUG_CHANNEL(wmiutils); @@ -100,7 +98,7 @@ static HRESULT WINAPI status_code_GetErrorCodeText( FIXME("%p, 0x%08x, 0x%04x, 0x%08x, %p\n", iface, res, lcid, flags, text); - sprintfW(msg, fmt, res); + swprintf(msg, fmt, res); *text = SysAllocString(msg); return WBEM_S_NO_ERROR; } @@ -118,7 +116,7 @@ static HRESULT WINAPI status_code_GetFacilityCodeText( FIXME("%p, 0x%08x, 0x%04x, 0x%08x, %p\n", iface, res, lcid, flags, text); - sprintfW(msg, fmt, res); + swprintf(msg, fmt, res); *text = SysAllocString(msg); return WBEM_S_NO_ERROR; } diff --git a/dll/win32/wmiutils/wmiutils_private.h b/dll/win32/wmiutils/wmiutils_private.h index 6195f2133df..8036afc847a 100644 --- a/dll/win32/wmiutils/wmiutils_private.h +++ b/dll/win32/wmiutils/wmiutils_private.h @@ -17,7 +17,6 @@ */ #include "wine/heap.h" -#include "wine/unicode.h" HRESULT WbemPath_create(LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemStatusCodeText_create(LPVOID *) DECLSPEC_HIDDEN; @@ -26,6 +25,6 @@ static inline WCHAR *strdupW( const WCHAR *src ) { WCHAR *dst; if (!src) return NULL; - if ((dst = heap_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src ); + if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src ); return dst; } diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 127fa7811ad..dbbad6d8d40 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -210,7 +210,7 @@ dll/win32/winscard # Synced to WineStaging-4.18 dll/win32/wintrust # Synced to WineStaging-4.18 dll/win32/wldap32 # Synced to WineStaging-4.18 dll/win32/wmi # Synced to WineStaging-2.9 -dll/win32/wmiutils # Synced to WineStaging-3.3 +dll/win32/wmiutils # Synced to WineStaging-4.18 dll/win32/wmvcore # Synced to WineStaging-3.9 dll/win32/wshom.ocx # Synced to WineStaging-3.3 dll/win32/wtsapi32 # Synced to WineStaging-3.9
5 years
1
0
0
0
[reactos] 01/01: [WLDAP32] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6b9bd93fe69dd17e62ae2…
commit 6b9bd93fe69dd17e62ae28287c26b7ef6df01041 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:09:39 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:09:39 2019 +0100 [WLDAP32] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/wldap32/error.c | 2 +- dll/win32/wldap32/init.c | 9 +++++---- dll/win32/wldap32/parse.c | 2 +- dll/win32/wldap32/winldap_private.h | 18 ++++++++++-------- media/doc/README.WINE | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/dll/win32/wldap32/error.c b/dll/win32/wldap32/error.c index 2e09e9e3990..fbbd124d230 100644 --- a/dll/win32/wldap32/error.c +++ b/dll/win32/wldap32/error.c @@ -303,7 +303,7 @@ ULONG CDECL LdapMapErrorToWin32( ULONG err ) { TRACE( "(0x%08x)\n", err ); - if (err >= sizeof(WLDAP32_errormap)/sizeof(WLDAP32_errormap[0])) + if (err >= ARRAY_SIZE( WLDAP32_errormap )) return ERROR_DS_GENERIC_ERROR; return WLDAP32_errormap[err]; } diff --git a/dll/win32/wldap32/init.c b/dll/win32/wldap32/init.c index fdb79084b50..5b600a2df78 100644 --- a/dll/win32/wldap32/init.c +++ b/dll/win32/wldap32/init.c @@ -30,6 +30,7 @@ #include "windef.h" #include "winbase.h" #include "winnls.h" +#include "wine/winternl.h" #include "winldap_private.h" #include "wldap32.h" @@ -114,10 +115,10 @@ oom: /* Determine if a URL starts with a known LDAP scheme */ static BOOL has_ldap_scheme( char *url ) { - return !strncasecmp( url, "ldap://", 7 ) || - !strncasecmp( url, "ldaps://", 8 ) || - !strncasecmp( url, "ldapi://", 8 ) || - !strncasecmp( url, "cldap://", 8 ); + return !_strnicmp( url, "ldap://", 7 ) || + !_strnicmp( url, "ldaps://", 8 ) || + !_strnicmp( url, "ldapi://", 8 ) || + !_strnicmp( url, "cldap://", 8 ); } /* Flatten an array of hostnames into a space separated string of URLs. diff --git a/dll/win32/wldap32/parse.c b/dll/win32/wldap32/parse.c index 62ffdbab0da..e83e6d23517 100644 --- a/dll/win32/wldap32/parse.c +++ b/dll/win32/wldap32/parse.c @@ -258,7 +258,7 @@ ULONG CDECL ldap_parse_resultW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result, ldap_memfree( matchedU ); ldap_memfree( errorU ); - strarrayfreeU( referralsU ); + ldap_memvfree( (void **)referralsU ); ldap_controls_free( serverctrlsU ); #endif diff --git a/dll/win32/wldap32/winldap_private.h b/dll/win32/wldap32/winldap_private.h index c0039eb0fdf..4d4d3581261 100644 --- a/dll/win32/wldap32/winldap_private.h +++ b/dll/win32/wldap32/winldap_private.h @@ -191,16 +191,18 @@ typedef struct WLDAP32_berval } LDAP_BERVAL, *PLDAP_BERVAL, BERVAL, *PBERVAL, WLDAP32_BerValue; #define LDAP_PAGED_RESULT_OID_STRING "1.2.840.113556.1.4.319" -#define LDAP_PAGED_RESULT_OID_STRING_W (const WCHAR []){'1','.','2','.', \ - '8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','3','1','9',0} - #define LDAP_SERVER_RESP_SORT_OID "1.2.840.113556.1.4.474" -#define LDAP_SERVER_RESP_SORT_OID_W (const WCHAR []){'1','.','2','.', \ - '8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','4','7','4',0} - #define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10" -#define LDAP_CONTROL_VLVRESPONSE_W (const WCHAR []){'2','.','1','6','.', \ - '8','4','0','.','1','.','1','1','3','7','3','0','.','3','.','4','.','1','0',0} + +#if defined(_MSC_VER) || defined(__MINGW32__) +#define LDAP_PAGED_RESULT_OID_STRING_W L"1.2.840.113556.1.4.319" +#define LDAP_SERVER_RESP_SORT_OID_W L"1.2.840.113556.1.4.474" +#define LDAP_CONTROL_VLVRESPONSE_W L"2.16.840.1.113730.3.4.10" +#else +static const WCHAR LDAP_PAGED_RESULT_OID_STRING_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','3','1','9',0}; +static const WCHAR LDAP_SERVER_RESP_SORT_OID_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','4','7','4',0}; +static const WCHAR LDAP_CONTROL_VLVRESPONSE_W[] = {'2','.','1','6','.','8','4','0','.','1','.','1','1','3','7','3','0','.','3','.','4','.','1','0',0}; +#endif typedef struct ldapcontrolA { diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 54c585a517a..127fa7811ad 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -208,7 +208,7 @@ dll/win32/winmm/midimap # Forked at Wine-20050628 dll/win32/winmm/wavemap # Forked at Wine-20050628 dll/win32/winscard # Synced to WineStaging-4.18 dll/win32/wintrust # Synced to WineStaging-4.18 -dll/win32/wldap32 # Synced to WineStaging-3.3 +dll/win32/wldap32 # Synced to WineStaging-4.18 dll/win32/wmi # Synced to WineStaging-2.9 dll/win32/wmiutils # Synced to WineStaging-3.3 dll/win32/wmvcore # Synced to WineStaging-3.9
5 years
1
0
0
0
[reactos] 01/01: [WINTRUST_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cb01e5ecaccc30dc91006…
commit cb01e5ecaccc30dc910068469ac08872a144a351 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:09:17 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:09:17 2019 +0100 [WINTRUST_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/wintrust/softpub.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/wintrust/softpub.c b/modules/rostests/winetests/wintrust/softpub.c index 1f872341357..e19492347e5 100644 --- a/modules/rostests/winetests/wintrust/softpub.c +++ b/modules/rostests/winetests/wintrust/softpub.c @@ -288,7 +288,7 @@ static HANDLE create_temp_file(WCHAR *temp_file) HANDLE file = INVALID_HANDLE_VALUE; WCHAR temp_path[MAX_PATH]; - if (GetTempPathW(sizeof(temp_path) / sizeof(temp_path[0]), temp_path)) + if (GetTempPathW(ARRAY_SIZE(temp_path), temp_path)) { static const WCHAR img[] = { 'i','m','g',0 }; @@ -1211,7 +1211,7 @@ static void test_wintrust_digest(void) BOOL ret; int i, j; - for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) + for (i = 0; i < ARRAY_SIZE(tests); i++) { file = create_temp_file(pathW); ok(file != INVALID_HANDLE_VALUE, "failed to create temporary file\n"); @@ -1300,6 +1300,14 @@ static void test_get_known_usages(void) "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); } +static void test_WTHelperGetProvCertFromChain(void) +{ + CRYPT_PROVIDER_CERT *cert; + + cert = WTHelperGetProvCertFromChain(NULL, 0); + ok(!cert, "got certificate\n"); +} + START_TEST(softpub) { InitFunctionPtrs(); @@ -1308,4 +1316,5 @@ START_TEST(softpub) test_wintrust(); test_wintrust_digest(); test_get_known_usages(); + test_WTHelperGetProvCertFromChain(); }
5 years
1
0
0
0
[reactos] 01/01: [WINTRUST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d296bbebbef07e1a9eab7…
commit d296bbebbef07e1a9eab79dd6f503e20d38fdeeb Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:08:52 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:08:52 2019 +0100 [WINTRUST] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/wintrust/asn.c | 76 ++++++++++++++++---------------------- dll/win32/wintrust/crypt.c | 62 ++++++++++++++++++------------- dll/win32/wintrust/precomp.h | 4 +- dll/win32/wintrust/softpub.c | 75 +++++++++++++------------------------ dll/win32/wintrust/wintrust.spec | 31 ++++++++++++++++ dll/win32/wintrust/wintrust_main.c | 26 +++++-------- media/doc/README.WINE | 2 +- 7 files changed, 137 insertions(+), 139 deletions(-) diff --git a/dll/win32/wintrust/asn.c b/dll/win32/wintrust/asn.c index 6406ba34286..72536e8b5b0 100644 --- a/dll/win32/wintrust/asn.c +++ b/dll/win32/wintrust/asn.c @@ -18,9 +18,6 @@ * */ -#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #include <stdio.h> #include <assert.h> @@ -673,8 +670,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAlgorithmIdWithNullParams( items[1].pvStructInfo = &algo->Parameters; else items[1].pvStructInfo = &nullBlob; - ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, pcbEncoded); return ret; } @@ -688,8 +685,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAttributeTypeValue(DWORD dwCertEncodingType, { &typeValue->Value, CRYPT_CopyEncodedBlob, 0 }, }; - return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), + pbEncoded, pcbEncoded); } struct SPCDigest @@ -708,8 +705,8 @@ static BOOL WINAPI CRYPT_AsnEncodeSPCDigest(DWORD dwCertEncodingType, { &digest->Digest, CRYPT_CopyEncodedBlob, 0 }, }; - return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), + pbEncoded, pcbEncoded); } BOOL WINAPI WVTAsn1SpcIndirectDataContentEncode(DWORD dwCertEncodingType, @@ -729,8 +726,8 @@ BOOL WINAPI WVTAsn1SpcIndirectDataContentEncode(DWORD dwCertEncodingType, { &data->DigestAlgorithm, CRYPT_AsnEncodeSPCDigest, 0 }, }; - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), + pbEncoded, pcbEncoded); } __EXCEPT_PAGE_FAULT { @@ -996,8 +993,8 @@ BOOL WINAPI WVTAsn1CatMemberInfoEncode(DWORD dwCertEncodingType, { &info->dwCertVersion, CRYPT_AsnEncodeInt, 0 }, }; - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), + pbEncoded, pcbEncoded); } __EXCEPT_PAGE_FAULT { @@ -1025,8 +1022,8 @@ BOOL WINAPI WVTAsn1CatNameValueEncode(DWORD dwCertEncodingType, { &value->Value, CRYPT_AsnEncodeOctets, 0 }, }; - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), + pbEncoded, pcbEncoded); } __EXCEPT_PAGE_FAULT { @@ -1084,8 +1081,8 @@ BOOL WINAPI WVTAsn1SpcFinancialCriteriaInfoEncode(DWORD dwCertEncodingType, { &criteria->fMeetsCriteria, CRYPT_AsnEncodeBool, 0 }, }; - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), + pbEncoded, pcbEncoded); } __EXCEPT_PAGE_FAULT { @@ -1808,9 +1805,8 @@ BOOL WINAPI WVTAsn1SpcPeImageDataDecode(DWORD dwCertEncodingType, offsetof(SPC_PE_IMAGE_DATA, pFile), 0 }, }; - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, NULL); + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); } __EXCEPT_PAGE_FAULT { @@ -1995,9 +1991,8 @@ static BOOL WINAPI CRYPT_AsnDecodeAttributeTypeValue(DWORD dwCertEncodingType, TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, pvStructInfo, *pcbStructInfo); - return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, + return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, typeValue ? typeValue->pszObjId : NULL); } @@ -2019,9 +2014,8 @@ static BOOL WINAPI CRYPT_AsnDecodeAlgorithmId(DWORD dwCertEncodingType, TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, pvStructInfo, *pcbStructInfo); - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, algo ? algo->pszObjId : NULL); + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, algo ? algo->pszObjId : NULL); if (ret && pvStructInfo) { TRACE("pszObjId is %p (%s)\n", algo->pszObjId, @@ -2048,9 +2042,8 @@ static BOOL WINAPI CRYPT_AsnDecodeSPCDigest(DWORD dwCertEncodingType, TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, pvStructInfo, *pcbStructInfo); - return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, + return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, digest ? digest->DigestAlgorithm.pszObjId : NULL); } @@ -2076,9 +2069,8 @@ BOOL WINAPI WVTAsn1SpcIndirectDataContentDecode(DWORD dwCertEncodingType, offsetof(SPC_INDIRECT_DATA_CONTENT, DigestAlgorithm.pszObjId), 0 }, }; - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, NULL); + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); } __EXCEPT_PAGE_FAULT { @@ -2174,9 +2166,8 @@ BOOL WINAPI WVTAsn1SpcSpOpusInfoDecode(DWORD dwCertEncodingType, offsetof(SPC_SP_OPUS_INFO, pPublisherInfo), 0 }, }; - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, NULL); + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); } __EXCEPT_PAGE_FAULT { @@ -2256,9 +2247,8 @@ BOOL WINAPI WVTAsn1CatMemberInfoDecode(DWORD dwCertEncodingType, FALSE, FALSE, 0, 0 }, }; - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, NULL); + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); } __EXCEPT_PAGE_FAULT { @@ -2292,9 +2282,8 @@ BOOL WINAPI WVTAsn1CatNameValueDecode(DWORD dwCertEncodingType, offsetof(CAT_NAMEVALUE, Value.pbData), 0 }, }; - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, NULL); + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); } __EXCEPT_PAGE_FAULT { @@ -2367,9 +2356,8 @@ BOOL WINAPI WVTAsn1SpcFinancialCriteriaInfoDecode(DWORD dwCertEncodingType, fMeetsCriteria), FALSE, FALSE, 0, 0 }, }; - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, - pvStructInfo, pcbStructInfo, NULL); + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); } __EXCEPT_PAGE_FAULT { diff --git a/dll/win32/wintrust/crypt.c b/dll/win32/wintrust/crypt.c index 84188f881aa..404bebc428f 100644 --- a/dll/win32/wintrust/crypt.c +++ b/dll/win32/wintrust/crypt.c @@ -33,7 +33,6 @@ #include "winternl.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(wintrust); @@ -75,7 +74,7 @@ static HCATINFO create_catinfo(const WCHAR *filename) SetLastError(ERROR_OUTOFMEMORY); return INVALID_HANDLE_VALUE; } - strcpyW(ci->file, filename); + lstrcpyW(ci->file, filename); ci->magic = CATINFO_MAGIC; return ci; } @@ -125,13 +124,13 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin, } GetSystemDirectoryW(catroot_dir, MAX_PATH); - strcatW(catroot_dir, catroot); + lstrcatW(catroot_dir, catroot); /* create the directory if it doesn't exist */ CreateDirectoryW(catroot_dir, NULL); if (!sys) sys = &defsys; - sprintfW(ca->path, fmt, catroot_dir, sys->Data1, sys->Data2, + swprintf(ca->path, fmt, catroot_dir, sys->Data1, sys->Data2, sys->Data3, sys->Data4[0], sys->Data4[1], sys->Data4[2], sys->Data4[3], sys->Data4[4], sys->Data4[5], sys->Data4[6], sys->Data4[7]); @@ -146,6 +145,17 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin, return TRUE; } +/*********************************************************************** + * CryptCATAdminAcquireContext2 (WINTRUST.@) + */ +BOOL WINAPI CryptCATAdminAcquireContext2(HCATADMIN *catAdmin, const GUID *sys, const WCHAR *algorithm, + const CERT_STRONG_SIGN_PARA *policy, DWORD flags) +{ + FIXME("%p %s %s %p %x stub\n", catAdmin, debugstr_guid(sys), debugstr_w(algorithm), policy, flags); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + /*********************************************************************** * CryptCATAdminAddCatalog (WINTRUST.@) */ @@ -173,15 +183,15 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile, return NULL; } - len = strlenW(ca->path) + strlenW(selectBaseName) + 2; + len = lstrlenW(ca->path) + lstrlenW(selectBaseName) + 2; if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) { SetLastError(ERROR_OUTOFMEMORY); return NULL; } - strcpyW(target, ca->path); - strcatW(target, slashW); - strcatW(target, selectBaseName); + lstrcpyW(target, ca->path); + lstrcatW(target, slashW); + lstrcatW(target, selectBaseName); if (!CopyFileW(catalogFile, target, FALSE)) { @@ -197,7 +207,7 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile, return NULL; } ci->magic = CATINFO_MAGIC; - strcpyW(ci->file, target); + lstrcpyW(ci->file, target); HeapFree(GetProcessHeap(), 0, target); return ci; @@ -297,15 +307,15 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa { WCHAR *path; - size = strlenW(ca->path) * sizeof(WCHAR) + sizeof(globW); + size = lstrlenW(ca->path) * sizeof(WCHAR) + sizeof(globW); if (!(path = HeapAlloc(GetProcessHeap(), 0, size))) { CryptReleaseContext(prov, 0); SetLastError(ERROR_OUTOFMEMORY); return NULL; } - strcpyW(path, ca->path); - strcatW(path, globW); + lstrcpyW(path, ca->path); + lstrcatW(path, globW); FindClose(ca->find); ca->find = FindFirstFileW(path, &data); @@ -331,15 +341,15 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa struct catinfo *ci; HANDLE hcat; - size = (strlenW(ca->path) + strlenW(data.cFileName) + 2) * sizeof(WCHAR); + size = (lstrlenW(ca->path) + lstrlenW(data.cFileName) + 2) * sizeof(WCHAR); if (!(filename = HeapAlloc(GetProcessHeap(), 0, size))) { SetLastError(ERROR_OUTOFMEMORY); return NULL; } - strcpyW(filename, ca->path); - strcatW(filename, slashW); - strcatW(filename, data.cFileName); + lstrcpyW(filename, ca->path); + lstrcatW(filename, slashW); + lstrcatW(filename, data.cFileName); hcat = CryptCATOpen(filename, CRYPTCAT_OPEN_EXISTING, prov, 0, 0); if (hcat == INVALID_HANDLE_VALUE) @@ -476,22 +486,22 @@ BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN hCatAdmin, LPCWSTR pwszCatalogF /* Only delete when there is a filename and no path */ if (pwszCatalogFile && pwszCatalogFile[0] != 0 && - !strchrW(pwszCatalogFile, '\\') && !strchrW(pwszCatalogFile, '/') && - !strchrW(pwszCatalogFile, ':')) + !wcschr(pwszCatalogFile, '\\') && !wcschr(pwszCatalogFile, '/') && + !wcschr(pwszCatalogFile, ':')) { static const WCHAR slashW[] = {'\\',0}; WCHAR *target; DWORD len; - len = strlenW(ca->path) + strlenW(pwszCatalogFile) + 2; + len = lstrlenW(ca->path) + lstrlenW(pwszCatalogFile) + 2; if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) { SetLastError(ERROR_OUTOFMEMORY); return FALSE; } - strcpyW(target, ca->path); - strcatW(target, slashW); - strcatW(target, pwszCatalogFile); + lstrcpyW(target, ca->path); + lstrcatW(target, slashW); + lstrcatW(target, pwszCatalogFile); DeleteFileW(target); @@ -517,9 +527,9 @@ BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN hcatadmin, WCHAR *catalog_ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - strcpyW(info->wszCatalogFile, ca->path); - strcatW(info->wszCatalogFile, slashW); - strcatW(info->wszCatalogFile, catalog_file); + lstrcpyW(info->wszCatalogFile, ca->path); + lstrcatW(info->wszCatalogFile, slashW); + lstrcatW(info->wszCatalogFile, catalog_file); return TRUE; } @@ -834,7 +844,7 @@ BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO hcatinfo, CATALOG_INFO *info SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - strcpyW(info->wszCatalogFile, ci->file); + lstrcpyW(info->wszCatalogFile, ci->file); return TRUE; } diff --git a/dll/win32/wintrust/precomp.h b/dll/win32/wintrust/precomp.h index 049a53dac47..7d0b2db93d5 100644 --- a/dll/win32/wintrust/precomp.h +++ b/dll/win32/wintrust/precomp.h @@ -2,8 +2,6 @@ #ifndef _WINTRUST_PRECOMP_H #define _WINTRUST_PRECOMP_H -#include <wine/config.h> - #include <stdio.h> #define _INC_WINDOWS @@ -15,12 +13,12 @@ #include <winbase.h> #include <winuser.h> #include <winreg.h> +#include <winnls.h> #include <winternl.h> #include <softpub.h> #include <mscat.h> #include <wine/debug.h> -#include <wine/unicode.h> #include "wintrust_priv.h" diff --git a/dll/win32/wintrust/softpub.c b/dll/win32/wintrust/softpub.c index 0c04001985b..475f55a7507 100644 --- a/dll/win32/wintrust/softpub.c +++ b/dll/win32/wintrust/softpub.c @@ -210,12 +210,31 @@ static DWORD SOFTPUB_GetMessageFromFile(CRYPT_PROVIDER_DATA *data, HANDLE file, return err; } +static BOOL hash_file_data( HANDLE file, DWORD start, DWORD end, HCRYPTHASH hash ) +{ + DWORD bytes_read, size = end - start; + DWORD buffer_size = min( size, 1024*1024 ); + BYTE *buffer = HeapAlloc( GetProcessHeap(), 0, buffer_size ); + + if (!buffer) return FALSE; + SetFilePointer( file, start, NULL, FILE_BEGIN ); + while (size) + { + if (!ReadFile( file, buffer, min( buffer_size, size ), &bytes_read, NULL )) break; + if (!bytes_read) break; + if (!CryptHashData( hash, buffer, bytes_read, 0 )) break; + size -= bytes_read; + } + HeapFree( GetProcessHeap(), 0, buffer ); + return !size; +} + /* See
https://www.cs.auckland.ac.nz/~pgut001/pubs/authenticode.txt
* for details about the hashing. */ static BOOL SOFTPUB_HashPEFile(HANDLE file, HCRYPTHASH hash) { - DWORD pos, checksum, security_dir; + DWORD checksum, security_dir; IMAGE_DOS_HEADER dos_header; union { @@ -225,7 +244,6 @@ static BOOL SOFTPUB_HashPEFile(HANDLE file, HCRYPTHASH hash) IMAGE_DATA_DIRECTORY secdir; LARGE_INTEGER file_size; DWORD bytes_read; - BYTE buffer[1024]; BOOL ret; if (!GetFileSizeEx(file, &file_size)) @@ -237,10 +255,7 @@ static BOOL SOFTPUB_HashPEFile(HANDLE file, HCRYPTHASH hash) return FALSE; if (dos_header.e_magic != IMAGE_DOS_SIGNATURE) - { - ERR("Unrecognized IMAGE_DOS_HEADER magic %04x\n", dos_header.e_magic); return FALSE; - } if (dos_header.e_lfanew >= 256 * 1024 * 1024) /* see RtlImageNtHeaderEx */ return FALSE; if (dos_header.e_lfanew + FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader.MajorLinkerVersion) > file_size.QuadPart) @@ -253,10 +268,7 @@ static BOOL SOFTPUB_HashPEFile(HANDLE file, HCRYPTHASH hash) return FALSE; if (nt_header.nt32.Signature != IMAGE_NT_SIGNATURE) - { - ERR("Unrecognized IMAGE_NT_HEADERS signature %08x\n", nt_header.nt32.Signature); return FALSE; - } if (nt_header.nt32.OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) { @@ -277,10 +289,7 @@ static BOOL SOFTPUB_HashPEFile(HANDLE file, HCRYPTHASH hash) secdir = nt_header.nt64.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY]; } else - { - ERR("Unrecognized OptionalHeader magic %04x\n", nt_header.nt32.OptionalHeader.Magic); return FALSE; - } if (secdir.VirtualAddress < security_dir + sizeof(IMAGE_DATA_DIRECTORY)) return FALSE; @@ -289,40 +298,10 @@ static BOOL SOFTPUB_HashPEFile(HANDLE file, HCRYPTHASH hash) if (secdir.VirtualAddress + secdir.Size != file_size.QuadPart) return FALSE; - /* Hash until checksum. */ - SetFilePointer(file, 0, NULL, FILE_BEGIN); - for (pos = 0; pos < checksum; pos += bytes_read) - { - ret = ReadFile(file, buffer, min(sizeof(buffer), checksum - pos), &bytes_read, NULL); - if (!ret || !bytes_read) - return FALSE; - if (!CryptHashData(hash, buffer, bytes_read, 0)) - return FALSE; - } - - /* Hash until the DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY] entry. */ - checksum += sizeof(DWORD); - SetFilePointer(file, checksum, NULL, FILE_BEGIN); - for (pos = checksum; pos < security_dir; pos += bytes_read) - { - ret = ReadFile(file, buffer, min(sizeof(buffer), security_dir - pos), &bytes_read, NULL); - if (!ret || !bytes_read) - return FALSE; - if (!CryptHashData(hash, buffer, bytes_read, 0)) - return FALSE; - } - - /* Hash until the end of the file. */ - security_dir += sizeof(IMAGE_DATA_DIRECTORY); - SetFilePointer(file, security_dir, NULL, FILE_BEGIN); - for (pos = security_dir; pos < secdir.VirtualAddress; pos += bytes_read) - { - ret = ReadFile(file, buffer, min(sizeof(buffer), secdir.VirtualAddress - pos), &bytes_read, NULL); - if (!ret || !bytes_read) - return FALSE; - if (!CryptHashData(hash, buffer, bytes_read, 0)) - return FALSE; - } + if (!hash_file_data( file, 0, checksum, hash )) return FALSE; + if (!hash_file_data( file, checksum + sizeof(DWORD), security_dir, hash )) return FALSE; + if (!hash_file_data( file, security_dir + sizeof(IMAGE_DATA_DIRECTORY), secdir.VirtualAddress, hash )) + return FALSE; return TRUE; } @@ -716,11 +695,9 @@ static LPCSTR filetime_to_str(const FILETIME *time) if (!time) return NULL; - GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, dateFmt, - sizeof(dateFmt) / sizeof(dateFmt[0])); + GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, dateFmt, ARRAY_SIZE(dateFmt)); FileTimeToSystemTime(time, &sysTime); - GetDateFormatA(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, dateFmt, date, - sizeof(date) / sizeof(date[0])); + GetDateFormatA(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, dateFmt, date, ARRAY_SIZE(date)); return date; } diff --git a/dll/win32/wintrust/wintrust.spec b/dll/win32/wintrust/wintrust.spec index b8c70add2c7..7ebd53f0396 100644 --- a/dll/win32/wintrust/wintrust.spec +++ b/dll/win32/wintrust/wintrust.spec @@ -1,14 +1,20 @@ @ stub AddPersonalTrustDBPages @ stub CatalogCompactHashDatabase +#@ stub ComputeFirstPageHash +#@ stub ConfigCiFinalPolicy +#@ stub ConfigCiPackageFamilyNameCheck @ stdcall CryptCATAdminAcquireContext(ptr ptr long) +@ stdcall CryptCATAdminAcquireContext2(ptr ptr wstr ptr long) @ stdcall CryptCATAdminAddCatalog(long wstr wstr long) @ stdcall CryptCATAdminCalcHashFromFileHandle(long ptr ptr long) +#@ stub CryptCATAdminCalcHashFromFileHandle2 @ stdcall CryptCATAdminEnumCatalogFromHash(long ptr long long ptr) @ stub CryptCATAdminPauseServiceForBackup @ stdcall CryptCATAdminReleaseCatalogContext(long long long) @ stdcall CryptCATAdminReleaseContext(long long) @ stdcall CryptCATAdminRemoveCatalog(ptr wstr long) @ stdcall CryptCATAdminResolveCatalogPath(ptr wstr ptr long) +#@ stub CryptCATAllocSortedMemberInfo @ stdcall CryptCATCDFClose(ptr) @ stub CryptCATCDFEnumAttributes @ stub CryptCATCDFEnumAttributesWithCDFTag @@ -22,6 +28,7 @@ @ stdcall CryptCATEnumerateAttr(ptr ptr ptr) @ stdcall CryptCATEnumerateCatAttr(ptr ptr) @ stdcall CryptCATEnumerateMember(long ptr) +#@ stub CryptCATFreeSortedMemberInfo @ stdcall CryptCATGetAttrInfo(ptr ptr wstr) @ stdcall CryptCATGetCatAttrInfo(ptr wstr ) @ stdcall CryptCATGetMemberInfo(ptr wstr) @@ -34,8 +41,10 @@ @ stub CryptCATStoreFromHandle @ stub CryptCATVerifyMember @ stdcall CryptSIPCreateIndirectData(ptr ptr ptr) +#@ stub CryptSIPGetCaps @ stub CryptSIPGetInfo @ stub CryptSIPGetRegWorkingFlags +#@ stub CryptSIPGetSealedDigest @ stdcall CryptSIPGetSignedDataMsg(ptr ptr long ptr ptr) @ stdcall CryptSIPPutSignedDataMsg(ptr long ptr long ptr) @ stdcall CryptSIPRemoveSignedDataMsg(ptr long) @@ -48,6 +57,7 @@ @ stdcall FindCertsByIssuer(ptr ptr ptr ptr long wstr long) @ stdcall GenericChainCertificateTrust(ptr) @ stdcall GenericChainFinalProv(ptr) +#@ stub GetAuthenticodeSha256Hash @ stdcall HTTPSCertificateTrust(ptr) @ stdcall HTTPSFinalProv(ptr) @ stdcall IsCatalogFile(ptr wstr) @@ -56,6 +66,7 @@ @ stub OfficeCleanupPolicy @ stub OfficeInitializePolicy @ stdcall OpenPersonalTrustDBDialog(ptr) +#@ stub OpenPersonalTrustDBDialogEx @ stdcall SoftpubAuthenticode(ptr) @ stdcall SoftpubCheckCert(ptr long long long) @ stdcall SoftpubCleanup(ptr) @@ -68,29 +79,48 @@ @ stub SoftpubLoadDefUsageCallData @ stdcall SoftpubLoadMessage(ptr) @ stdcall SoftpubLoadSignature(ptr) +#@ stub SrpCheckSmartlockerEAandProcessToken @ stub TrustDecode @ stub TrustFindIssuerCertificate @ stub TrustFreeDecode @ stdcall TrustIsCertificateSelfSigned(ptr) @ stub TrustOpenStores +#@ stub WTGetBioSignatureInfo +#@ stub WTGetPluginSignatureInfo +#@ stub WTGetSignatureInfo @ stdcall WTHelperCertCheckValidSignature(ptr) @ stub WTHelperCertFindIssuerCertificate @ stub WTHelperCertIsSelfSigned @ stub WTHelperCheckCertUsage @ stub WTHelperGetAgencyInfo @ stdcall WTHelperGetFileHandle(ptr) +#@ stub WTHelperGetFileHash @ stdcall WTHelperGetFileName(ptr) @ stdcall WTHelperGetKnownUsages(long ptr) @ stdcall WTHelperGetProvCertFromChain(ptr long) @ stdcall WTHelperGetProvPrivateDataFromChain(ptr ptr) @ stdcall WTHelperGetProvSignerFromChain(ptr long long long) +#@ stub WTHelperIsChainedToMicrosoft +#@ stub WTHelperIsChainedToMicrosoftFromStateData @ stub WTHelperIsInRootStore @ stub WTHelperOpenKnownStores @ stdcall WTHelperProvDataFromStateData(ptr) +#@ stub WTIsFirstConfigCiResultPreferred +#@ stub WTLogConfigCiScriptEvent +#@ stub WTLogConfigCiSignerEvent +#@ stub WTValidateBioSignaturePolicy +#@ stub WVTAsn1CatMemberInfo2Decode +#@ stub WVTAsn1CatMemberInfo2Encode @ stdcall WVTAsn1CatMemberInfoDecode(long str ptr long long ptr ptr) @ stdcall WVTAsn1CatMemberInfoEncode(long str ptr ptr ptr) @ stdcall WVTAsn1CatNameValueDecode(long str ptr long long ptr ptr) @ stdcall WVTAsn1CatNameValueEncode(long str ptr ptr ptr) +#@ stub WVTAsn1IntentToSealAttributeDecode +#@ stub WVTAsn1IntentToSealAttributeEncode +#@ stub WVTAsn1SealingSignatureAttributeDecode +#@ stub WVTAsn1SealingSignatureAttributeEncode +#@ stub WVTAsn1SealingTimestampAttributeDecode +#@ stub WVTAsn1SealingTimestampAttributeEncode @ stdcall WVTAsn1SpcFinancialCriteriaInfoDecode(long str ptr long long ptr ptr) @ stdcall WVTAsn1SpcFinancialCriteriaInfoEncode(long str ptr ptr ptr) @ stdcall WVTAsn1SpcIndirectDataContentDecode(long str ptr long long ptr ptr) @@ -118,6 +148,7 @@ @ stdcall WintrustGetRegPolicyFlags(ptr) @ stdcall WintrustLoadFunctionPointers(ptr ptr) @ stdcall WintrustRemoveActionID(ptr) +#@ stub WintrustSetDefaultIncludePEPageHashes @ stdcall WintrustSetRegPolicyFlags(long) @ stdcall mscat32DllRegisterServer() @ stdcall mscat32DllUnregisterServer() diff --git a/dll/win32/wintrust/wintrust_main.c b/dll/win32/wintrust/wintrust_main.c index bb5228286f6..34ce4fea555 100644 --- a/dll/win32/wintrust/wintrust_main.c +++ b/dll/win32/wintrust/wintrust_main.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> #define NONAMELESSUNION @@ -309,13 +307,11 @@ static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID, goto done; error: - if (provData) - { - WINTRUST_Free(provData->padwTrustStepErrors); - WINTRUST_Free(provData->u.pPDSip); - WINTRUST_Free(provData->psPfns); - WINTRUST_Free(provData); - } + WINTRUST_Free(provData->padwTrustStepErrors); + WINTRUST_Free(provData->u.pPDSip); + WINTRUST_Free(provData->psPfns); + WINTRUST_Free(provData); + done: TRACE("returning %08x\n", err); return err; @@ -502,13 +498,11 @@ static LONG WINTRUST_CertVerify(HWND hwnd, GUID *actionID, goto done; error: - if (provData) - { - WINTRUST_Free(provData->padwTrustStepErrors); - WINTRUST_Free(provData->u.pPDSip); - WINTRUST_Free(provData->psPfns); - WINTRUST_Free(provData); - } + WINTRUST_Free(provData->padwTrustStepErrors); + WINTRUST_Free(provData->u.pPDSip); + WINTRUST_Free(provData->psPfns); + WINTRUST_Free(provData); + done: TRACE("returning %08x\n", err); return err; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 7eeced4056e..54c585a517a 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -207,7 +207,7 @@ dll/win32/winmm # Forked at Wine-20050628 dll/win32/winmm/midimap # Forked at Wine-20050628 dll/win32/winmm/wavemap # Forked at Wine-20050628 dll/win32/winscard # Synced to WineStaging-4.18 -dll/win32/wintrust # Synced to WineStaging-3.9 +dll/win32/wintrust # Synced to WineStaging-4.18 dll/win32/wldap32 # Synced to WineStaging-3.3 dll/win32/wmi # Synced to WineStaging-2.9 dll/win32/wmiutils # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [WINSPOOL_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a2da235c67b04958fc7a2…
commit a2da235c67b04958fc7a28fdb2982a61536da08e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:08:30 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:08:30 2019 +0100 [WINSPOOL_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/winspool/info.c | 74 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/modules/rostests/winetests/winspool/info.c b/modules/rostests/winetests/winspool/info.c index 2526cd73833..475c13d9646 100644 --- a/modules/rostests/winetests/winspool/info.c +++ b/modules/rostests/winetests/winspool/info.c @@ -75,8 +75,6 @@ static BOOL (WINAPI * pGetPrinterDriverW)(HANDLE, LPWSTR, DWORD, LPBYTE, DWORD, static BOOL (WINAPI * pGetPrinterW)(HANDLE, DWORD, LPBYTE, DWORD, LPDWORD); static BOOL (WINAPI * pSetDefaultPrinterA)(LPCSTR); static DWORD (WINAPI * pXcvDataW)(HANDLE, LPCWSTR, PBYTE, DWORD, PBYTE, DWORD, PDWORD, PDWORD); -static BOOL (WINAPI * pIsValidDevmodeW)(PDEVMODEW, SIZE_T); - /* ################################ */ @@ -219,7 +217,7 @@ static struct monitor_entry * find_installed_monitor(void) if (entry) return entry; - num_tests = (sizeof(monitor_table)/sizeof(struct monitor_entry)); + num_tests = ARRAY_SIZE(monitor_table); /* cleanup */ DeleteMonitorA(NULL, env_x64, winetest); @@ -1456,7 +1454,7 @@ static void test_GetDefaultPrinter(void) SetLastError(ERROR_SUCCESS); retval = pGetDefaultPrinterA(buffer, &exact); - if (!retval || !exact || !strlen(buffer) || + if (!retval || !exact || !*buffer || (ERROR_SUCCESS != GetLastError())) { if ((ERROR_FILE_NOT_FOUND == GetLastError()) || (ERROR_INVALID_NAME == GetLastError())) @@ -2905,26 +2903,6 @@ static void test_DeviceCapabilities(void) GlobalFree(prn_dlg.hDevNames); } -static void test_IsValidDevmodeW(void) -{ - BOOL br; - - if (!pIsValidDevmodeW) - { - win_skip("IsValidDevmodeW not implemented.\n"); - return; - } - - br = pIsValidDevmodeW(NULL, 0); - ok(br == FALSE, "Got %d\n", br); - - br = pIsValidDevmodeW(NULL, 1); - ok(br == FALSE, "Got %d\n", br); - - br = pIsValidDevmodeW(NULL, sizeof(DEVMODEW)); - ok(br == FALSE, "Got %d\n", br); -} - static void test_OpenPrinter_defaults(void) { HANDLE printer; @@ -3044,6 +3022,53 @@ todo_wine ClosePrinter( printer ); } +static void test_IsValidDevmodeW(void) +{ + static const struct + { + DWORD dmFields; + WORD dmSize; + BOOL ret; + } test[] = + { + { 0, FIELD_OFFSET(DEVMODEW, dmFields) + 0, FALSE }, + { 0, FIELD_OFFSET(DEVMODEW, dmFields) + 1, FALSE }, + { 0, FIELD_OFFSET(DEVMODEW, dmFields) + 2, FALSE }, + { 0, FIELD_OFFSET(DEVMODEW, dmFields) + 3, FALSE }, + { 0, FIELD_OFFSET(DEVMODEW, dmFields) + 4, TRUE }, + + { DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, u1.s1.dmOrientation) + 0, FALSE }, + { DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, u1.s1.dmOrientation) + 1, FALSE }, + { DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, u1.s1.dmOrientation) + 2, TRUE }, + + { DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 0, FALSE }, + { DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 1, FALSE }, + { DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 2, FALSE }, + { DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 3, FALSE }, + { DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 4, TRUE }, + + }; + DEVMODEW dm; + int i; + BOOL ret; + + ret = IsValidDevmodeW(NULL, 0); + ok(!ret, "got %d\n", ret); + + ret = IsValidDevmodeW(NULL, sizeof(DEVMODEW)); + ok(!ret, "got %d\n", ret); + + memset(&dm, 0, sizeof(dm)); + + for (i = 0; i < ARRAY_SIZE(test); i++) + { + dm.dmSize = test[i].dmSize; + dm.dmFields = test[i].dmFields; + ret = IsValidDevmodeW(&dm, dm.dmSize); + ok(ret == test[i].ret, "%d: got %d\n", i, ret); + } +} + START_TEST(info) { hwinspool = LoadLibraryA("winspool.drv"); @@ -3055,7 +3080,6 @@ START_TEST(info) pGetPrinterW = (void *) GetProcAddress(hwinspool, "GetPrinterW"); pSetDefaultPrinterA = (void *) GetProcAddress(hwinspool, "SetDefaultPrinterA"); pXcvDataW = (void *) GetProcAddress(hwinspool, "XcvDataW"); - pIsValidDevmodeW = (void *) GetProcAddress(hwinspool, "IsValidDevmodeW"); on_win9x = check_win9x(); if (on_win9x)
5 years
1
0
0
0
[reactos] 01/01: [WINSCARD] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=79d5eedcb487e6fe5bfe9…
commit 79d5eedcb487e6fe5bfe9d860e71cf81db84d4f2 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:08:06 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:08:06 2019 +0100 [WINSCARD] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/winscard/precomp.h | 2 -- dll/win32/winscard/stubs.c | 11 ----------- dll/win32/winscard/winscard.c | 8 +++++++- media/doc/README.WINE | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/dll/win32/winscard/precomp.h b/dll/win32/winscard/precomp.h index 6cce6bbc345..c5c29182276 100644 --- a/dll/win32/winscard/precomp.h +++ b/dll/win32/winscard/precomp.h @@ -2,8 +2,6 @@ #ifndef _WINSCARD_PCH_ #define _WINSCARD_PCH_ -#include <wine/config.h> - #include <stdarg.h> #define WIN32_NO_STATUS diff --git a/dll/win32/winscard/stubs.c b/dll/win32/winscard/stubs.c index 3c502cf1f07..c12bcda50ec 100644 --- a/dll/win32/winscard/stubs.c +++ b/dll/win32/winscard/stubs.c @@ -23,17 +23,6 @@ SCardBeginTransaction(SCARDHANDLE hCard) return SCARD_F_UNKNOWN_ERROR; } -/* - * @unimplemented - */ -LONG -WINAPI -SCardCancel(SCARDCONTEXT hContext) -{ - UNIMPLEMENTED; - return SCARD_F_UNKNOWN_ERROR; -} - /* * @unimplemented */ diff --git a/dll/win32/winscard/winscard.c b/dll/win32/winscard/winscard.c index a8a1735c2be..d524483ffc3 100644 --- a/dll/win32/winscard/winscard.c +++ b/dll/win32/winscard/winscard.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdarg.h> #include "windef.h" #include "winbase.h" @@ -141,3 +140,10 @@ LONG WINAPI SCardListReadersW(SCARDCONTEXT context, const WCHAR *groups, WCHAR * FIXME("(%lx, %s, %p, %p) stub\n", context, debugstr_w(groups), readers, buflen); return SCARD_E_NO_READERS_AVAILABLE; } + +LONG WINAPI SCardCancel(SCARDCONTEXT context) +{ + FIXME("(%lx) stub\n", context); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return SCARD_F_INTERNAL_ERROR; +} diff --git a/media/doc/README.WINE b/media/doc/README.WINE index e27bd33f0e5..7eeced4056e 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -206,7 +206,7 @@ dll/win32/wininet # Synced to WineStaging-4.18 dll/win32/winmm # Forked at Wine-20050628 dll/win32/winmm/midimap # Forked at Wine-20050628 dll/win32/winmm/wavemap # Forked at Wine-20050628 -dll/win32/winscard # Synced to WineStaging-3.3 +dll/win32/winscard # Synced to WineStaging-4.18 dll/win32/wintrust # Synced to WineStaging-3.9 dll/win32/wldap32 # Synced to WineStaging-3.3 dll/win32/wmi # Synced to WineStaging-2.9
5 years
1
0
0
0
[reactos] 01/01: [WINMM_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=11f461898427661d59aae…
commit 11f461898427661d59aae2deebeced2c2e21bdf7 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:07:44 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:07:44 2019 +0100 [WINMM_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/winmm/CMakeLists.txt | 1 + modules/rostests/winetests/winmm/capture.c | 23 +- modules/rostests/winetests/winmm/generated.c | 5042 +++++++++++++++++++++++ modules/rostests/winetests/winmm/joystick.c | 4 +- modules/rostests/winetests/winmm/midi.c | 338 +- modules/rostests/winetests/winmm/mmio.c | 2 +- modules/rostests/winetests/winmm/wave.c | 41 +- modules/rostests/winetests/winmm/winmm_test.h | 1 - 8 files changed, 5434 insertions(+), 18 deletions(-) diff --git a/modules/rostests/winetests/winmm/CMakeLists.txt b/modules/rostests/winetests/winmm/CMakeLists.txt index 6412b65df13..58cc1eb8072 100644 --- a/modules/rostests/winetests/winmm/CMakeLists.txt +++ b/modules/rostests/winetests/winmm/CMakeLists.txt @@ -1,6 +1,7 @@ list(APPEND SOURCE capture.c + generated.c joystick.c mci.c mcicda.c diff --git a/modules/rostests/winetests/winmm/capture.c b/modules/rostests/winetests/winmm/capture.c index 54c379317cd..4290c358a9f 100644 --- a/modules/rostests/winetests/winmm/capture.c +++ b/modules/rostests/winetests/winmm/capture.c @@ -141,7 +141,8 @@ static void wave_in_test_deviceIn(int device, WAVEFORMATEX *pwfx, DWORD format, DWORD nSamplesPerSec = pwfx->nSamplesPerSec; win=NULL; - rc=waveInOpen(&win,device,pwfx,(DWORD_PTR)hevent,0,CALLBACK_EVENT|flags); + flags |= CALLBACK_EVENT; + rc=waveInOpen(&win,device,pwfx,(DWORD_PTR)hevent,0,flags); /* Note: Win9x doesn't know WAVE_FORMAT_DIRECT */ ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_BADDEVICEID || rc==MMSYSERR_NOTENABLED || rc==MMSYSERR_NODRIVER || @@ -154,8 +155,7 @@ static void wave_in_test_deviceIn(int device, WAVEFORMATEX *pwfx, DWORD format, (rc==MMSYSERR_INVALFLAG && (flags & WAVE_FORMAT_DIRECT)), "waveInOpen(%s): format=%dx%2dx%d flags=%x(%s) rc=%s\n", dev_name(device),pwfx->nSamplesPerSec,pwfx->wBitsPerSample, - pwfx->nChannels,CALLBACK_EVENT|flags, - wave_open_flags(CALLBACK_EVENT|flags),wave_in_error(rc)); + pwfx->nChannels,flags,wave_open_flags(flags),wave_in_error(rc)); if ((rc==WAVERR_BADFORMAT || rc==MMSYSERR_NOTSUPPORTED) && (flags & WAVE_FORMAT_DIRECT) && (pcaps->dwFormats & format)) trace(" Reason: The device lists this format as supported in its " @@ -261,10 +261,9 @@ static void wave_in_test_deviceIn(int device, WAVEFORMATEX *pwfx, DWORD format, rc==MMSYSERR_ALLOCATED || ((rc==WAVERR_BADFORMAT || rc==MMSYSERR_NOTSUPPORTED) && !(pcaps->dwFormats & format)), - "waveOutOpen(%s) format=%dx%2dx%d flags=%x(%s) rc=%s\n", + "waveOutOpen(%s) format=%dx%2dx%d flags=CALLBACK_EVENT rc=%s\n", dev_name(device),pwfx->nSamplesPerSec,pwfx->wBitsPerSample, - pwfx->nChannels,CALLBACK_EVENT|flags, - wave_open_flags(CALLBACK_EVENT),wave_out_error(rc)); + pwfx->nChannels,wave_out_error(rc)); if (rc==MMSYSERR_NOERROR) { rc=waveOutPrepareHeader(wout, &frag, sizeof(frag)); @@ -398,7 +397,7 @@ static void wave_in_test_device(UINT_PTR device) HeapFree(GetProcessHeap(), 0, nameA); - for (f=0;f<NB_WIN_FORMATS;f++) { + for (f = 0; f < ARRAY_SIZE(win_formats); f++) { format.wFormatTag=WAVE_FORMAT_PCM; format.nChannels=win_formats[f][3]; format.wBitsPerSample=win_formats[f][2]; @@ -661,6 +660,16 @@ static void wave_in_tests(void) ok((ndev == 0 && (preferred == -1 || broken(preferred != -1))) || preferred < ndev, "Got invalid preferred device: 0x%x\n", preferred); + rc = waveInMessage((HWAVEIN)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, + (DWORD_PTR)-1 , 0); + ok(rc == MMSYSERR_INVALPARAM || rc == MMSYSERR_BADDEVICEID, /* w2008+wvista */ + "waveInMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u\n", rc); + + rc = waveInMessage((HWAVEIN)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, + 0, (DWORD_PTR)&status); + ok(rc == MMSYSERR_INVALPARAM || rc == MMSYSERR_BADDEVICEID, /* w2008+wvista */ + "waveInMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u\n", rc); + rc=waveInGetDevCapsA(ndev+1,&capsA,sizeof(capsA)); ok(rc==MMSYSERR_BADDEVICEID, "waveInGetDevCapsA(%s): MMSYSERR_BADDEVICEID expected, got %s\n", diff --git a/modules/rostests/winetests/winmm/generated.c b/modules/rostests/winetests/winmm/generated.c new file mode 100644 index 00000000000..dd5e21ce489 --- /dev/null +++ b/modules/rostests/winetests/winmm/generated.c @@ -0,0 +1,5042 @@ +/* File generated automatically from tools/winapi/tests.dat; do not edit! */ +/* This file can be copied, modified and distributed without restriction. */ + +/* + * Unit tests for data structure packing + */ + +#ifdef __REACTOS__ +#define _WINE +#else +#define WINVER 0x0501 +#define _WIN32_IE 0x0501 +#define _WIN32_WINNT 0x0501 +#endif + +#define WINE_NOWINSOCK + +#include "windef.h" +#include "mmsystem.h" +#include "digitalv.h" + +#include "wine/test.h" + +/*********************************************************************** + * Compatibility macros + */ + +#define DWORD_PTR UINT_PTR +#define LONG_PTR INT_PTR +#define ULONG_PTR UINT_PTR + +/*********************************************************************** + * Windows API extension + */ + +#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) +# define _TYPE_ALIGNMENT(type) __alignof(type) +#elif defined(__GNUC__) +# define _TYPE_ALIGNMENT(type) __alignof__(type) +#else +/* + * FIXME: May not be possible without a compiler extension + * (if type is not just a name that is, otherwise the normal + * TYPE_ALIGNMENT can be used) + */ +#endif + +#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) +#pragma warning(disable:4116) +#endif + +#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) +# define TYPE_ALIGNMENT _TYPE_ALIGNMENT +#endif + +/*********************************************************************** + * Test helper macros + */ + +#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); + +#ifdef TYPE_ALIGNMENT +# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); +#else +# define TEST_TYPE_ALIGN(type, align) +#endif + +#ifdef _TYPE_ALIGNMENT +# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); +# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); +#else +# define TEST_TARGET_ALIGN(type, align) +# define TEST_FIELD_ALIGN(type, field, align) +#endif + +#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); + +#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) +#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) +#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); +#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); + + +#ifdef _WIN64 + +static void test_pack_MMTIME(void) +{ + /* MMTIME (pack 1) */ + TEST_FIELD_SIZE (MMTIME, wType, 4) + TEST_FIELD_ALIGN (MMTIME, wType, 1) + TEST_FIELD_OFFSET(MMTIME, wType, 0) +} + +static void test_pack_DRVCONFIGINFO(void) +{ + /* DRVCONFIGINFO (pack 1) */ + TEST_TYPE_SIZE (DRVCONFIGINFO, 20) + TEST_TYPE_ALIGN (DRVCONFIGINFO, 1) + TEST_FIELD_SIZE (DRVCONFIGINFO, dwDCISize, 4) + TEST_FIELD_ALIGN (DRVCONFIGINFO, dwDCISize, 1) + TEST_FIELD_OFFSET(DRVCONFIGINFO, dwDCISize, 0) + TEST_FIELD_SIZE (DRVCONFIGINFO, lpszDCISectionName, 8) + TEST_FIELD_ALIGN (DRVCONFIGINFO, lpszDCISectionName, 1) + TEST_FIELD_OFFSET(DRVCONFIGINFO, lpszDCISectionName, 4) + TEST_FIELD_SIZE (DRVCONFIGINFO, lpszDCIAliasName, 8) + TEST_FIELD_ALIGN (DRVCONFIGINFO, lpszDCIAliasName, 1) + TEST_FIELD_OFFSET(DRVCONFIGINFO, lpszDCIAliasName, 12) +} + +static void test_pack_WAVEHDR(void) +{ + /* WAVEHDR (pack 1) */ + TEST_TYPE_SIZE (WAVEHDR, 48) + TEST_TYPE_ALIGN (WAVEHDR, 1) + TEST_FIELD_SIZE (WAVEHDR, lpData, 8) + TEST_FIELD_ALIGN (WAVEHDR, lpData, 1) + TEST_FIELD_OFFSET(WAVEHDR, lpData, 0) + TEST_FIELD_SIZE (WAVEHDR, dwBufferLength, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwBufferLength, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwBufferLength, 8) + TEST_FIELD_SIZE (WAVEHDR, dwBytesRecorded, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwBytesRecorded, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwBytesRecorded, 12) + TEST_FIELD_SIZE (WAVEHDR, dwUser, 8) + TEST_FIELD_ALIGN (WAVEHDR, dwUser, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwUser, 16) + TEST_FIELD_SIZE (WAVEHDR, dwFlags, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwFlags, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwFlags, 24) + TEST_FIELD_SIZE (WAVEHDR, dwLoops, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwLoops, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwLoops, 28) + TEST_FIELD_SIZE (WAVEHDR, lpNext, 8) + TEST_FIELD_ALIGN (WAVEHDR, lpNext, 1) + TEST_FIELD_OFFSET(WAVEHDR, lpNext, 32) + TEST_FIELD_SIZE (WAVEHDR, reserved, 8) + TEST_FIELD_ALIGN (WAVEHDR, reserved, 1) + TEST_FIELD_OFFSET(WAVEHDR, reserved, 40) +} + +static void test_pack_WAVEOUTCAPSA(void) +{ + /* WAVEOUTCAPSA (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPSA, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSA, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSA, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPSA, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSA, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSA, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSA, vDriverVersion, 4) +} + +static void test_pack_WAVEOUTCAPSW(void) +{ + /* WAVEOUTCAPSW (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPSW, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSW, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSW, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPSW, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSW, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSW, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSW, vDriverVersion, 4) +} + +static void test_pack_WAVEOUTCAPS2A(void) +{ + /* WAVEOUTCAPS2A (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2A, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2A, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2A, vDriverVersion, 4) +} + +static void test_pack_WAVEOUTCAPS2W(void) +{ + /* WAVEOUTCAPS2W (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2W, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2W, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2W, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPSA(void) +{ + /* WAVEINCAPSA (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPSA, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSA, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSA, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPSA, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSA, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSA, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPSA, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPSW(void) +{ + /* WAVEINCAPSW (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPSW, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSW, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSW, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPSW, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSW, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSW, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPSW, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPS2A(void) +{ + /* WAVEINCAPS2A (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2A, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2A, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2A, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPS2W(void) +{ + /* WAVEINCAPS2W (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2W, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2W, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2W, vDriverVersion, 4) +} + +static void test_pack_WAVEFORMAT(void) +{ + /* WAVEFORMAT (pack 1) */ + TEST_TYPE_SIZE (WAVEFORMAT, 14) + TEST_TYPE_ALIGN (WAVEFORMAT, 1) + TEST_FIELD_SIZE (WAVEFORMAT, wFormatTag, 2) + TEST_FIELD_ALIGN (WAVEFORMAT, wFormatTag, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, wFormatTag, 0) + TEST_FIELD_SIZE (WAVEFORMAT, nChannels, 2) + TEST_FIELD_ALIGN (WAVEFORMAT, nChannels, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nChannels, 2) + TEST_FIELD_SIZE (WAVEFORMAT, nSamplesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMAT, nSamplesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nSamplesPerSec, 4) + TEST_FIELD_SIZE (WAVEFORMAT, nAvgBytesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMAT, nAvgBytesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nAvgBytesPerSec, 8) + TEST_FIELD_SIZE (WAVEFORMAT, nBlockAlign, 2) + TEST_FIELD_ALIGN (WAVEFORMAT, nBlockAlign, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nBlockAlign, 12) +} + +static void test_pack_PCMWAVEFORMAT(void) +{ + /* PCMWAVEFORMAT (pack 1) */ + TEST_TYPE_SIZE (PCMWAVEFORMAT, 16) + TEST_TYPE_ALIGN (PCMWAVEFORMAT, 1) + TEST_FIELD_SIZE (PCMWAVEFORMAT, wf, 14) + TEST_FIELD_ALIGN (PCMWAVEFORMAT, wf, 1) + TEST_FIELD_OFFSET(PCMWAVEFORMAT, wf, 0) + TEST_FIELD_SIZE (PCMWAVEFORMAT, wBitsPerSample, 2) + TEST_FIELD_ALIGN (PCMWAVEFORMAT, wBitsPerSample, 1) + TEST_FIELD_OFFSET(PCMWAVEFORMAT, wBitsPerSample, 14) +} + +static void test_pack_WAVEFORMATEX(void) +{ + /* WAVEFORMATEX (pack 1) */ + TEST_TYPE_SIZE (WAVEFORMATEX, 18) + TEST_TYPE_ALIGN (WAVEFORMATEX, 1) + TEST_FIELD_SIZE (WAVEFORMATEX, wFormatTag, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, wFormatTag, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, wFormatTag, 0) + TEST_FIELD_SIZE (WAVEFORMATEX, nChannels, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, nChannels, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nChannels, 2) + TEST_FIELD_SIZE (WAVEFORMATEX, nSamplesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMATEX, nSamplesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nSamplesPerSec, 4) + TEST_FIELD_SIZE (WAVEFORMATEX, nAvgBytesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMATEX, nAvgBytesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nAvgBytesPerSec, 8) + TEST_FIELD_SIZE (WAVEFORMATEX, nBlockAlign, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, nBlockAlign, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nBlockAlign, 12) + TEST_FIELD_SIZE (WAVEFORMATEX, wBitsPerSample, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, wBitsPerSample, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, wBitsPerSample, 14) + TEST_FIELD_SIZE (WAVEFORMATEX, cbSize, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, cbSize, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, cbSize, 16) +} + +static void test_pack_MIDIOUTCAPSA(void) +{ + /* MIDIOUTCAPSA (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPSA, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSA, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSA, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPSA, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSA, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSA, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSA, vDriverVersion, 4) +} + +static void test_pack_MIDIOUTCAPSW(void) +{ + /* MIDIOUTCAPSW (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPSW, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSW, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSW, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPSW, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSW, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSW, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSW, vDriverVersion, 4) +} + +static void test_pack_MIDIOUTCAPS2A(void) +{ + /* MIDIOUTCAPS2A (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2A, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2A, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2A, vDriverVersion, 4) +} + +static void test_pack_MIDIOUTCAPS2W(void) +{ + /* MIDIOUTCAPS2W (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2W, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2W, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2W, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPSA(void) +{ + /* MIDIINCAPSA (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPSA, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSA, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSA, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPSA, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSA, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSA, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPSA, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPSW(void) +{ + /* MIDIINCAPSW (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPSW, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSW, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSW, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPSW, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSW, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSW, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPSW, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPS2A(void) +{ + /* MIDIINCAPS2A (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2A, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2A, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2A, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPS2W(void) +{ + /* MIDIINCAPS2W (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2W, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2W, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2W, vDriverVersion, 4) +} + +static void test_pack_MIDIHDR(void) +{ + /* MIDIHDR (pack 1) */ + TEST_TYPE_SIZE (MIDIHDR, 112) + TEST_TYPE_ALIGN (MIDIHDR, 1) + TEST_FIELD_SIZE (MIDIHDR, lpData, 8) + TEST_FIELD_ALIGN (MIDIHDR, lpData, 1) + TEST_FIELD_OFFSET(MIDIHDR, lpData, 0) + TEST_FIELD_SIZE (MIDIHDR, dwBufferLength, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwBufferLength, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwBufferLength, 8) + TEST_FIELD_SIZE (MIDIHDR, dwBytesRecorded, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwBytesRecorded, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwBytesRecorded, 12) + TEST_FIELD_SIZE (MIDIHDR, dwUser, 8) + TEST_FIELD_ALIGN (MIDIHDR, dwUser, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwUser, 16) + TEST_FIELD_SIZE (MIDIHDR, dwFlags, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwFlags, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwFlags, 24) + TEST_FIELD_SIZE (MIDIHDR, lpNext, 8) + TEST_FIELD_ALIGN (MIDIHDR, lpNext, 1) + TEST_FIELD_OFFSET(MIDIHDR, lpNext, 28) + TEST_FIELD_SIZE (MIDIHDR, reserved, 8) + TEST_FIELD_ALIGN (MIDIHDR, reserved, 1) + TEST_FIELD_OFFSET(MIDIHDR, reserved, 36) + TEST_FIELD_SIZE (MIDIHDR, dwOffset, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwOffset, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwOffset, 44) + TEST_FIELD_SIZE (MIDIHDR, dwReserved, 64) + TEST_FIELD_ALIGN (MIDIHDR, dwReserved, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwReserved, 48) +} + +static void test_pack_MIDIEVENT(void) +{ + /* MIDIEVENT (pack 1) */ + TEST_TYPE_SIZE (MIDIEVENT, 16) + TEST_TYPE_ALIGN (MIDIEVENT, 1) + TEST_FIELD_SIZE (MIDIEVENT, dwDeltaTime, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwDeltaTime, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwDeltaTime, 0) + TEST_FIELD_SIZE (MIDIEVENT, dwStreamID, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwStreamID, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwStreamID, 4) + TEST_FIELD_SIZE (MIDIEVENT, dwEvent, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwEvent, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwEvent, 8) + TEST_FIELD_SIZE (MIDIEVENT, dwParms, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwParms, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwParms, 12) +} + +static void test_pack_AUXCAPSA(void) +{ + /* AUXCAPSA (pack 1) */ + TEST_FIELD_SIZE (AUXCAPSA, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPSA, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPSA, wMid, 0) + TEST_FIELD_SIZE (AUXCAPSA, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPSA, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPSA, wPid, 2) + TEST_FIELD_SIZE (AUXCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPSA, vDriverVersion, 4) +} + +static void test_pack_AUXCAPSW(void) +{ + /* AUXCAPSW (pack 1) */ + TEST_FIELD_SIZE (AUXCAPSW, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPSW, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPSW, wMid, 0) + TEST_FIELD_SIZE (AUXCAPSW, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPSW, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPSW, wPid, 2) + TEST_FIELD_SIZE (AUXCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPSW, vDriverVersion, 4) +} + +static void test_pack_AUXCAPS2A(void) +{ + /* AUXCAPS2A (pack 1) */ + TEST_FIELD_SIZE (AUXCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPS2A, wMid, 0) + TEST_FIELD_SIZE (AUXCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPS2A, wPid, 2) + TEST_FIELD_SIZE (AUXCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPS2A, vDriverVersion, 4) +} + +static void test_pack_AUXCAPS2W(void) +{ + /* AUXCAPS2W (pack 1) */ + TEST_FIELD_SIZE (AUXCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPS2W, wMid, 0) + TEST_FIELD_SIZE (AUXCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPS2W, wPid, 2) + TEST_FIELD_SIZE (AUXCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPS2W, vDriverVersion, 4) +} + +static void test_pack_TIMECAPS(void) +{ + /* TIMECAPS (pack 1) */ + TEST_TYPE_SIZE (TIMECAPS, 8) + TEST_TYPE_ALIGN (TIMECAPS, 1) + TEST_FIELD_SIZE (TIMECAPS, wPeriodMin, 4) + TEST_FIELD_ALIGN (TIMECAPS, wPeriodMin, 1) + TEST_FIELD_OFFSET(TIMECAPS, wPeriodMin, 0) + TEST_FIELD_SIZE (TIMECAPS, wPeriodMax, 4) + TEST_FIELD_ALIGN (TIMECAPS, wPeriodMax, 1) + TEST_FIELD_OFFSET(TIMECAPS, wPeriodMax, 4) +} + +static void test_pack_JOYCAPSA(void) +{ + /* JOYCAPSA (pack 1) */ + TEST_FIELD_SIZE (JOYCAPSA, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPSA, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPSA, wMid, 0) + TEST_FIELD_SIZE (JOYCAPSA, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPSA, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPSA, wPid, 2) +} + +static void test_pack_JOYCAPSW(void) +{ + /* JOYCAPSW (pack 1) */ + TEST_FIELD_SIZE (JOYCAPSW, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPSW, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPSW, wMid, 0) + TEST_FIELD_SIZE (JOYCAPSW, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPSW, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPSW, wPid, 2) +} + +static void test_pack_JOYCAPS2A(void) +{ + /* JOYCAPS2A (pack 1) */ + TEST_FIELD_SIZE (JOYCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPS2A, wMid, 0) + TEST_FIELD_SIZE (JOYCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPS2A, wPid, 2) +} + +static void test_pack_JOYCAPS2W(void) +{ + /* JOYCAPS2W (pack 1) */ + TEST_FIELD_SIZE (JOYCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPS2W, wMid, 0) + TEST_FIELD_SIZE (JOYCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPS2W, wPid, 2) +} + +static void test_pack_JOYINFO(void) +{ + /* JOYINFO (pack 1) */ + TEST_TYPE_SIZE (JOYINFO, 16) + TEST_TYPE_ALIGN (JOYINFO, 1) + TEST_FIELD_SIZE (JOYINFO, wXpos, 4) + TEST_FIELD_ALIGN (JOYINFO, wXpos, 1) + TEST_FIELD_OFFSET(JOYINFO, wXpos, 0) + TEST_FIELD_SIZE (JOYINFO, wYpos, 4) + TEST_FIELD_ALIGN (JOYINFO, wYpos, 1) + TEST_FIELD_OFFSET(JOYINFO, wYpos, 4) + TEST_FIELD_SIZE (JOYINFO, wZpos, 4) + TEST_FIELD_ALIGN (JOYINFO, wZpos, 1) + TEST_FIELD_OFFSET(JOYINFO, wZpos, 8) + TEST_FIELD_SIZE (JOYINFO, wButtons, 4) + TEST_FIELD_ALIGN (JOYINFO, wButtons, 1) + TEST_FIELD_OFFSET(JOYINFO, wButtons, 12) +} + +static void test_pack_JOYINFOEX(void) +{ + /* JOYINFOEX (pack 1) */ + TEST_TYPE_SIZE (JOYINFOEX, 52) + TEST_TYPE_ALIGN (JOYINFOEX, 1) + TEST_FIELD_SIZE (JOYINFOEX, dwSize, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwSize, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwSize, 0) + TEST_FIELD_SIZE (JOYINFOEX, dwFlags, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwFlags, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwFlags, 4) + TEST_FIELD_SIZE (JOYINFOEX, dwXpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwXpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwXpos, 8) + TEST_FIELD_SIZE (JOYINFOEX, dwYpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwYpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwYpos, 12) + TEST_FIELD_SIZE (JOYINFOEX, dwZpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwZpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwZpos, 16) + TEST_FIELD_SIZE (JOYINFOEX, dwRpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwRpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwRpos, 20) + TEST_FIELD_SIZE (JOYINFOEX, dwUpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwUpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwUpos, 24) + TEST_FIELD_SIZE (JOYINFOEX, dwVpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwVpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwVpos, 28) + TEST_FIELD_SIZE (JOYINFOEX, dwButtons, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwButtons, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwButtons, 32) + TEST_FIELD_SIZE (JOYINFOEX, dwButtonNumber, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwButtonNumber, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwButtonNumber, 36) + TEST_FIELD_SIZE (JOYINFOEX, dwPOV, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwPOV, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwPOV, 40) + TEST_FIELD_SIZE (JOYINFOEX, dwReserved1, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwReserved1, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwReserved1, 44) + TEST_FIELD_SIZE (JOYINFOEX, dwReserved2, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwReserved2, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwReserved2, 48) +} + +static void test_pack_MIXERCAPSA(void) +{ + /* MIXERCAPSA (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPSA, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPSA, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPSA, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPSA, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPSA, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPSA, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPSA, vDriverVersion, 4) +} + +static void test_pack_MIXERCAPSW(void) +{ + /* MIXERCAPSW (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPSW, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPSW, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPSW, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPSW, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPSW, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPSW, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPSW, vDriverVersion, 4) +} + +static void test_pack_MIXERCAPS2A(void) +{ + /* MIXERCAPS2A (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2A, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2A, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPS2A, vDriverVersion, 4) +} + +static void test_pack_MIXERCAPS2W(void) +{ + /* MIXERCAPS2W (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2W, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2W, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPS2W, vDriverVersion, 4) +} + +static void test_pack_MIXERLINEA(void) +{ + /* MIXERLINEA (pack 1) */ + TEST_FIELD_SIZE (MIXERLINEA, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cbStruct, 0) + TEST_FIELD_SIZE (MIXERLINEA, dwDestination, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwDestination, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwDestination, 4) + TEST_FIELD_SIZE (MIXERLINEA, dwSource, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwSource, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwSource, 8) + TEST_FIELD_SIZE (MIXERLINEA, dwLineID, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwLineID, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwLineID, 12) + TEST_FIELD_SIZE (MIXERLINEA, fdwLine, 4) + TEST_FIELD_ALIGN (MIXERLINEA, fdwLine, 1) + TEST_FIELD_OFFSET(MIXERLINEA, fdwLine, 16) + TEST_FIELD_SIZE (MIXERLINEA, dwUser, 8) + TEST_FIELD_ALIGN (MIXERLINEA, dwUser, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwUser, 20) + TEST_FIELD_SIZE (MIXERLINEA, dwComponentType, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwComponentType, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwComponentType, 28) + TEST_FIELD_SIZE (MIXERLINEA, cChannels, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cChannels, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cChannels, 32) + TEST_FIELD_SIZE (MIXERLINEA, cConnections, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cConnections, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cConnections, 36) + TEST_FIELD_SIZE (MIXERLINEA, cControls, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cControls, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cControls, 40) +} + +static void test_pack_MIXERLINEW(void) +{ + /* MIXERLINEW (pack 1) */ + TEST_FIELD_SIZE (MIXERLINEW, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cbStruct, 0) + TEST_FIELD_SIZE (MIXERLINEW, dwDestination, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwDestination, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwDestination, 4) + TEST_FIELD_SIZE (MIXERLINEW, dwSource, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwSource, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwSource, 8) + TEST_FIELD_SIZE (MIXERLINEW, dwLineID, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwLineID, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwLineID, 12) + TEST_FIELD_SIZE (MIXERLINEW, fdwLine, 4) + TEST_FIELD_ALIGN (MIXERLINEW, fdwLine, 1) + TEST_FIELD_OFFSET(MIXERLINEW, fdwLine, 16) + TEST_FIELD_SIZE (MIXERLINEW, dwUser, 8) + TEST_FIELD_ALIGN (MIXERLINEW, dwUser, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwUser, 20) + TEST_FIELD_SIZE (MIXERLINEW, dwComponentType, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwComponentType, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwComponentType, 28) + TEST_FIELD_SIZE (MIXERLINEW, cChannels, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cChannels, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cChannels, 32) + TEST_FIELD_SIZE (MIXERLINEW, cConnections, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cConnections, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cConnections, 36) + TEST_FIELD_SIZE (MIXERLINEW, cControls, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cControls, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cControls, 40) +} + +static void test_pack_MIXERCONTROLA(void) +{ + /* MIXERCONTROLA (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLA, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, cbStruct, 0) + TEST_FIELD_SIZE (MIXERCONTROLA, dwControlID, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, dwControlID, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, dwControlID, 4) + TEST_FIELD_SIZE (MIXERCONTROLA, dwControlType, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, dwControlType, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, dwControlType, 8) + TEST_FIELD_SIZE (MIXERCONTROLA, fdwControl, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, fdwControl, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, fdwControl, 12) + TEST_FIELD_SIZE (MIXERCONTROLA, cMultipleItems, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, cMultipleItems, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, cMultipleItems, 16) +} + +static void test_pack_MIXERCONTROLW(void) +{ + /* MIXERCONTROLW (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLW, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, cbStruct, 0) + TEST_FIELD_SIZE (MIXERCONTROLW, dwControlID, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, dwControlID, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, dwControlID, 4) + TEST_FIELD_SIZE (MIXERCONTROLW, dwControlType, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, dwControlType, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, dwControlType, 8) + TEST_FIELD_SIZE (MIXERCONTROLW, fdwControl, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, fdwControl, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, fdwControl, 12) + TEST_FIELD_SIZE (MIXERCONTROLW, cMultipleItems, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, cMultipleItems, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, cMultipleItems, 16) +} + +static void test_pack_MIXERCONTROLDETAILS(void) +{ + /* MIXERCONTROLDETAILS (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLDETAILS, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS, cbStruct, 0) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS, dwControlID, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS, dwControlID, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS, dwControlID, 4) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS, cChannels, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS, cChannels, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS, cChannels, 8) +} + +static void test_pack_MIXERCONTROLDETAILS_LISTTEXTA(void) +{ + /* MIXERCONTROLDETAILS_LISTTEXTA (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTA, dwParam1, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTA, dwParam1, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTA, dwParam1, 0) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTA, dwParam2, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTA, dwParam2, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTA, dwParam2, 4) +} + +static void test_pack_MIXERCONTROLDETAILS_LISTTEXTW(void) +{ + /* MIXERCONTROLDETAILS_LISTTEXTW (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTW, dwParam1, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTW, dwParam1, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTW, dwParam1, 0) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTW, dwParam2, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTW, dwParam2, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTW, dwParam2, 4) +} + +static void test_pack_MIXERCONTROLDETAILS_BOOLEAN(void) +{ + /* MIXERCONTROLDETAILS_BOOLEAN (pack 1) */ + TEST_TYPE_SIZE (MIXERCONTROLDETAILS_BOOLEAN, 4) + TEST_TYPE_ALIGN (MIXERCONTROLDETAILS_BOOLEAN, 1) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_BOOLEAN, fValue, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_BOOLEAN, fValue, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_BOOLEAN, fValue, 0) +} + +static void test_pack_MIXERCONTROLDETAILS_SIGNED(void) +{ + /* MIXERCONTROLDETAILS_SIGNED (pack 1) */ + TEST_TYPE_SIZE (MIXERCONTROLDETAILS_SIGNED, 4) + TEST_TYPE_ALIGN (MIXERCONTROLDETAILS_SIGNED, 1) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_SIGNED, lValue, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_SIGNED, lValue, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_SIGNED, lValue, 0) +} + +static void test_pack_MIXERCONTROLDETAILS_UNSIGNED(void) +{ + /* MIXERCONTROLDETAILS_UNSIGNED (pack 1) */ + TEST_TYPE_SIZE (MIXERCONTROLDETAILS_UNSIGNED, 4) + TEST_TYPE_ALIGN (MIXERCONTROLDETAILS_UNSIGNED, 1) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_UNSIGNED, dwValue, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_UNSIGNED, dwValue, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_UNSIGNED, dwValue, 0) +} + +static void test_pack_MMIOINFO(void) +{ + /* MMIOINFO (pack 1) */ + TEST_FIELD_SIZE (MMIOINFO, dwFlags, 4) + TEST_FIELD_ALIGN (MMIOINFO, dwFlags, 1) + TEST_FIELD_OFFSET(MMIOINFO, dwFlags, 0) + TEST_FIELD_SIZE (MMIOINFO, fccIOProc, 4) + TEST_FIELD_ALIGN (MMIOINFO, fccIOProc, 1) + TEST_FIELD_OFFSET(MMIOINFO, fccIOProc, 4) + TEST_FIELD_SIZE (MMIOINFO, pIOProc, 8) + TEST_FIELD_ALIGN (MMIOINFO, pIOProc, 1) + TEST_FIELD_OFFSET(MMIOINFO, pIOProc, 8) + TEST_FIELD_SIZE (MMIOINFO, wErrorRet, 4) + TEST_FIELD_ALIGN (MMIOINFO, wErrorRet, 1) + TEST_FIELD_OFFSET(MMIOINFO, wErrorRet, 16) +} + +static void test_pack_MMCKINFO(void) +{ + /* MMCKINFO (pack 1) */ + TEST_TYPE_SIZE (MMCKINFO, 20) + TEST_TYPE_ALIGN (MMCKINFO, 1) + TEST_FIELD_SIZE (MMCKINFO, ckid, 4) + TEST_FIELD_ALIGN (MMCKINFO, ckid, 1) + TEST_FIELD_OFFSET(MMCKINFO, ckid, 0) + TEST_FIELD_SIZE (MMCKINFO, cksize, 4) + TEST_FIELD_ALIGN (MMCKINFO, cksize, 1) + TEST_FIELD_OFFSET(MMCKINFO, cksize, 4) + TEST_FIELD_SIZE (MMCKINFO, fccType, 4) + TEST_FIELD_ALIGN (MMCKINFO, fccType, 1) + TEST_FIELD_OFFSET(MMCKINFO, fccType, 8) + TEST_FIELD_SIZE (MMCKINFO, dwDataOffset, 4) + TEST_FIELD_ALIGN (MMCKINFO, dwDataOffset, 1) + TEST_FIELD_OFFSET(MMCKINFO, dwDataOffset, 12) + TEST_FIELD_SIZE (MMCKINFO, dwFlags, 4) + TEST_FIELD_ALIGN (MMCKINFO, dwFlags, 1) + TEST_FIELD_OFFSET(MMCKINFO, dwFlags, 16) +} + +static void test_pack_MCI_GENERIC_PARMS(void) +{ + /* MCI_GENERIC_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_GENERIC_PARMS, 8) + TEST_TYPE_ALIGN (MCI_GENERIC_PARMS, 1) + TEST_FIELD_SIZE (MCI_GENERIC_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_GENERIC_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_GENERIC_PARMS, dwCallback, 0) +} + +static void test_pack_MCI_OPEN_PARMSA(void) +{ + /* MCI_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OPEN_PARMSA, 36) + TEST_TYPE_ALIGN (MCI_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, lpstrAlias, 28) +} + +static void test_pack_MCI_OPEN_PARMSW(void) +{ + /* MCI_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OPEN_PARMSW, 36) + TEST_TYPE_ALIGN (MCI_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, lpstrAlias, 28) +} + +static void test_pack_MCI_PLAY_PARMS(void) +{ + /* MCI_PLAY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_PLAY_PARMS, 16) + TEST_TYPE_ALIGN (MCI_PLAY_PARMS, 1) + TEST_FIELD_SIZE (MCI_PLAY_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_PLAY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_PLAY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_PLAY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_PLAY_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_PLAY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_PLAY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_PLAY_PARMS, dwTo, 12) +} + +static void test_pack_MCI_SEEK_PARMS(void) +{ + /* MCI_SEEK_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_SEEK_PARMS, 12) + TEST_TYPE_ALIGN (MCI_SEEK_PARMS, 1) + TEST_FIELD_SIZE (MCI_SEEK_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SEEK_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SEEK_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SEEK_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_SEEK_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_SEEK_PARMS, dwTo, 8) +} + +static void test_pack_MCI_STATUS_PARMS(void) +{ + /* MCI_STATUS_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_STATUS_PARMS, 24) + TEST_TYPE_ALIGN (MCI_STATUS_PARMS, 1) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwReturn, 8) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwReturn, 8) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwItem, 4) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwItem, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwItem, 16) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwTrack, 4) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwTrack, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwTrack, 20) +} + +static void test_pack_MCI_INFO_PARMSA(void) +{ + /* MCI_INFO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_INFO_PARMSA, 20) + TEST_TYPE_ALIGN (MCI_INFO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_INFO_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_INFO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_INFO_PARMSA, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_INFO_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSA, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_INFO_PARMSA, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSA, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSA, dwRetSize, 16) +} + +static void test_pack_MCI_INFO_PARMSW(void) +{ + /* MCI_INFO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_INFO_PARMSW, 20) + TEST_TYPE_ALIGN (MCI_INFO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_INFO_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_INFO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_INFO_PARMSW, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_INFO_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSW, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_INFO_PARMSW, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSW, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSW, dwRetSize, 16) +} + +static void test_pack_MCI_GETDEVCAPS_PARMS(void) +{ + /* MCI_GETDEVCAPS_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_GETDEVCAPS_PARMS, 16) + TEST_TYPE_ALIGN (MCI_GETDEVCAPS_PARMS, 1) + TEST_FIELD_SIZE (MCI_GETDEVCAPS_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_GETDEVCAPS_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_GETDEVCAPS_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_GETDEVCAPS_PARMS, dwReturn, 4) + TEST_FIELD_ALIGN (MCI_GETDEVCAPS_PARMS, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_GETDEVCAPS_PARMS, dwReturn, 8) + TEST_FIELD_SIZE (MCI_GETDEVCAPS_PARMS, dwItem, 4) + TEST_FIELD_ALIGN (MCI_GETDEVCAPS_PARMS, dwItem, 1) + TEST_FIELD_OFFSET(MCI_GETDEVCAPS_PARMS, dwItem, 12) +} + +static void test_pack_MCI_SYSINFO_PARMSA(void) +{ + /* MCI_SYSINFO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_SYSINFO_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_SYSINFO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, dwRetSize, 16) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, dwNumber, 20) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, wDeviceType, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, wDeviceType, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, wDeviceType, 24) +} + +static void test_pack_MCI_SYSINFO_PARMSW(void) +{ + /* MCI_SYSINFO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_SYSINFO_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_SYSINFO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, dwRetSize, 16) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, dwNumber, 20) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, wDeviceType, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, wDeviceType, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, wDeviceType, 24) +} + +static void test_pack_MCI_SET_PARMS(void) +{ + /* MCI_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_SET_PARMS, 16) + TEST_TYPE_ALIGN (MCI_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_SET_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_SET_PARMS, dwTimeFormat, 8) + TEST_FIELD_SIZE (MCI_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_SET_PARMS, dwAudio, 12) +} + +static void test_pack_MCI_BREAK_PARMS(void) +{ + /* MCI_BREAK_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_BREAK_PARMS, 20) + TEST_TYPE_ALIGN (MCI_BREAK_PARMS, 1) + TEST_FIELD_SIZE (MCI_BREAK_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_BREAK_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_BREAK_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_BREAK_PARMS, nVirtKey, 4) + TEST_FIELD_ALIGN (MCI_BREAK_PARMS, nVirtKey, 1) + TEST_FIELD_OFFSET(MCI_BREAK_PARMS, nVirtKey, 8) + TEST_FIELD_SIZE (MCI_BREAK_PARMS, hwndBreak, 8) + TEST_FIELD_ALIGN (MCI_BREAK_PARMS, hwndBreak, 1) + TEST_FIELD_OFFSET(MCI_BREAK_PARMS, hwndBreak, 12) +} + +static void test_pack_MCI_SOUND_PARMSA(void) +{ + /* MCI_SOUND_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_SOUND_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_SOUND_PARMSA, 1) + TEST_FIELD_SIZE (MCI_SOUND_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SOUND_PARMSA, lpstrSoundName, 8) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSA, lpstrSoundName, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSA, lpstrSoundName, 8) +} + +static void test_pack_MCI_SOUND_PARMSW(void) +{ + /* MCI_SOUND_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_SOUND_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_SOUND_PARMSW, 1) + TEST_FIELD_SIZE (MCI_SOUND_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SOUND_PARMSW, lpstrSoundName, 8) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSW, lpstrSoundName, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSW, lpstrSoundName, 8) +} + +static void test_pack_MCI_SAVE_PARMSA(void) +{ + /* MCI_SAVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_SAVE_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_SAVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_SAVE_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SAVE_PARMSA, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSA, lpfilename, 8) +} + +static void test_pack_MCI_SAVE_PARMSW(void) +{ + /* MCI_SAVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_SAVE_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_SAVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_SAVE_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SAVE_PARMSW, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSW, lpfilename, 8) +} + +static void test_pack_MCI_LOAD_PARMSA(void) +{ + /* MCI_LOAD_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_LOAD_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_LOAD_PARMSA, 1) + TEST_FIELD_SIZE (MCI_LOAD_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_LOAD_PARMSA, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSA, lpfilename, 8) +} + +static void test_pack_MCI_LOAD_PARMSW(void) +{ + /* MCI_LOAD_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_LOAD_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_LOAD_PARMSW, 1) + TEST_FIELD_SIZE (MCI_LOAD_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_LOAD_PARMSW, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSW, lpfilename, 8) +} + +static void test_pack_MCI_RECORD_PARMS(void) +{ + /* MCI_RECORD_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_RECORD_PARMS, 16) + TEST_TYPE_ALIGN (MCI_RECORD_PARMS, 1) + TEST_FIELD_SIZE (MCI_RECORD_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_RECORD_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_RECORD_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_RECORD_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_RECORD_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_RECORD_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_RECORD_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_RECORD_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_RECORD_PARMS, dwTo, 12) +} + +static void test_pack_MCI_VD_PLAY_PARMS(void) +{ + /* MCI_VD_PLAY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_PLAY_PARMS, 20) + TEST_TYPE_ALIGN (MCI_VD_PLAY_PARMS, 1) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwTo, 12) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwSpeed, 4) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwSpeed, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwSpeed, 16) +} + +static void test_pack_MCI_VD_STEP_PARMS(void) +{ + /* MCI_VD_STEP_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_STEP_PARMS, 12) + TEST_TYPE_ALIGN (MCI_VD_STEP_PARMS, 1) + TEST_FIELD_SIZE (MCI_VD_STEP_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_VD_STEP_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_STEP_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_STEP_PARMS, dwFrames, 4) + TEST_FIELD_ALIGN (MCI_VD_STEP_PARMS, dwFrames, 1) + TEST_FIELD_OFFSET(MCI_VD_STEP_PARMS, dwFrames, 8) +} + +static void test_pack_MCI_VD_ESCAPE_PARMSA(void) +{ + /* MCI_VD_ESCAPE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_ESCAPE_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_VD_ESCAPE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSA, lpstrCommand, 8) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSA, lpstrCommand, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSA, lpstrCommand, 8) +} + +static void test_pack_MCI_VD_ESCAPE_PARMSW(void) +{ + /* MCI_VD_ESCAPE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_ESCAPE_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_VD_ESCAPE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSW, lpstrCommand, 8) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSW, lpstrCommand, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSW, lpstrCommand, 8) +} + +static void test_pack_MCI_WAVE_OPEN_PARMSA(void) +{ + /* MCI_WAVE_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_OPEN_PARMSA, 40) + TEST_TYPE_ALIGN (MCI_WAVE_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, dwBufferSeconds, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, dwBufferSeconds, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, dwBufferSeconds, 36) +} + +static void test_pack_MCI_WAVE_OPEN_PARMSW(void) +{ + /* MCI_WAVE_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_OPEN_PARMSW, 40) + TEST_TYPE_ALIGN (MCI_WAVE_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, dwBufferSeconds, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, dwBufferSeconds, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, dwBufferSeconds, 36) +} + +static void test_pack_MCI_WAVE_DELETE_PARMS(void) +{ + /* MCI_WAVE_DELETE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_DELETE_PARMS, 16) + TEST_TYPE_ALIGN (MCI_WAVE_DELETE_PARMS, 1) + TEST_FIELD_SIZE (MCI_WAVE_DELETE_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_WAVE_DELETE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_DELETE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_DELETE_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_WAVE_DELETE_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_WAVE_DELETE_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_WAVE_DELETE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_WAVE_DELETE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_WAVE_DELETE_PARMS, dwTo, 12) +} + +static void test_pack_MCI_WAVE_SET_PARMS(void) +{ + /* MCI_WAVE_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_SET_PARMS, 48) + TEST_TYPE_ALIGN (MCI_WAVE_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, dwTimeFormat, 8) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, dwAudio, 12) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wInput, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wInput, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wInput, 16) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wOutput, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wOutput, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wOutput, 20) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wFormatTag, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wFormatTag, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wFormatTag, 24) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nChannels, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nChannels, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nChannels, 28) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nSamplesPerSec, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nSamplesPerSec, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nSamplesPerSec, 32) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nAvgBytesPerSec, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nAvgBytesPerSec, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nAvgBytesPerSec, 36) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nBlockAlign, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nBlockAlign, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nBlockAlign, 40) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wBitsPerSample, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wBitsPerSample, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wBitsPerSample, 44) +} + +static void test_pack_MCI_SEQ_SET_PARMS(void) +{ + /* MCI_SEQ_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_SEQ_SET_PARMS, 36) + TEST_TYPE_ALIGN (MCI_SEQ_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwTimeFormat, 8) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwAudio, 12) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwTempo, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwTempo, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwTempo, 16) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwPort, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwPort, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwPort, 20) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwSlave, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwSlave, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwSlave, 24) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwMaster, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwMaster, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwMaster, 28) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwOffset, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwOffset, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwOffset, 32) +} + +static void test_pack_MCI_ANIM_OPEN_PARMSA(void) +{ + /* MCI_ANIM_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_OPEN_PARMSA, 48) + TEST_TYPE_ALIGN (MCI_ANIM_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, dwStyle, 36) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, hWndParent, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, hWndParent, 40) +} + +static void test_pack_MCI_ANIM_OPEN_PARMSW(void) +{ + /* MCI_ANIM_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_OPEN_PARMSW, 48) + TEST_TYPE_ALIGN (MCI_ANIM_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, dwStyle, 36) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, hWndParent, 8) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, hWndParent, 40) +} + +static void test_pack_MCI_ANIM_PLAY_PARMS(void) +{ + /* MCI_ANIM_PLAY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_PLAY_PARMS, 20) + TEST_TYPE_ALIGN (MCI_ANIM_PLAY_PARMS, 1) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwTo, 12) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwSpeed, 4) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwSpeed, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwSpeed, 16) +} + +static void test_pack_MCI_ANIM_STEP_PARMS(void) +{ + /* MCI_ANIM_STEP_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_STEP_PARMS, 12) + TEST_TYPE_ALIGN (MCI_ANIM_STEP_PARMS, 1) + TEST_FIELD_SIZE (MCI_ANIM_STEP_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_ANIM_STEP_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_STEP_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_STEP_PARMS, dwFrames, 4) + TEST_FIELD_ALIGN (MCI_ANIM_STEP_PARMS, dwFrames, 1) + TEST_FIELD_OFFSET(MCI_ANIM_STEP_PARMS, dwFrames, 8) +} + +static void test_pack_MCI_ANIM_WINDOW_PARMSA(void) +{ + /* MCI_ANIM_WINDOW_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_WINDOW_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_ANIM_WINDOW_PARMSA, 1) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, hWnd, 8) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, hWnd, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, hWnd, 8) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, nCmdShow, 16) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, lpstrText, 8) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, lpstrText, 20) +} + +static void test_pack_MCI_ANIM_WINDOW_PARMSW(void) +{ + /* MCI_ANIM_WINDOW_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_WINDOW_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_ANIM_WINDOW_PARMSW, 1) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, hWnd, 8) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, hWnd, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, hWnd, 8) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, nCmdShow, 16) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, lpstrText, 8) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, lpstrText, 20) +} + +static void test_pack_MCI_ANIM_UPDATE_PARMS(void) +{ + /* MCI_ANIM_UPDATE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_UPDATE_PARMS, 32) + TEST_TYPE_ALIGN (MCI_ANIM_UPDATE_PARMS, 1) + TEST_FIELD_SIZE (MCI_ANIM_UPDATE_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_ANIM_UPDATE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_UPDATE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_UPDATE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_ANIM_UPDATE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_ANIM_UPDATE_PARMS, rc, 8) + TEST_FIELD_SIZE (MCI_ANIM_UPDATE_PARMS, hDC, 8) + TEST_FIELD_ALIGN (MCI_ANIM_UPDATE_PARMS, hDC, 1) + TEST_FIELD_OFFSET(MCI_ANIM_UPDATE_PARMS, hDC, 24) +} + +static void test_pack_MCI_OVLY_OPEN_PARMSA(void) +{ + /* MCI_OVLY_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_OPEN_PARMSA, 48) + TEST_TYPE_ALIGN (MCI_OVLY_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, dwStyle, 36) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, hWndParent, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, hWndParent, 40) +} + +static void test_pack_MCI_OVLY_OPEN_PARMSW(void) +{ + /* MCI_OVLY_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_OPEN_PARMSW, 48) + TEST_TYPE_ALIGN (MCI_OVLY_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, dwStyle, 36) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, hWndParent, 8) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, hWndParent, 40) +} + +static void test_pack_MCI_OVLY_WINDOW_PARMSA(void) +{ + /* MCI_OVLY_WINDOW_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_WINDOW_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_OVLY_WINDOW_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, hWnd, 8) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, hWnd, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, hWnd, 8) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, nCmdShow, 16) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, lpstrText, 8) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, lpstrText, 20) +} + +static void test_pack_MCI_OVLY_WINDOW_PARMSW(void) +{ + /* MCI_OVLY_WINDOW_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_WINDOW_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_OVLY_WINDOW_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, hWnd, 8) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, hWnd, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, hWnd, 8) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, nCmdShow, 16) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, lpstrText, 8) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, lpstrText, 20) +} + +static void test_pack_MCI_OVLY_SAVE_PARMSA(void) +{ + /* MCI_OVLY_SAVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_SAVE_PARMSA, 32) + TEST_TYPE_ALIGN (MCI_OVLY_SAVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSA, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSA, lpfilename, 8) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSA, rc, 16) +} + +static void test_pack_MCI_OVLY_SAVE_PARMSW(void) +{ + /* MCI_OVLY_SAVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_SAVE_PARMSW, 32) + TEST_TYPE_ALIGN (MCI_OVLY_SAVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSW, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSW, lpfilename, 8) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSW, rc, 16) +} + +static void test_pack_MCI_OVLY_LOAD_PARMSA(void) +{ + /* MCI_OVLY_LOAD_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_LOAD_PARMSA, 32) + TEST_TYPE_ALIGN (MCI_OVLY_LOAD_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSA, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSA, lpfilename, 8) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSA, rc, 16) +} + +static void test_pack_MCI_OVLY_LOAD_PARMSW(void) +{ + /* MCI_OVLY_LOAD_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_LOAD_PARMSW, 32) + TEST_TYPE_ALIGN (MCI_OVLY_LOAD_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSW, lpfilename, 8) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSW, lpfilename, 8) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSW, rc, 16) +} + +static void test_pack_MCI_DGV_RECT_PARMS(void) +{ + /* MCI_DGV_RECT_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RECT_PARMS, 24) + TEST_TYPE_ALIGN (MCI_DGV_RECT_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_RECT_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_RECT_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECT_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RECT_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RECT_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECT_PARMS, rc, 8) +} + +static void test_pack_MCI_DGV_CAPTURE_PARMSA(void) +{ + /* MCI_DGV_CAPTURE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CAPTURE_PARMSA, 32) + TEST_TYPE_ALIGN (MCI_DGV_CAPTURE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSA, lpstrFileName, 8) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSA, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSA, lpstrFileName, 8) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSA, rc, 16) +} + +static void test_pack_MCI_DGV_CAPTURE_PARMSW(void) +{ + /* MCI_DGV_CAPTURE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CAPTURE_PARMSW, 32) + TEST_TYPE_ALIGN (MCI_DGV_CAPTURE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSW, lpstrFileName, 8) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSW, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSW, lpstrFileName, 8) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSW, rc, 16) +} + +static void test_pack_MCI_DGV_COPY_PARMS(void) +{ + /* MCI_DGV_COPY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_COPY_PARMS, 40) + TEST_TYPE_ALIGN (MCI_DGV_COPY_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwTo, 12) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, rc, 16) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwAudioStream, 32) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwVideoStream, 36) +} + +static void test_pack_MCI_DGV_CUE_PARMS(void) +{ + /* MCI_DGV_CUE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CUE_PARMS, 12) + TEST_TYPE_ALIGN (MCI_DGV_CUE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_CUE_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_CUE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CUE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUE_PARMS, dwTo, 8) +} + +static void test_pack_MCI_DGV_CUT_PARMS(void) +{ + /* MCI_DGV_CUT_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CUT_PARMS, 40) + TEST_TYPE_ALIGN (MCI_DGV_CUT_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwTo, 12) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, rc, 16) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwAudioStream, 32) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwVideoStream, 36) +} + +static void test_pack_MCI_DGV_DELETE_PARMS(void) +{ + /* MCI_DGV_DELETE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_DELETE_PARMS, 40) + TEST_TYPE_ALIGN (MCI_DGV_DELETE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwTo, 12) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, rc, 16) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwAudioStream, 32) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwVideoStream, 36) +} + +static void test_pack_MCI_DGV_INFO_PARMSA(void) +{ + /* MCI_DGV_INFO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_INFO_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_DGV_INFO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, dwRetSize, 16) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, dwItem, 20) +} + +static void test_pack_MCI_DGV_INFO_PARMSW(void) +{ + /* MCI_DGV_INFO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_INFO_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_DGV_INFO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, dwRetSize, 16) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, dwItem, 20) +} + +static void test_pack_MCI_DGV_LIST_PARMSA(void) +{ + /* MCI_DGV_LIST_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_LIST_PARMSA, 36) + TEST_TYPE_ALIGN (MCI_DGV_LIST_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwLength, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwLength, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwLength, 16) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwNumber, 20) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwItem, 24) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, lpstrAlgorithm, 8) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, lpstrAlgorithm, 28) +} + +static void test_pack_MCI_DGV_LIST_PARMSW(void) +{ + /* MCI_DGV_LIST_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_LIST_PARMSW, 36) + TEST_TYPE_ALIGN (MCI_DGV_LIST_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, lpstrReturn, 8) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, lpstrReturn, 8) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwLength, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwLength, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwLength, 16) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwNumber, 20) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwItem, 24) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, lpstrAlgorithm, 8) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, lpstrAlgorithm, 28) +} + +static void test_pack_MCI_DGV_MONITOR_PARMS(void) +{ + /* MCI_DGV_MONITOR_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_MONITOR_PARMS, 16) + TEST_TYPE_ALIGN (MCI_DGV_MONITOR_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_MONITOR_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_MONITOR_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_MONITOR_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_MONITOR_PARMS, dwSource, 4) + TEST_FIELD_ALIGN (MCI_DGV_MONITOR_PARMS, dwSource, 1) + TEST_FIELD_OFFSET(MCI_DGV_MONITOR_PARMS, dwSource, 8) + TEST_FIELD_SIZE (MCI_DGV_MONITOR_PARMS, dwMethod, 4) + TEST_FIELD_ALIGN (MCI_DGV_MONITOR_PARMS, dwMethod, 1) + TEST_FIELD_OFFSET(MCI_DGV_MONITOR_PARMS, dwMethod, 12) +} + +static void test_pack_MCI_DGV_OPEN_PARMSA(void) +{ + /* MCI_DGV_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_OPEN_PARMSA, 48) + TEST_TYPE_ALIGN (MCI_DGV_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, dwStyle, 36) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, hWndParent, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, hWndParent, 40) +} + +static void test_pack_MCI_DGV_OPEN_PARMSW(void) +{ + /* MCI_DGV_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_OPEN_PARMSW, 48) + TEST_TYPE_ALIGN (MCI_DGV_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, wDeviceID, 8) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, lpstrDeviceType, 12) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, lpstrElementName, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, lpstrElementName, 20) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, lpstrAlias, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, lpstrAlias, 28) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, dwStyle, 36) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, hWndParent, 8) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, hWndParent, 40) +} + +static void test_pack_MCI_DGV_PASTE_PARMS(void) +{ + /* MCI_DGV_PASTE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_PASTE_PARMS, 36) + TEST_TYPE_ALIGN (MCI_DGV_PASTE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwTo, 8) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, rc, 12) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwAudioStream, 28) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwVideoStream, 32) +} + +static void test_pack_MCI_DGV_QUALITY_PARMSA(void) +{ + /* MCI_DGV_QUALITY_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_QUALITY_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_DGV_QUALITY_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, lpstrName, 8) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, lpstrName, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, lpstrName, 12) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, lpstrAlgorithm, 20) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, dwHandle, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, dwHandle, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, dwHandle, 24) +} + +static void test_pack_MCI_DGV_QUALITY_PARMSW(void) +{ + /* MCI_DGV_QUALITY_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_QUALITY_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_DGV_QUALITY_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, lpstrName, 8) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, lpstrName, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, lpstrName, 12) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, lpstrAlgorithm, 20) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, dwHandle, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, dwHandle, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, dwHandle, 24) +} + +static void test_pack_MCI_DGV_RECORD_PARMS(void) +{ + /* MCI_DGV_RECORD_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RECORD_PARMS, 40) + TEST_TYPE_ALIGN (MCI_DGV_RECORD_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwFrom, 8) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwTo, 12) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, rc, 16) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwAudioStream, 32) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwVideoStream, 36) +} + +static void test_pack_MCI_DGV_RESERVE_PARMSA(void) +{ + /* MCI_DGV_RESERVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESERVE_PARMSA, 20) + TEST_TYPE_ALIGN (MCI_DGV_RESERVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSA, lpstrPath, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSA, lpstrPath, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSA, lpstrPath, 8) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSA, dwSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSA, dwSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSA, dwSize, 16) +} + +static void test_pack_MCI_DGV_RESERVE_PARMSW(void) +{ + /* MCI_DGV_RESERVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESERVE_PARMSW, 20) + TEST_TYPE_ALIGN (MCI_DGV_RESERVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSW, lpstrPath, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSW, lpstrPath, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSW, lpstrPath, 8) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSW, dwSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSW, dwSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSW, dwSize, 16) +} + +static void test_pack_MCI_DGV_RESTORE_PARMSA(void) +{ + /* MCI_DGV_RESTORE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESTORE_PARMSA, 32) + TEST_TYPE_ALIGN (MCI_DGV_RESTORE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSA, lpstrFileName, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSA, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSA, lpstrFileName, 8) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSA, rc, 16) +} + +static void test_pack_MCI_DGV_RESTORE_PARMSW(void) +{ + /* MCI_DGV_RESTORE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESTORE_PARMSW, 32) + TEST_TYPE_ALIGN (MCI_DGV_RESTORE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSW, lpstrFileName, 8) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSW, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSW, lpstrFileName, 8) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSW, rc, 16) +} + +static void test_pack_MCI_DGV_SAVE_PARMSA(void) +{ + /* MCI_DGV_SAVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SAVE_PARMSA, 32) + TEST_TYPE_ALIGN (MCI_DGV_SAVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSA, lpstrFileName, 8) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSA, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSA, lpstrFileName, 8) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSA, rc, 16) +} + +static void test_pack_MCI_DGV_SAVE_PARMSW(void) +{ + /* MCI_DGV_SAVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SAVE_PARMSW, 32) + TEST_TYPE_ALIGN (MCI_DGV_SAVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSW, lpstrFileName, 8) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSW, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSW, lpstrFileName, 8) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSW, rc, 16) +} + +static void test_pack_MCI_DGV_SET_PARMS(void) +{ + /* MCI_DGV_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SET_PARMS, 24) + TEST_TYPE_ALIGN (MCI_DGV_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwTimeFormat, 8) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwAudio, 12) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwFileFormat, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwFileFormat, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwFileFormat, 16) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwSpeed, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwSpeed, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwSpeed, 20) +} + +static void test_pack_MCI_DGV_SETAUDIO_PARMSA(void) +{ + /* MCI_DGV_SETAUDIO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETAUDIO_PARMSA, 36) + TEST_TYPE_ALIGN (MCI_DGV_SETAUDIO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwValue, 12) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwOver, 16) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, lpstrAlgorithm, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, lpstrAlgorithm, 20) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, lpstrQuality, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, lpstrQuality, 28) +} + +static void test_pack_MCI_DGV_SETAUDIO_PARMSW(void) +{ + /* MCI_DGV_SETAUDIO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETAUDIO_PARMSW, 36) + TEST_TYPE_ALIGN (MCI_DGV_SETAUDIO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwValue, 12) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwOver, 16) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, lpstrAlgorithm, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, lpstrAlgorithm, 20) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, lpstrQuality, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, lpstrQuality, 28) +} + +static void test_pack_MCI_DGV_SIGNAL_PARMS(void) +{ + /* MCI_DGV_SIGNAL_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SIGNAL_PARMS, 20) + TEST_TYPE_ALIGN (MCI_DGV_SIGNAL_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwPosition, 4) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwPosition, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwPosition, 8) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwPeriod, 4) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwPeriod, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwPeriod, 12) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwUserParm, 4) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwUserParm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwUserParm, 16) +} + +static void test_pack_MCI_DGV_SETVIDEO_PARMSA(void) +{ + /* MCI_DGV_SETVIDEO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETVIDEO_PARMSA, 40) + TEST_TYPE_ALIGN (MCI_DGV_SETVIDEO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwValue, 12) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwOver, 16) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, lpstrAlgorithm, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, lpstrAlgorithm, 20) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, lpstrQuality, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, lpstrQuality, 28) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwSourceNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwSourceNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwSourceNumber, 36) +} + +static void test_pack_MCI_DGV_SETVIDEO_PARMSW(void) +{ + /* MCI_DGV_SETVIDEO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETVIDEO_PARMSW, 40) + TEST_TYPE_ALIGN (MCI_DGV_SETVIDEO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwValue, 12) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwOver, 16) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, lpstrAlgorithm, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, lpstrAlgorithm, 20) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, lpstrQuality, 8) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, lpstrQuality, 28) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwSourceNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwSourceNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwSourceNumber, 36) +} + +static void test_pack_MCI_DGV_STATUS_PARMSA(void) +{ + /* MCI_DGV_STATUS_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_STATUS_PARMSA, 36) + TEST_TYPE_ALIGN (MCI_DGV_STATUS_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwReturn, 8) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwReturn, 8) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwItem, 16) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwTrack, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwTrack, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwTrack, 20) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, lpstrDrive, 8) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, lpstrDrive, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, lpstrDrive, 24) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwReference, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwReference, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwReference, 32) +} + +static void test_pack_MCI_DGV_STATUS_PARMSW(void) +{ + /* MCI_DGV_STATUS_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_STATUS_PARMSW, 36) + TEST_TYPE_ALIGN (MCI_DGV_STATUS_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwReturn, 8) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwReturn, 8) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwItem, 16) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwTrack, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwTrack, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwTrack, 20) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, lpstrDrive, 8) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, lpstrDrive, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, lpstrDrive, 24) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwReference, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwReference, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwReference, 32) +} + +static void test_pack_MCI_DGV_STEP_PARMS(void) +{ + /* MCI_DGV_STEP_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_STEP_PARMS, 12) + TEST_TYPE_ALIGN (MCI_DGV_STEP_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_STEP_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_STEP_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_STEP_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_STEP_PARMS, dwFrames, 4) + TEST_FIELD_ALIGN (MCI_DGV_STEP_PARMS, dwFrames, 1) + TEST_FIELD_OFFSET(MCI_DGV_STEP_PARMS, dwFrames, 8) +} + +static void test_pack_MCI_DGV_UPDATE_PARMS(void) +{ + /* MCI_DGV_UPDATE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_UPDATE_PARMS, 32) + TEST_TYPE_ALIGN (MCI_DGV_UPDATE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_UPDATE_PARMS, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_UPDATE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_UPDATE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_UPDATE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_UPDATE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_UPDATE_PARMS, rc, 8) + TEST_FIELD_SIZE (MCI_DGV_UPDATE_PARMS, hDC, 8) + TEST_FIELD_ALIGN (MCI_DGV_UPDATE_PARMS, hDC, 1) + TEST_FIELD_OFFSET(MCI_DGV_UPDATE_PARMS, hDC, 24) +} + +static void test_pack_MCI_DGV_WINDOW_PARMSA(void) +{ + /* MCI_DGV_WINDOW_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_WINDOW_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_DGV_WINDOW_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, hWnd, 8) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, hWnd, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, hWnd, 8) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, nCmdShow, 16) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, lpstrText, 8) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, lpstrText, 20) +} + +static void test_pack_MCI_DGV_WINDOW_PARMSW(void) +{ + /* MCI_DGV_WINDOW_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_WINDOW_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_DGV_WINDOW_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, dwCallback, 8) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, hWnd, 8) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, hWnd, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, hWnd, 8) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, nCmdShow, 16) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, lpstrText, 8) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, lpstrText, 20) +} + +#else /* _WIN64 */ + +static void test_pack_MMTIME(void) +{ + /* MMTIME (pack 1) */ + TEST_FIELD_SIZE (MMTIME, wType, 4) + TEST_FIELD_ALIGN (MMTIME, wType, 1) + TEST_FIELD_OFFSET(MMTIME, wType, 0) +} + +static void test_pack_DRVCONFIGINFO(void) +{ + /* DRVCONFIGINFO (pack 1) */ + TEST_TYPE_SIZE (DRVCONFIGINFO, 12) + TEST_TYPE_ALIGN (DRVCONFIGINFO, 1) + TEST_FIELD_SIZE (DRVCONFIGINFO, dwDCISize, 4) + TEST_FIELD_ALIGN (DRVCONFIGINFO, dwDCISize, 1) + TEST_FIELD_OFFSET(DRVCONFIGINFO, dwDCISize, 0) + TEST_FIELD_SIZE (DRVCONFIGINFO, lpszDCISectionName, 4) + TEST_FIELD_ALIGN (DRVCONFIGINFO, lpszDCISectionName, 1) + TEST_FIELD_OFFSET(DRVCONFIGINFO, lpszDCISectionName, 4) + TEST_FIELD_SIZE (DRVCONFIGINFO, lpszDCIAliasName, 4) + TEST_FIELD_ALIGN (DRVCONFIGINFO, lpszDCIAliasName, 1) + TEST_FIELD_OFFSET(DRVCONFIGINFO, lpszDCIAliasName, 8) +} + +static void test_pack_WAVEHDR(void) +{ + /* WAVEHDR (pack 1) */ + TEST_TYPE_SIZE (WAVEHDR, 32) + TEST_TYPE_ALIGN (WAVEHDR, 1) + TEST_FIELD_SIZE (WAVEHDR, lpData, 4) + TEST_FIELD_ALIGN (WAVEHDR, lpData, 1) + TEST_FIELD_OFFSET(WAVEHDR, lpData, 0) + TEST_FIELD_SIZE (WAVEHDR, dwBufferLength, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwBufferLength, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwBufferLength, 4) + TEST_FIELD_SIZE (WAVEHDR, dwBytesRecorded, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwBytesRecorded, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwBytesRecorded, 8) + TEST_FIELD_SIZE (WAVEHDR, dwUser, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwUser, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwUser, 12) + TEST_FIELD_SIZE (WAVEHDR, dwFlags, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwFlags, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwFlags, 16) + TEST_FIELD_SIZE (WAVEHDR, dwLoops, 4) + TEST_FIELD_ALIGN (WAVEHDR, dwLoops, 1) + TEST_FIELD_OFFSET(WAVEHDR, dwLoops, 20) + TEST_FIELD_SIZE (WAVEHDR, lpNext, 4) + TEST_FIELD_ALIGN (WAVEHDR, lpNext, 1) + TEST_FIELD_OFFSET(WAVEHDR, lpNext, 24) + TEST_FIELD_SIZE (WAVEHDR, reserved, 4) + TEST_FIELD_ALIGN (WAVEHDR, reserved, 1) + TEST_FIELD_OFFSET(WAVEHDR, reserved, 28) +} + +static void test_pack_WAVEOUTCAPSA(void) +{ + /* WAVEOUTCAPSA (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPSA, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSA, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSA, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPSA, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSA, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSA, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSA, vDriverVersion, 4) +} + +static void test_pack_WAVEOUTCAPSW(void) +{ + /* WAVEOUTCAPSW (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPSW, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSW, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSW, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPSW, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPSW, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSW, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPSW, vDriverVersion, 4) +} + +static void test_pack_WAVEOUTCAPS2A(void) +{ + /* WAVEOUTCAPS2A (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2A, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2A, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2A, vDriverVersion, 4) +} + +static void test_pack_WAVEOUTCAPS2W(void) +{ + /* WAVEOUTCAPS2W (pack 1) */ + TEST_FIELD_SIZE (WAVEOUTCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2W, wMid, 0) + TEST_FIELD_SIZE (WAVEOUTCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (WAVEOUTCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2W, wPid, 2) + TEST_FIELD_SIZE (WAVEOUTCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEOUTCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEOUTCAPS2W, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPSA(void) +{ + /* WAVEINCAPSA (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPSA, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSA, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSA, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPSA, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSA, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSA, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPSA, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPSW(void) +{ + /* WAVEINCAPSW (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPSW, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSW, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSW, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPSW, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPSW, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPSW, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPSW, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPS2A(void) +{ + /* WAVEINCAPS2A (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2A, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2A, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2A, vDriverVersion, 4) +} + +static void test_pack_WAVEINCAPS2W(void) +{ + /* WAVEINCAPS2W (pack 1) */ + TEST_FIELD_SIZE (WAVEINCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2W, wMid, 0) + TEST_FIELD_SIZE (WAVEINCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (WAVEINCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2W, wPid, 2) + TEST_FIELD_SIZE (WAVEINCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (WAVEINCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(WAVEINCAPS2W, vDriverVersion, 4) +} + +static void test_pack_WAVEFORMAT(void) +{ + /* WAVEFORMAT (pack 1) */ + TEST_TYPE_SIZE (WAVEFORMAT, 14) + TEST_TYPE_ALIGN (WAVEFORMAT, 1) + TEST_FIELD_SIZE (WAVEFORMAT, wFormatTag, 2) + TEST_FIELD_ALIGN (WAVEFORMAT, wFormatTag, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, wFormatTag, 0) + TEST_FIELD_SIZE (WAVEFORMAT, nChannels, 2) + TEST_FIELD_ALIGN (WAVEFORMAT, nChannels, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nChannels, 2) + TEST_FIELD_SIZE (WAVEFORMAT, nSamplesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMAT, nSamplesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nSamplesPerSec, 4) + TEST_FIELD_SIZE (WAVEFORMAT, nAvgBytesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMAT, nAvgBytesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nAvgBytesPerSec, 8) + TEST_FIELD_SIZE (WAVEFORMAT, nBlockAlign, 2) + TEST_FIELD_ALIGN (WAVEFORMAT, nBlockAlign, 1) + TEST_FIELD_OFFSET(WAVEFORMAT, nBlockAlign, 12) +} + +static void test_pack_PCMWAVEFORMAT(void) +{ + /* PCMWAVEFORMAT (pack 1) */ + TEST_TYPE_SIZE (PCMWAVEFORMAT, 16) + TEST_TYPE_ALIGN (PCMWAVEFORMAT, 1) + TEST_FIELD_SIZE (PCMWAVEFORMAT, wf, 14) + TEST_FIELD_ALIGN (PCMWAVEFORMAT, wf, 1) + TEST_FIELD_OFFSET(PCMWAVEFORMAT, wf, 0) + TEST_FIELD_SIZE (PCMWAVEFORMAT, wBitsPerSample, 2) + TEST_FIELD_ALIGN (PCMWAVEFORMAT, wBitsPerSample, 1) + TEST_FIELD_OFFSET(PCMWAVEFORMAT, wBitsPerSample, 14) +} + +static void test_pack_WAVEFORMATEX(void) +{ + /* WAVEFORMATEX (pack 1) */ + TEST_TYPE_SIZE (WAVEFORMATEX, 18) + TEST_TYPE_ALIGN (WAVEFORMATEX, 1) + TEST_FIELD_SIZE (WAVEFORMATEX, wFormatTag, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, wFormatTag, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, wFormatTag, 0) + TEST_FIELD_SIZE (WAVEFORMATEX, nChannels, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, nChannels, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nChannels, 2) + TEST_FIELD_SIZE (WAVEFORMATEX, nSamplesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMATEX, nSamplesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nSamplesPerSec, 4) + TEST_FIELD_SIZE (WAVEFORMATEX, nAvgBytesPerSec, 4) + TEST_FIELD_ALIGN (WAVEFORMATEX, nAvgBytesPerSec, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nAvgBytesPerSec, 8) + TEST_FIELD_SIZE (WAVEFORMATEX, nBlockAlign, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, nBlockAlign, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, nBlockAlign, 12) + TEST_FIELD_SIZE (WAVEFORMATEX, wBitsPerSample, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, wBitsPerSample, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, wBitsPerSample, 14) + TEST_FIELD_SIZE (WAVEFORMATEX, cbSize, 2) + TEST_FIELD_ALIGN (WAVEFORMATEX, cbSize, 1) + TEST_FIELD_OFFSET(WAVEFORMATEX, cbSize, 16) +} + +static void test_pack_MIDIOUTCAPSA(void) +{ + /* MIDIOUTCAPSA (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPSA, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSA, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSA, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPSA, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSA, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSA, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSA, vDriverVersion, 4) +} + +static void test_pack_MIDIOUTCAPSW(void) +{ + /* MIDIOUTCAPSW (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPSW, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSW, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSW, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPSW, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPSW, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSW, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPSW, vDriverVersion, 4) +} + +static void test_pack_MIDIOUTCAPS2A(void) +{ + /* MIDIOUTCAPS2A (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2A, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2A, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2A, vDriverVersion, 4) +} + +static void test_pack_MIDIOUTCAPS2W(void) +{ + /* MIDIOUTCAPS2W (pack 1) */ + TEST_FIELD_SIZE (MIDIOUTCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2W, wMid, 0) + TEST_FIELD_SIZE (MIDIOUTCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (MIDIOUTCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2W, wPid, 2) + TEST_FIELD_SIZE (MIDIOUTCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIOUTCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIOUTCAPS2W, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPSA(void) +{ + /* MIDIINCAPSA (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPSA, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSA, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSA, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPSA, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSA, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSA, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPSA, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPSW(void) +{ + /* MIDIINCAPSW (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPSW, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSW, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSW, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPSW, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPSW, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPSW, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPSW, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPS2A(void) +{ + /* MIDIINCAPS2A (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2A, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2A, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2A, vDriverVersion, 4) +} + +static void test_pack_MIDIINCAPS2W(void) +{ + /* MIDIINCAPS2W (pack 1) */ + TEST_FIELD_SIZE (MIDIINCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2W, wMid, 0) + TEST_FIELD_SIZE (MIDIINCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (MIDIINCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2W, wPid, 2) + TEST_FIELD_SIZE (MIDIINCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIDIINCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIDIINCAPS2W, vDriverVersion, 4) +} + +static void test_pack_MIDIHDR(void) +{ + /* MIDIHDR (pack 1) */ + TEST_TYPE_SIZE (MIDIHDR, 64) + TEST_TYPE_ALIGN (MIDIHDR, 1) + TEST_FIELD_SIZE (MIDIHDR, lpData, 4) + TEST_FIELD_ALIGN (MIDIHDR, lpData, 1) + TEST_FIELD_OFFSET(MIDIHDR, lpData, 0) + TEST_FIELD_SIZE (MIDIHDR, dwBufferLength, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwBufferLength, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwBufferLength, 4) + TEST_FIELD_SIZE (MIDIHDR, dwBytesRecorded, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwBytesRecorded, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwBytesRecorded, 8) + TEST_FIELD_SIZE (MIDIHDR, dwUser, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwUser, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwUser, 12) + TEST_FIELD_SIZE (MIDIHDR, dwFlags, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwFlags, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwFlags, 16) + TEST_FIELD_SIZE (MIDIHDR, lpNext, 4) + TEST_FIELD_ALIGN (MIDIHDR, lpNext, 1) + TEST_FIELD_OFFSET(MIDIHDR, lpNext, 20) + TEST_FIELD_SIZE (MIDIHDR, reserved, 4) + TEST_FIELD_ALIGN (MIDIHDR, reserved, 1) + TEST_FIELD_OFFSET(MIDIHDR, reserved, 24) + TEST_FIELD_SIZE (MIDIHDR, dwOffset, 4) + TEST_FIELD_ALIGN (MIDIHDR, dwOffset, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwOffset, 28) + TEST_FIELD_SIZE (MIDIHDR, dwReserved, 32) + TEST_FIELD_ALIGN (MIDIHDR, dwReserved, 1) + TEST_FIELD_OFFSET(MIDIHDR, dwReserved, 32) +} + +static void test_pack_MIDIEVENT(void) +{ + /* MIDIEVENT (pack 1) */ + TEST_TYPE_SIZE (MIDIEVENT, 16) + TEST_TYPE_ALIGN (MIDIEVENT, 1) + TEST_FIELD_SIZE (MIDIEVENT, dwDeltaTime, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwDeltaTime, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwDeltaTime, 0) + TEST_FIELD_SIZE (MIDIEVENT, dwStreamID, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwStreamID, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwStreamID, 4) + TEST_FIELD_SIZE (MIDIEVENT, dwEvent, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwEvent, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwEvent, 8) + TEST_FIELD_SIZE (MIDIEVENT, dwParms, 4) + TEST_FIELD_ALIGN (MIDIEVENT, dwParms, 1) + TEST_FIELD_OFFSET(MIDIEVENT, dwParms, 12) +} + +static void test_pack_AUXCAPSA(void) +{ + /* AUXCAPSA (pack 1) */ + TEST_FIELD_SIZE (AUXCAPSA, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPSA, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPSA, wMid, 0) + TEST_FIELD_SIZE (AUXCAPSA, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPSA, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPSA, wPid, 2) + TEST_FIELD_SIZE (AUXCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPSA, vDriverVersion, 4) +} + +static void test_pack_AUXCAPSW(void) +{ + /* AUXCAPSW (pack 1) */ + TEST_FIELD_SIZE (AUXCAPSW, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPSW, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPSW, wMid, 0) + TEST_FIELD_SIZE (AUXCAPSW, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPSW, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPSW, wPid, 2) + TEST_FIELD_SIZE (AUXCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPSW, vDriverVersion, 4) +} + +static void test_pack_AUXCAPS2A(void) +{ + /* AUXCAPS2A (pack 1) */ + TEST_FIELD_SIZE (AUXCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPS2A, wMid, 0) + TEST_FIELD_SIZE (AUXCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPS2A, wPid, 2) + TEST_FIELD_SIZE (AUXCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPS2A, vDriverVersion, 4) +} + +static void test_pack_AUXCAPS2W(void) +{ + /* AUXCAPS2W (pack 1) */ + TEST_FIELD_SIZE (AUXCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (AUXCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(AUXCAPS2W, wMid, 0) + TEST_FIELD_SIZE (AUXCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (AUXCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(AUXCAPS2W, wPid, 2) + TEST_FIELD_SIZE (AUXCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (AUXCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(AUXCAPS2W, vDriverVersion, 4) +} + +static void test_pack_TIMECAPS(void) +{ + /* TIMECAPS (pack 1) */ + TEST_TYPE_SIZE (TIMECAPS, 8) + TEST_TYPE_ALIGN (TIMECAPS, 1) + TEST_FIELD_SIZE (TIMECAPS, wPeriodMin, 4) + TEST_FIELD_ALIGN (TIMECAPS, wPeriodMin, 1) + TEST_FIELD_OFFSET(TIMECAPS, wPeriodMin, 0) + TEST_FIELD_SIZE (TIMECAPS, wPeriodMax, 4) + TEST_FIELD_ALIGN (TIMECAPS, wPeriodMax, 1) + TEST_FIELD_OFFSET(TIMECAPS, wPeriodMax, 4) +} + +static void test_pack_JOYCAPSA(void) +{ + /* JOYCAPSA (pack 1) */ + TEST_FIELD_SIZE (JOYCAPSA, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPSA, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPSA, wMid, 0) + TEST_FIELD_SIZE (JOYCAPSA, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPSA, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPSA, wPid, 2) +} + +static void test_pack_JOYCAPSW(void) +{ + /* JOYCAPSW (pack 1) */ + TEST_FIELD_SIZE (JOYCAPSW, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPSW, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPSW, wMid, 0) + TEST_FIELD_SIZE (JOYCAPSW, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPSW, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPSW, wPid, 2) +} + +static void test_pack_JOYCAPS2A(void) +{ + /* JOYCAPS2A (pack 1) */ + TEST_FIELD_SIZE (JOYCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPS2A, wMid, 0) + TEST_FIELD_SIZE (JOYCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPS2A, wPid, 2) +} + +static void test_pack_JOYCAPS2W(void) +{ + /* JOYCAPS2W (pack 1) */ + TEST_FIELD_SIZE (JOYCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (JOYCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(JOYCAPS2W, wMid, 0) + TEST_FIELD_SIZE (JOYCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (JOYCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(JOYCAPS2W, wPid, 2) +} + +static void test_pack_JOYINFO(void) +{ + /* JOYINFO (pack 1) */ + TEST_TYPE_SIZE (JOYINFO, 16) + TEST_TYPE_ALIGN (JOYINFO, 1) + TEST_FIELD_SIZE (JOYINFO, wXpos, 4) + TEST_FIELD_ALIGN (JOYINFO, wXpos, 1) + TEST_FIELD_OFFSET(JOYINFO, wXpos, 0) + TEST_FIELD_SIZE (JOYINFO, wYpos, 4) + TEST_FIELD_ALIGN (JOYINFO, wYpos, 1) + TEST_FIELD_OFFSET(JOYINFO, wYpos, 4) + TEST_FIELD_SIZE (JOYINFO, wZpos, 4) + TEST_FIELD_ALIGN (JOYINFO, wZpos, 1) + TEST_FIELD_OFFSET(JOYINFO, wZpos, 8) + TEST_FIELD_SIZE (JOYINFO, wButtons, 4) + TEST_FIELD_ALIGN (JOYINFO, wButtons, 1) + TEST_FIELD_OFFSET(JOYINFO, wButtons, 12) +} + +static void test_pack_JOYINFOEX(void) +{ + /* JOYINFOEX (pack 1) */ + TEST_TYPE_SIZE (JOYINFOEX, 52) + TEST_TYPE_ALIGN (JOYINFOEX, 1) + TEST_FIELD_SIZE (JOYINFOEX, dwSize, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwSize, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwSize, 0) + TEST_FIELD_SIZE (JOYINFOEX, dwFlags, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwFlags, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwFlags, 4) + TEST_FIELD_SIZE (JOYINFOEX, dwXpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwXpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwXpos, 8) + TEST_FIELD_SIZE (JOYINFOEX, dwYpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwYpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwYpos, 12) + TEST_FIELD_SIZE (JOYINFOEX, dwZpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwZpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwZpos, 16) + TEST_FIELD_SIZE (JOYINFOEX, dwRpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwRpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwRpos, 20) + TEST_FIELD_SIZE (JOYINFOEX, dwUpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwUpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwUpos, 24) + TEST_FIELD_SIZE (JOYINFOEX, dwVpos, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwVpos, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwVpos, 28) + TEST_FIELD_SIZE (JOYINFOEX, dwButtons, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwButtons, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwButtons, 32) + TEST_FIELD_SIZE (JOYINFOEX, dwButtonNumber, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwButtonNumber, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwButtonNumber, 36) + TEST_FIELD_SIZE (JOYINFOEX, dwPOV, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwPOV, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwPOV, 40) + TEST_FIELD_SIZE (JOYINFOEX, dwReserved1, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwReserved1, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwReserved1, 44) + TEST_FIELD_SIZE (JOYINFOEX, dwReserved2, 4) + TEST_FIELD_ALIGN (JOYINFOEX, dwReserved2, 1) + TEST_FIELD_OFFSET(JOYINFOEX, dwReserved2, 48) +} + +static void test_pack_MIXERCAPSA(void) +{ + /* MIXERCAPSA (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPSA, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPSA, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPSA, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPSA, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPSA, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPSA, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPSA, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPSA, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPSA, vDriverVersion, 4) +} + +static void test_pack_MIXERCAPSW(void) +{ + /* MIXERCAPSW (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPSW, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPSW, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPSW, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPSW, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPSW, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPSW, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPSW, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPSW, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPSW, vDriverVersion, 4) +} + +static void test_pack_MIXERCAPS2A(void) +{ + /* MIXERCAPS2A (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPS2A, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2A, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2A, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPS2A, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2A, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2A, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPS2A, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPS2A, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPS2A, vDriverVersion, 4) +} + +static void test_pack_MIXERCAPS2W(void) +{ + /* MIXERCAPS2W (pack 1) */ + TEST_FIELD_SIZE (MIXERCAPS2W, wMid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2W, wMid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2W, wMid, 0) + TEST_FIELD_SIZE (MIXERCAPS2W, wPid, 2) + TEST_FIELD_ALIGN (MIXERCAPS2W, wPid, 1) + TEST_FIELD_OFFSET(MIXERCAPS2W, wPid, 2) + TEST_FIELD_SIZE (MIXERCAPS2W, vDriverVersion, 4) + TEST_FIELD_ALIGN (MIXERCAPS2W, vDriverVersion, 1) + TEST_FIELD_OFFSET(MIXERCAPS2W, vDriverVersion, 4) +} + +static void test_pack_MIXERLINEA(void) +{ + /* MIXERLINEA (pack 1) */ + TEST_FIELD_SIZE (MIXERLINEA, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cbStruct, 0) + TEST_FIELD_SIZE (MIXERLINEA, dwDestination, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwDestination, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwDestination, 4) + TEST_FIELD_SIZE (MIXERLINEA, dwSource, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwSource, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwSource, 8) + TEST_FIELD_SIZE (MIXERLINEA, dwLineID, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwLineID, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwLineID, 12) + TEST_FIELD_SIZE (MIXERLINEA, fdwLine, 4) + TEST_FIELD_ALIGN (MIXERLINEA, fdwLine, 1) + TEST_FIELD_OFFSET(MIXERLINEA, fdwLine, 16) + TEST_FIELD_SIZE (MIXERLINEA, dwUser, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwUser, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwUser, 20) + TEST_FIELD_SIZE (MIXERLINEA, dwComponentType, 4) + TEST_FIELD_ALIGN (MIXERLINEA, dwComponentType, 1) + TEST_FIELD_OFFSET(MIXERLINEA, dwComponentType, 24) + TEST_FIELD_SIZE (MIXERLINEA, cChannels, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cChannels, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cChannels, 28) + TEST_FIELD_SIZE (MIXERLINEA, cConnections, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cConnections, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cConnections, 32) + TEST_FIELD_SIZE (MIXERLINEA, cControls, 4) + TEST_FIELD_ALIGN (MIXERLINEA, cControls, 1) + TEST_FIELD_OFFSET(MIXERLINEA, cControls, 36) +} + +static void test_pack_MIXERLINEW(void) +{ + /* MIXERLINEW (pack 1) */ + TEST_FIELD_SIZE (MIXERLINEW, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cbStruct, 0) + TEST_FIELD_SIZE (MIXERLINEW, dwDestination, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwDestination, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwDestination, 4) + TEST_FIELD_SIZE (MIXERLINEW, dwSource, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwSource, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwSource, 8) + TEST_FIELD_SIZE (MIXERLINEW, dwLineID, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwLineID, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwLineID, 12) + TEST_FIELD_SIZE (MIXERLINEW, fdwLine, 4) + TEST_FIELD_ALIGN (MIXERLINEW, fdwLine, 1) + TEST_FIELD_OFFSET(MIXERLINEW, fdwLine, 16) + TEST_FIELD_SIZE (MIXERLINEW, dwUser, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwUser, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwUser, 20) + TEST_FIELD_SIZE (MIXERLINEW, dwComponentType, 4) + TEST_FIELD_ALIGN (MIXERLINEW, dwComponentType, 1) + TEST_FIELD_OFFSET(MIXERLINEW, dwComponentType, 24) + TEST_FIELD_SIZE (MIXERLINEW, cChannels, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cChannels, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cChannels, 28) + TEST_FIELD_SIZE (MIXERLINEW, cConnections, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cConnections, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cConnections, 32) + TEST_FIELD_SIZE (MIXERLINEW, cControls, 4) + TEST_FIELD_ALIGN (MIXERLINEW, cControls, 1) + TEST_FIELD_OFFSET(MIXERLINEW, cControls, 36) +} + +static void test_pack_MIXERCONTROLA(void) +{ + /* MIXERCONTROLA (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLA, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, cbStruct, 0) + TEST_FIELD_SIZE (MIXERCONTROLA, dwControlID, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, dwControlID, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, dwControlID, 4) + TEST_FIELD_SIZE (MIXERCONTROLA, dwControlType, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, dwControlType, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, dwControlType, 8) + TEST_FIELD_SIZE (MIXERCONTROLA, fdwControl, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, fdwControl, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, fdwControl, 12) + TEST_FIELD_SIZE (MIXERCONTROLA, cMultipleItems, 4) + TEST_FIELD_ALIGN (MIXERCONTROLA, cMultipleItems, 1) + TEST_FIELD_OFFSET(MIXERCONTROLA, cMultipleItems, 16) +} + +static void test_pack_MIXERCONTROLW(void) +{ + /* MIXERCONTROLW (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLW, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, cbStruct, 0) + TEST_FIELD_SIZE (MIXERCONTROLW, dwControlID, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, dwControlID, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, dwControlID, 4) + TEST_FIELD_SIZE (MIXERCONTROLW, dwControlType, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, dwControlType, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, dwControlType, 8) + TEST_FIELD_SIZE (MIXERCONTROLW, fdwControl, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, fdwControl, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, fdwControl, 12) + TEST_FIELD_SIZE (MIXERCONTROLW, cMultipleItems, 4) + TEST_FIELD_ALIGN (MIXERCONTROLW, cMultipleItems, 1) + TEST_FIELD_OFFSET(MIXERCONTROLW, cMultipleItems, 16) +} + +static void test_pack_MIXERCONTROLDETAILS(void) +{ + /* MIXERCONTROLDETAILS (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLDETAILS, cbStruct, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS, cbStruct, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS, cbStruct, 0) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS, dwControlID, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS, dwControlID, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS, dwControlID, 4) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS, cChannels, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS, cChannels, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS, cChannels, 8) +} + +static void test_pack_MIXERCONTROLDETAILS_LISTTEXTA(void) +{ + /* MIXERCONTROLDETAILS_LISTTEXTA (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTA, dwParam1, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTA, dwParam1, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTA, dwParam1, 0) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTA, dwParam2, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTA, dwParam2, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTA, dwParam2, 4) +} + +static void test_pack_MIXERCONTROLDETAILS_LISTTEXTW(void) +{ + /* MIXERCONTROLDETAILS_LISTTEXTW (pack 1) */ + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTW, dwParam1, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTW, dwParam1, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTW, dwParam1, 0) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_LISTTEXTW, dwParam2, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_LISTTEXTW, dwParam2, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_LISTTEXTW, dwParam2, 4) +} + +static void test_pack_MIXERCONTROLDETAILS_BOOLEAN(void) +{ + /* MIXERCONTROLDETAILS_BOOLEAN (pack 1) */ + TEST_TYPE_SIZE (MIXERCONTROLDETAILS_BOOLEAN, 4) + TEST_TYPE_ALIGN (MIXERCONTROLDETAILS_BOOLEAN, 1) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_BOOLEAN, fValue, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_BOOLEAN, fValue, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_BOOLEAN, fValue, 0) +} + +static void test_pack_MIXERCONTROLDETAILS_SIGNED(void) +{ + /* MIXERCONTROLDETAILS_SIGNED (pack 1) */ + TEST_TYPE_SIZE (MIXERCONTROLDETAILS_SIGNED, 4) + TEST_TYPE_ALIGN (MIXERCONTROLDETAILS_SIGNED, 1) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_SIGNED, lValue, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_SIGNED, lValue, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_SIGNED, lValue, 0) +} + +static void test_pack_MIXERCONTROLDETAILS_UNSIGNED(void) +{ + /* MIXERCONTROLDETAILS_UNSIGNED (pack 1) */ + TEST_TYPE_SIZE (MIXERCONTROLDETAILS_UNSIGNED, 4) + TEST_TYPE_ALIGN (MIXERCONTROLDETAILS_UNSIGNED, 1) + TEST_FIELD_SIZE (MIXERCONTROLDETAILS_UNSIGNED, dwValue, 4) + TEST_FIELD_ALIGN (MIXERCONTROLDETAILS_UNSIGNED, dwValue, 1) + TEST_FIELD_OFFSET(MIXERCONTROLDETAILS_UNSIGNED, dwValue, 0) +} + +static void test_pack_MMIOINFO(void) +{ + /* MMIOINFO (pack 1) */ + TEST_FIELD_SIZE (MMIOINFO, dwFlags, 4) + TEST_FIELD_ALIGN (MMIOINFO, dwFlags, 1) + TEST_FIELD_OFFSET(MMIOINFO, dwFlags, 0) + TEST_FIELD_SIZE (MMIOINFO, fccIOProc, 4) + TEST_FIELD_ALIGN (MMIOINFO, fccIOProc, 1) + TEST_FIELD_OFFSET(MMIOINFO, fccIOProc, 4) + TEST_FIELD_SIZE (MMIOINFO, pIOProc, 4) + TEST_FIELD_ALIGN (MMIOINFO, pIOProc, 1) + TEST_FIELD_OFFSET(MMIOINFO, pIOProc, 8) + TEST_FIELD_SIZE (MMIOINFO, wErrorRet, 4) + TEST_FIELD_ALIGN (MMIOINFO, wErrorRet, 1) + TEST_FIELD_OFFSET(MMIOINFO, wErrorRet, 12) +} + +static void test_pack_MMCKINFO(void) +{ + /* MMCKINFO (pack 1) */ + TEST_TYPE_SIZE (MMCKINFO, 20) + TEST_TYPE_ALIGN (MMCKINFO, 1) + TEST_FIELD_SIZE (MMCKINFO, ckid, 4) + TEST_FIELD_ALIGN (MMCKINFO, ckid, 1) + TEST_FIELD_OFFSET(MMCKINFO, ckid, 0) + TEST_FIELD_SIZE (MMCKINFO, cksize, 4) + TEST_FIELD_ALIGN (MMCKINFO, cksize, 1) + TEST_FIELD_OFFSET(MMCKINFO, cksize, 4) + TEST_FIELD_SIZE (MMCKINFO, fccType, 4) + TEST_FIELD_ALIGN (MMCKINFO, fccType, 1) + TEST_FIELD_OFFSET(MMCKINFO, fccType, 8) + TEST_FIELD_SIZE (MMCKINFO, dwDataOffset, 4) + TEST_FIELD_ALIGN (MMCKINFO, dwDataOffset, 1) + TEST_FIELD_OFFSET(MMCKINFO, dwDataOffset, 12) + TEST_FIELD_SIZE (MMCKINFO, dwFlags, 4) + TEST_FIELD_ALIGN (MMCKINFO, dwFlags, 1) + TEST_FIELD_OFFSET(MMCKINFO, dwFlags, 16) +} + +static void test_pack_MCI_GENERIC_PARMS(void) +{ + /* MCI_GENERIC_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_GENERIC_PARMS, 4) + TEST_TYPE_ALIGN (MCI_GENERIC_PARMS, 1) + TEST_FIELD_SIZE (MCI_GENERIC_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_GENERIC_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_GENERIC_PARMS, dwCallback, 0) +} + +static void test_pack_MCI_OPEN_PARMSA(void) +{ + /* MCI_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OPEN_PARMSA, 20) + TEST_TYPE_ALIGN (MCI_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_OPEN_PARMSA, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSA, lpstrAlias, 16) +} + +static void test_pack_MCI_OPEN_PARMSW(void) +{ + /* MCI_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OPEN_PARMSW, 20) + TEST_TYPE_ALIGN (MCI_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_OPEN_PARMSW, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OPEN_PARMSW, lpstrAlias, 16) +} + +static void test_pack_MCI_PLAY_PARMS(void) +{ + /* MCI_PLAY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_PLAY_PARMS, 12) + TEST_TYPE_ALIGN (MCI_PLAY_PARMS, 1) + TEST_FIELD_SIZE (MCI_PLAY_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_PLAY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_PLAY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_PLAY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_PLAY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_PLAY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_PLAY_PARMS, dwTo, 8) +} + +static void test_pack_MCI_SEEK_PARMS(void) +{ + /* MCI_SEEK_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_SEEK_PARMS, 8) + TEST_TYPE_ALIGN (MCI_SEEK_PARMS, 1) + TEST_FIELD_SIZE (MCI_SEEK_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SEEK_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SEEK_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SEEK_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_SEEK_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_SEEK_PARMS, dwTo, 4) +} + +static void test_pack_MCI_STATUS_PARMS(void) +{ + /* MCI_STATUS_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_STATUS_PARMS, 16) + TEST_TYPE_ALIGN (MCI_STATUS_PARMS, 1) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwReturn, 4) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwReturn, 4) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwItem, 4) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwItem, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwItem, 8) + TEST_FIELD_SIZE (MCI_STATUS_PARMS, dwTrack, 4) + TEST_FIELD_ALIGN (MCI_STATUS_PARMS, dwTrack, 1) + TEST_FIELD_OFFSET(MCI_STATUS_PARMS, dwTrack, 12) +} + +static void test_pack_MCI_INFO_PARMSA(void) +{ + /* MCI_INFO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_INFO_PARMSA, 12) + TEST_TYPE_ALIGN (MCI_INFO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_INFO_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_INFO_PARMSA, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSA, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_INFO_PARMSA, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSA, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSA, dwRetSize, 8) +} + +static void test_pack_MCI_INFO_PARMSW(void) +{ + /* MCI_INFO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_INFO_PARMSW, 12) + TEST_TYPE_ALIGN (MCI_INFO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_INFO_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_INFO_PARMSW, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSW, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_INFO_PARMSW, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_INFO_PARMSW, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_INFO_PARMSW, dwRetSize, 8) +} + +static void test_pack_MCI_GETDEVCAPS_PARMS(void) +{ + /* MCI_GETDEVCAPS_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_GETDEVCAPS_PARMS, 12) + TEST_TYPE_ALIGN (MCI_GETDEVCAPS_PARMS, 1) + TEST_FIELD_SIZE (MCI_GETDEVCAPS_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_GETDEVCAPS_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_GETDEVCAPS_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_GETDEVCAPS_PARMS, dwReturn, 4) + TEST_FIELD_ALIGN (MCI_GETDEVCAPS_PARMS, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_GETDEVCAPS_PARMS, dwReturn, 4) + TEST_FIELD_SIZE (MCI_GETDEVCAPS_PARMS, dwItem, 4) + TEST_FIELD_ALIGN (MCI_GETDEVCAPS_PARMS, dwItem, 1) + TEST_FIELD_OFFSET(MCI_GETDEVCAPS_PARMS, dwItem, 8) +} + +static void test_pack_MCI_SYSINFO_PARMSA(void) +{ + /* MCI_SYSINFO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_SYSINFO_PARMSA, 20) + TEST_TYPE_ALIGN (MCI_SYSINFO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, dwRetSize, 8) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, dwNumber, 12) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSA, wDeviceType, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSA, wDeviceType, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSA, wDeviceType, 16) +} + +static void test_pack_MCI_SYSINFO_PARMSW(void) +{ + /* MCI_SYSINFO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_SYSINFO_PARMSW, 20) + TEST_TYPE_ALIGN (MCI_SYSINFO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, dwRetSize, 8) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, dwNumber, 12) + TEST_FIELD_SIZE (MCI_SYSINFO_PARMSW, wDeviceType, 4) + TEST_FIELD_ALIGN (MCI_SYSINFO_PARMSW, wDeviceType, 1) + TEST_FIELD_OFFSET(MCI_SYSINFO_PARMSW, wDeviceType, 16) +} + +static void test_pack_MCI_SET_PARMS(void) +{ + /* MCI_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_SET_PARMS, 12) + TEST_TYPE_ALIGN (MCI_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_SET_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_SIZE (MCI_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_SET_PARMS, dwAudio, 8) +} + +static void test_pack_MCI_BREAK_PARMS(void) +{ + /* MCI_BREAK_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_BREAK_PARMS, 12) + TEST_TYPE_ALIGN (MCI_BREAK_PARMS, 1) + TEST_FIELD_SIZE (MCI_BREAK_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_BREAK_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_BREAK_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_BREAK_PARMS, nVirtKey, 4) + TEST_FIELD_ALIGN (MCI_BREAK_PARMS, nVirtKey, 1) + TEST_FIELD_OFFSET(MCI_BREAK_PARMS, nVirtKey, 4) + TEST_FIELD_SIZE (MCI_BREAK_PARMS, hwndBreak, 4) + TEST_FIELD_ALIGN (MCI_BREAK_PARMS, hwndBreak, 1) + TEST_FIELD_OFFSET(MCI_BREAK_PARMS, hwndBreak, 8) +} + +static void test_pack_MCI_SOUND_PARMSA(void) +{ + /* MCI_SOUND_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_SOUND_PARMSA, 8) + TEST_TYPE_ALIGN (MCI_SOUND_PARMSA, 1) + TEST_FIELD_SIZE (MCI_SOUND_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SOUND_PARMSA, lpstrSoundName, 4) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSA, lpstrSoundName, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSA, lpstrSoundName, 4) +} + +static void test_pack_MCI_SOUND_PARMSW(void) +{ + /* MCI_SOUND_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_SOUND_PARMSW, 8) + TEST_TYPE_ALIGN (MCI_SOUND_PARMSW, 1) + TEST_FIELD_SIZE (MCI_SOUND_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SOUND_PARMSW, lpstrSoundName, 4) + TEST_FIELD_ALIGN (MCI_SOUND_PARMSW, lpstrSoundName, 1) + TEST_FIELD_OFFSET(MCI_SOUND_PARMSW, lpstrSoundName, 4) +} + +static void test_pack_MCI_SAVE_PARMSA(void) +{ + /* MCI_SAVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_SAVE_PARMSA, 8) + TEST_TYPE_ALIGN (MCI_SAVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_SAVE_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SAVE_PARMSA, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSA, lpfilename, 4) +} + +static void test_pack_MCI_SAVE_PARMSW(void) +{ + /* MCI_SAVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_SAVE_PARMSW, 8) + TEST_TYPE_ALIGN (MCI_SAVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_SAVE_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SAVE_PARMSW, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_SAVE_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_SAVE_PARMSW, lpfilename, 4) +} + +static void test_pack_MCI_LOAD_PARMSA(void) +{ + /* MCI_LOAD_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_LOAD_PARMSA, 8) + TEST_TYPE_ALIGN (MCI_LOAD_PARMSA, 1) + TEST_FIELD_SIZE (MCI_LOAD_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_LOAD_PARMSA, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSA, lpfilename, 4) +} + +static void test_pack_MCI_LOAD_PARMSW(void) +{ + /* MCI_LOAD_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_LOAD_PARMSW, 8) + TEST_TYPE_ALIGN (MCI_LOAD_PARMSW, 1) + TEST_FIELD_SIZE (MCI_LOAD_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_LOAD_PARMSW, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_LOAD_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_LOAD_PARMSW, lpfilename, 4) +} + +static void test_pack_MCI_RECORD_PARMS(void) +{ + /* MCI_RECORD_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_RECORD_PARMS, 12) + TEST_TYPE_ALIGN (MCI_RECORD_PARMS, 1) + TEST_FIELD_SIZE (MCI_RECORD_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_RECORD_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_RECORD_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_RECORD_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_RECORD_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_RECORD_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_RECORD_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_RECORD_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_RECORD_PARMS, dwTo, 8) +} + +static void test_pack_MCI_VD_PLAY_PARMS(void) +{ + /* MCI_VD_PLAY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_PLAY_PARMS, 16) + TEST_TYPE_ALIGN (MCI_VD_PLAY_PARMS, 1) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwTo, 8) + TEST_FIELD_SIZE (MCI_VD_PLAY_PARMS, dwSpeed, 4) + TEST_FIELD_ALIGN (MCI_VD_PLAY_PARMS, dwSpeed, 1) + TEST_FIELD_OFFSET(MCI_VD_PLAY_PARMS, dwSpeed, 12) +} + +static void test_pack_MCI_VD_STEP_PARMS(void) +{ + /* MCI_VD_STEP_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_STEP_PARMS, 8) + TEST_TYPE_ALIGN (MCI_VD_STEP_PARMS, 1) + TEST_FIELD_SIZE (MCI_VD_STEP_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_VD_STEP_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_STEP_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_STEP_PARMS, dwFrames, 4) + TEST_FIELD_ALIGN (MCI_VD_STEP_PARMS, dwFrames, 1) + TEST_FIELD_OFFSET(MCI_VD_STEP_PARMS, dwFrames, 4) +} + +static void test_pack_MCI_VD_ESCAPE_PARMSA(void) +{ + /* MCI_VD_ESCAPE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_ESCAPE_PARMSA, 8) + TEST_TYPE_ALIGN (MCI_VD_ESCAPE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSA, lpstrCommand, 4) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSA, lpstrCommand, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSA, lpstrCommand, 4) +} + +static void test_pack_MCI_VD_ESCAPE_PARMSW(void) +{ + /* MCI_VD_ESCAPE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_VD_ESCAPE_PARMSW, 8) + TEST_TYPE_ALIGN (MCI_VD_ESCAPE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_VD_ESCAPE_PARMSW, lpstrCommand, 4) + TEST_FIELD_ALIGN (MCI_VD_ESCAPE_PARMSW, lpstrCommand, 1) + TEST_FIELD_OFFSET(MCI_VD_ESCAPE_PARMSW, lpstrCommand, 4) +} + +static void test_pack_MCI_WAVE_OPEN_PARMSA(void) +{ + /* MCI_WAVE_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_OPEN_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_WAVE_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSA, dwBufferSeconds, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSA, dwBufferSeconds, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSA, dwBufferSeconds, 20) +} + +static void test_pack_MCI_WAVE_OPEN_PARMSW(void) +{ + /* MCI_WAVE_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_OPEN_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_WAVE_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_WAVE_OPEN_PARMSW, dwBufferSeconds, 4) + TEST_FIELD_ALIGN (MCI_WAVE_OPEN_PARMSW, dwBufferSeconds, 1) + TEST_FIELD_OFFSET(MCI_WAVE_OPEN_PARMSW, dwBufferSeconds, 20) +} + +static void test_pack_MCI_WAVE_DELETE_PARMS(void) +{ + /* MCI_WAVE_DELETE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_DELETE_PARMS, 12) + TEST_TYPE_ALIGN (MCI_WAVE_DELETE_PARMS, 1) + TEST_FIELD_SIZE (MCI_WAVE_DELETE_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_WAVE_DELETE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_DELETE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_DELETE_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_WAVE_DELETE_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_WAVE_DELETE_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_WAVE_DELETE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_WAVE_DELETE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_WAVE_DELETE_PARMS, dwTo, 8) +} + +static void test_pack_MCI_WAVE_SET_PARMS(void) +{ + /* MCI_WAVE_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_WAVE_SET_PARMS, 44) + TEST_TYPE_ALIGN (MCI_WAVE_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, dwAudio, 8) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wInput, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wInput, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wInput, 12) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wOutput, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wOutput, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wOutput, 16) +#ifndef __REACTOS__ /* FIXME: Inspect */ + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wFormatTag, 4) +#endif + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wFormatTag, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wFormatTag, 20) +#ifndef __REACTOS__ /* FIXME: Inspect */ + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nChannels, 4) +#endif + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nChannels, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nChannels, 24) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nSamplesPerSec, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nSamplesPerSec, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nSamplesPerSec, 28) + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nAvgBytesPerSec, 4) + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nAvgBytesPerSec, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nAvgBytesPerSec, 32) +#ifndef __REACTOS__ /* FIXME: Inspect */ + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, nBlockAlign, 4) +#endif + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, nBlockAlign, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, nBlockAlign, 36) +#ifndef __REACTOS__ /* FIXME: Inspect */ + TEST_FIELD_SIZE (MCI_WAVE_SET_PARMS, wBitsPerSample, 4) +#endif + TEST_FIELD_ALIGN (MCI_WAVE_SET_PARMS, wBitsPerSample, 1) + TEST_FIELD_OFFSET(MCI_WAVE_SET_PARMS, wBitsPerSample, 40) +} + +static void test_pack_MCI_SEQ_SET_PARMS(void) +{ + /* MCI_SEQ_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_SEQ_SET_PARMS, 32) + TEST_TYPE_ALIGN (MCI_SEQ_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwAudio, 8) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwTempo, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwTempo, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwTempo, 12) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwPort, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwPort, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwPort, 16) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwSlave, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwSlave, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwSlave, 20) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwMaster, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwMaster, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwMaster, 24) + TEST_FIELD_SIZE (MCI_SEQ_SET_PARMS, dwOffset, 4) + TEST_FIELD_ALIGN (MCI_SEQ_SET_PARMS, dwOffset, 1) + TEST_FIELD_OFFSET(MCI_SEQ_SET_PARMS, dwOffset, 28) +} + +static void test_pack_MCI_ANIM_OPEN_PARMSA(void) +{ + /* MCI_ANIM_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_OPEN_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_ANIM_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, dwStyle, 20) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSA, hWndParent, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSA, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSA, hWndParent, 24) +} + +static void test_pack_MCI_ANIM_OPEN_PARMSW(void) +{ + /* MCI_ANIM_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_OPEN_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_ANIM_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, dwStyle, 20) + TEST_FIELD_SIZE (MCI_ANIM_OPEN_PARMSW, hWndParent, 4) + TEST_FIELD_ALIGN (MCI_ANIM_OPEN_PARMSW, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_ANIM_OPEN_PARMSW, hWndParent, 24) +} + +static void test_pack_MCI_ANIM_PLAY_PARMS(void) +{ + /* MCI_ANIM_PLAY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_PLAY_PARMS, 16) + TEST_TYPE_ALIGN (MCI_ANIM_PLAY_PARMS, 1) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwTo, 8) + TEST_FIELD_SIZE (MCI_ANIM_PLAY_PARMS, dwSpeed, 4) + TEST_FIELD_ALIGN (MCI_ANIM_PLAY_PARMS, dwSpeed, 1) + TEST_FIELD_OFFSET(MCI_ANIM_PLAY_PARMS, dwSpeed, 12) +} + +static void test_pack_MCI_ANIM_STEP_PARMS(void) +{ + /* MCI_ANIM_STEP_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_STEP_PARMS, 8) + TEST_TYPE_ALIGN (MCI_ANIM_STEP_PARMS, 1) + TEST_FIELD_SIZE (MCI_ANIM_STEP_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_ANIM_STEP_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_STEP_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_STEP_PARMS, dwFrames, 4) + TEST_FIELD_ALIGN (MCI_ANIM_STEP_PARMS, dwFrames, 1) + TEST_FIELD_OFFSET(MCI_ANIM_STEP_PARMS, dwFrames, 4) +} + +static void test_pack_MCI_ANIM_WINDOW_PARMSA(void) +{ + /* MCI_ANIM_WINDOW_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_WINDOW_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_ANIM_WINDOW_PARMSA, 1) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, hWnd, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, hWnd, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, hWnd, 4) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, nCmdShow, 8) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSA, lpstrText, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSA, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSA, lpstrText, 12) +} + +static void test_pack_MCI_ANIM_WINDOW_PARMSW(void) +{ + /* MCI_ANIM_WINDOW_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_WINDOW_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_ANIM_WINDOW_PARMSW, 1) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, hWnd, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, hWnd, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, hWnd, 4) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, nCmdShow, 8) + TEST_FIELD_SIZE (MCI_ANIM_WINDOW_PARMSW, lpstrText, 4) + TEST_FIELD_ALIGN (MCI_ANIM_WINDOW_PARMSW, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_ANIM_WINDOW_PARMSW, lpstrText, 12) +} + +static void test_pack_MCI_ANIM_UPDATE_PARMS(void) +{ + /* MCI_ANIM_UPDATE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_ANIM_UPDATE_PARMS, 24) + TEST_TYPE_ALIGN (MCI_ANIM_UPDATE_PARMS, 1) + TEST_FIELD_SIZE (MCI_ANIM_UPDATE_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_ANIM_UPDATE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_ANIM_UPDATE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_ANIM_UPDATE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_ANIM_UPDATE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_ANIM_UPDATE_PARMS, rc, 4) + TEST_FIELD_SIZE (MCI_ANIM_UPDATE_PARMS, hDC, 4) + TEST_FIELD_ALIGN (MCI_ANIM_UPDATE_PARMS, hDC, 1) + TEST_FIELD_OFFSET(MCI_ANIM_UPDATE_PARMS, hDC, 20) +} + +static void test_pack_MCI_OVLY_OPEN_PARMSA(void) +{ + /* MCI_OVLY_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_OPEN_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_OVLY_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, dwStyle, 20) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSA, hWndParent, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSA, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSA, hWndParent, 24) +} + +static void test_pack_MCI_OVLY_OPEN_PARMSW(void) +{ + /* MCI_OVLY_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_OPEN_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_OVLY_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, dwStyle, 20) + TEST_FIELD_SIZE (MCI_OVLY_OPEN_PARMSW, hWndParent, 4) + TEST_FIELD_ALIGN (MCI_OVLY_OPEN_PARMSW, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_OVLY_OPEN_PARMSW, hWndParent, 24) +} + +static void test_pack_MCI_OVLY_WINDOW_PARMSA(void) +{ + /* MCI_OVLY_WINDOW_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_WINDOW_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_OVLY_WINDOW_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, hWnd, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, hWnd, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, hWnd, 4) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, nCmdShow, 8) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSA, lpstrText, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSA, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSA, lpstrText, 12) +} + +static void test_pack_MCI_OVLY_WINDOW_PARMSW(void) +{ + /* MCI_OVLY_WINDOW_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_WINDOW_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_OVLY_WINDOW_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, hWnd, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, hWnd, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, hWnd, 4) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, nCmdShow, 8) + TEST_FIELD_SIZE (MCI_OVLY_WINDOW_PARMSW, lpstrText, 4) + TEST_FIELD_ALIGN (MCI_OVLY_WINDOW_PARMSW, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_OVLY_WINDOW_PARMSW, lpstrText, 12) +} + +static void test_pack_MCI_OVLY_SAVE_PARMSA(void) +{ + /* MCI_OVLY_SAVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_SAVE_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_OVLY_SAVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSA, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSA, lpfilename, 4) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSA, rc, 8) +} + +static void test_pack_MCI_OVLY_SAVE_PARMSW(void) +{ + /* MCI_OVLY_SAVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_SAVE_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_OVLY_SAVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSW, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSW, lpfilename, 4) + TEST_FIELD_SIZE (MCI_OVLY_SAVE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_SAVE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_SAVE_PARMSW, rc, 8) +} + +static void test_pack_MCI_OVLY_LOAD_PARMSA(void) +{ + /* MCI_OVLY_LOAD_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_LOAD_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_OVLY_LOAD_PARMSA, 1) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSA, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSA, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSA, lpfilename, 4) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSA, rc, 8) +} + +static void test_pack_MCI_OVLY_LOAD_PARMSW(void) +{ + /* MCI_OVLY_LOAD_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_OVLY_LOAD_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_OVLY_LOAD_PARMSW, 1) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSW, lpfilename, 4) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSW, lpfilename, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSW, lpfilename, 4) + TEST_FIELD_SIZE (MCI_OVLY_LOAD_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_OVLY_LOAD_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_OVLY_LOAD_PARMSW, rc, 8) +} + +static void test_pack_MCI_DGV_RECT_PARMS(void) +{ + /* MCI_DGV_RECT_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RECT_PARMS, 20) + TEST_TYPE_ALIGN (MCI_DGV_RECT_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_RECT_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECT_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECT_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RECT_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RECT_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECT_PARMS, rc, 4) +} + +static void test_pack_MCI_DGV_CAPTURE_PARMSA(void) +{ + /* MCI_DGV_CAPTURE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CAPTURE_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_DGV_CAPTURE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSA, lpstrFileName, 4) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSA, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSA, lpstrFileName, 4) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSA, rc, 8) +} + +static void test_pack_MCI_DGV_CAPTURE_PARMSW(void) +{ + /* MCI_DGV_CAPTURE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CAPTURE_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_DGV_CAPTURE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSW, lpstrFileName, 4) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSW, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSW, lpstrFileName, 4) + TEST_FIELD_SIZE (MCI_DGV_CAPTURE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_CAPTURE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_CAPTURE_PARMSW, rc, 8) +} + +static void test_pack_MCI_DGV_COPY_PARMS(void) +{ + /* MCI_DGV_COPY_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_COPY_PARMS, 36) + TEST_TYPE_ALIGN (MCI_DGV_COPY_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwTo, 8) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, rc, 12) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwAudioStream, 28) + TEST_FIELD_SIZE (MCI_DGV_COPY_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_COPY_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_COPY_PARMS, dwVideoStream, 32) +} + +static void test_pack_MCI_DGV_CUE_PARMS(void) +{ + /* MCI_DGV_CUE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CUE_PARMS, 8) + TEST_TYPE_ALIGN (MCI_DGV_CUE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_CUE_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CUE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUE_PARMS, dwTo, 4) +} + +static void test_pack_MCI_DGV_CUT_PARMS(void) +{ + /* MCI_DGV_CUT_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_CUT_PARMS, 36) + TEST_TYPE_ALIGN (MCI_DGV_CUT_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwTo, 8) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, rc, 12) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwAudioStream, 28) + TEST_FIELD_SIZE (MCI_DGV_CUT_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_CUT_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_CUT_PARMS, dwVideoStream, 32) +} + +static void test_pack_MCI_DGV_DELETE_PARMS(void) +{ + /* MCI_DGV_DELETE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_DELETE_PARMS, 36) + TEST_TYPE_ALIGN (MCI_DGV_DELETE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwTo, 8) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, rc, 12) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwAudioStream, 28) + TEST_FIELD_SIZE (MCI_DGV_DELETE_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_DELETE_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_DELETE_PARMS, dwVideoStream, 32) +} + +static void test_pack_MCI_DGV_INFO_PARMSA(void) +{ + /* MCI_DGV_INFO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_INFO_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_DGV_INFO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, dwRetSize, 8) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSA, dwItem, 12) +} + +static void test_pack_MCI_DGV_INFO_PARMSW(void) +{ + /* MCI_DGV_INFO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_INFO_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_DGV_INFO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, dwRetSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, dwRetSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, dwRetSize, 8) + TEST_FIELD_SIZE (MCI_DGV_INFO_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_INFO_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_INFO_PARMSW, dwItem, 12) +} + +static void test_pack_MCI_DGV_LIST_PARMSA(void) +{ + /* MCI_DGV_LIST_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_LIST_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_DGV_LIST_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwLength, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwLength, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwLength, 8) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwNumber, 12) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, dwItem, 16) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSA, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSA, lpstrAlgorithm, 20) +} + +static void test_pack_MCI_DGV_LIST_PARMSW(void) +{ + /* MCI_DGV_LIST_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_LIST_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_DGV_LIST_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, lpstrReturn, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, lpstrReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, lpstrReturn, 4) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwLength, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwLength, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwLength, 8) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwNumber, 12) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, dwItem, 16) + TEST_FIELD_SIZE (MCI_DGV_LIST_PARMSW, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_LIST_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_LIST_PARMSW, lpstrAlgorithm, 20) +} + +static void test_pack_MCI_DGV_MONITOR_PARMS(void) +{ + /* MCI_DGV_MONITOR_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_MONITOR_PARMS, 12) + TEST_TYPE_ALIGN (MCI_DGV_MONITOR_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_MONITOR_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_MONITOR_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_MONITOR_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_MONITOR_PARMS, dwSource, 4) + TEST_FIELD_ALIGN (MCI_DGV_MONITOR_PARMS, dwSource, 1) + TEST_FIELD_OFFSET(MCI_DGV_MONITOR_PARMS, dwSource, 4) + TEST_FIELD_SIZE (MCI_DGV_MONITOR_PARMS, dwMethod, 4) + TEST_FIELD_ALIGN (MCI_DGV_MONITOR_PARMS, dwMethod, 1) + TEST_FIELD_OFFSET(MCI_DGV_MONITOR_PARMS, dwMethod, 8) +} + +static void test_pack_MCI_DGV_OPEN_PARMSA(void) +{ + /* MCI_DGV_OPEN_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_OPEN_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_DGV_OPEN_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, dwStyle, 20) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSA, hWndParent, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSA, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSA, hWndParent, 24) +} + +static void test_pack_MCI_DGV_OPEN_PARMSW(void) +{ + /* MCI_DGV_OPEN_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_OPEN_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_DGV_OPEN_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, wDeviceID, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, wDeviceID, 4) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, lpstrDeviceType, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, lpstrDeviceType, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, lpstrDeviceType, 8) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, lpstrElementName, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, lpstrElementName, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, lpstrElementName, 12) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, lpstrAlias, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, lpstrAlias, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, lpstrAlias, 16) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, dwStyle, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, dwStyle, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, dwStyle, 20) + TEST_FIELD_SIZE (MCI_DGV_OPEN_PARMSW, hWndParent, 4) + TEST_FIELD_ALIGN (MCI_DGV_OPEN_PARMSW, hWndParent, 1) + TEST_FIELD_OFFSET(MCI_DGV_OPEN_PARMSW, hWndParent, 24) +} + +static void test_pack_MCI_DGV_PASTE_PARMS(void) +{ + /* MCI_DGV_PASTE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_PASTE_PARMS, 32) + TEST_TYPE_ALIGN (MCI_DGV_PASTE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwTo, 4) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, rc, 8) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwAudioStream, 24) + TEST_FIELD_SIZE (MCI_DGV_PASTE_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_PASTE_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_PASTE_PARMS, dwVideoStream, 28) +} + +static void test_pack_MCI_DGV_QUALITY_PARMSA(void) +{ + /* MCI_DGV_QUALITY_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_QUALITY_PARMSA, 20) + TEST_TYPE_ALIGN (MCI_DGV_QUALITY_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, dwItem, 4) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, lpstrName, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, lpstrName, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, lpstrName, 8) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, lpstrAlgorithm, 12) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSA, dwHandle, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSA, dwHandle, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSA, dwHandle, 16) +} + +static void test_pack_MCI_DGV_QUALITY_PARMSW(void) +{ + /* MCI_DGV_QUALITY_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_QUALITY_PARMSW, 20) + TEST_TYPE_ALIGN (MCI_DGV_QUALITY_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, dwItem, 4) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, lpstrName, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, lpstrName, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, lpstrName, 8) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, lpstrAlgorithm, 12) + TEST_FIELD_SIZE (MCI_DGV_QUALITY_PARMSW, dwHandle, 4) + TEST_FIELD_ALIGN (MCI_DGV_QUALITY_PARMSW, dwHandle, 1) + TEST_FIELD_OFFSET(MCI_DGV_QUALITY_PARMSW, dwHandle, 16) +} + +static void test_pack_MCI_DGV_RECORD_PARMS(void) +{ + /* MCI_DGV_RECORD_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RECORD_PARMS, 36) + TEST_TYPE_ALIGN (MCI_DGV_RECORD_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwFrom, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwFrom, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwFrom, 4) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwTo, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwTo, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwTo, 8) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, rc, 12) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwAudioStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwAudioStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwAudioStream, 28) + TEST_FIELD_SIZE (MCI_DGV_RECORD_PARMS, dwVideoStream, 4) + TEST_FIELD_ALIGN (MCI_DGV_RECORD_PARMS, dwVideoStream, 1) + TEST_FIELD_OFFSET(MCI_DGV_RECORD_PARMS, dwVideoStream, 32) +} + +static void test_pack_MCI_DGV_RESERVE_PARMSA(void) +{ + /* MCI_DGV_RESERVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESERVE_PARMSA, 12) + TEST_TYPE_ALIGN (MCI_DGV_RESERVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSA, lpstrPath, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSA, lpstrPath, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSA, lpstrPath, 4) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSA, dwSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSA, dwSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSA, dwSize, 8) +} + +static void test_pack_MCI_DGV_RESERVE_PARMSW(void) +{ + /* MCI_DGV_RESERVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESERVE_PARMSW, 12) + TEST_TYPE_ALIGN (MCI_DGV_RESERVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSW, lpstrPath, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSW, lpstrPath, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSW, lpstrPath, 4) + TEST_FIELD_SIZE (MCI_DGV_RESERVE_PARMSW, dwSize, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESERVE_PARMSW, dwSize, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESERVE_PARMSW, dwSize, 8) +} + +static void test_pack_MCI_DGV_RESTORE_PARMSA(void) +{ + /* MCI_DGV_RESTORE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESTORE_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_DGV_RESTORE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSA, lpstrFileName, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSA, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSA, lpstrFileName, 4) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSA, rc, 8) +} + +static void test_pack_MCI_DGV_RESTORE_PARMSW(void) +{ + /* MCI_DGV_RESTORE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_RESTORE_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_DGV_RESTORE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSW, lpstrFileName, 4) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSW, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSW, lpstrFileName, 4) + TEST_FIELD_SIZE (MCI_DGV_RESTORE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_RESTORE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_RESTORE_PARMSW, rc, 8) +} + +static void test_pack_MCI_DGV_SAVE_PARMSA(void) +{ + /* MCI_DGV_SAVE_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SAVE_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_DGV_SAVE_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSA, lpstrFileName, 4) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSA, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSA, lpstrFileName, 4) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSA, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSA, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSA, rc, 8) +} + +static void test_pack_MCI_DGV_SAVE_PARMSW(void) +{ + /* MCI_DGV_SAVE_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SAVE_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_DGV_SAVE_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSW, lpstrFileName, 4) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSW, lpstrFileName, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSW, lpstrFileName, 4) + TEST_FIELD_SIZE (MCI_DGV_SAVE_PARMSW, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_SAVE_PARMSW, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_SAVE_PARMSW, rc, 8) +} + +static void test_pack_MCI_DGV_SET_PARMS(void) +{ + /* MCI_DGV_SET_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SET_PARMS, 20) + TEST_TYPE_ALIGN (MCI_DGV_SET_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwTimeFormat, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwTimeFormat, 4) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwAudio, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwAudio, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwAudio, 8) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwFileFormat, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwFileFormat, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwFileFormat, 12) + TEST_FIELD_SIZE (MCI_DGV_SET_PARMS, dwSpeed, 4) + TEST_FIELD_ALIGN (MCI_DGV_SET_PARMS, dwSpeed, 1) + TEST_FIELD_OFFSET(MCI_DGV_SET_PARMS, dwSpeed, 16) +} + +static void test_pack_MCI_DGV_SETAUDIO_PARMSA(void) +{ + /* MCI_DGV_SETAUDIO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETAUDIO_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_DGV_SETAUDIO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwItem, 4) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwValue, 8) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, dwOver, 12) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, lpstrAlgorithm, 16) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSA, lpstrQuality, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSA, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSA, lpstrQuality, 20) +} + +static void test_pack_MCI_DGV_SETAUDIO_PARMSW(void) +{ + /* MCI_DGV_SETAUDIO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETAUDIO_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_DGV_SETAUDIO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwItem, 4) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwValue, 8) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, dwOver, 12) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, lpstrAlgorithm, 16) + TEST_FIELD_SIZE (MCI_DGV_SETAUDIO_PARMSW, lpstrQuality, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETAUDIO_PARMSW, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETAUDIO_PARMSW, lpstrQuality, 20) +} + +static void test_pack_MCI_DGV_SIGNAL_PARMS(void) +{ + /* MCI_DGV_SIGNAL_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SIGNAL_PARMS, 16) + TEST_TYPE_ALIGN (MCI_DGV_SIGNAL_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwPosition, 4) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwPosition, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwPosition, 4) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwPeriod, 4) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwPeriod, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwPeriod, 8) + TEST_FIELD_SIZE (MCI_DGV_SIGNAL_PARMS, dwUserParm, 4) + TEST_FIELD_ALIGN (MCI_DGV_SIGNAL_PARMS, dwUserParm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SIGNAL_PARMS, dwUserParm, 12) +} + +static void test_pack_MCI_DGV_SETVIDEO_PARMSA(void) +{ + /* MCI_DGV_SETVIDEO_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETVIDEO_PARMSA, 28) + TEST_TYPE_ALIGN (MCI_DGV_SETVIDEO_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwItem, 4) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwValue, 8) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwOver, 12) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, lpstrAlgorithm, 16) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, lpstrQuality, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, lpstrQuality, 20) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSA, dwSourceNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSA, dwSourceNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSA, dwSourceNumber, 24) +} + +static void test_pack_MCI_DGV_SETVIDEO_PARMSW(void) +{ + /* MCI_DGV_SETVIDEO_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_SETVIDEO_PARMSW, 28) + TEST_TYPE_ALIGN (MCI_DGV_SETVIDEO_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwItem, 4) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwValue, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwValue, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwValue, 8) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwOver, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwOver, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwOver, 12) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, lpstrAlgorithm, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, lpstrAlgorithm, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, lpstrAlgorithm, 16) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, lpstrQuality, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, lpstrQuality, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, lpstrQuality, 20) + TEST_FIELD_SIZE (MCI_DGV_SETVIDEO_PARMSW, dwSourceNumber, 4) + TEST_FIELD_ALIGN (MCI_DGV_SETVIDEO_PARMSW, dwSourceNumber, 1) + TEST_FIELD_OFFSET(MCI_DGV_SETVIDEO_PARMSW, dwSourceNumber, 24) +} + +static void test_pack_MCI_DGV_STATUS_PARMSA(void) +{ + /* MCI_DGV_STATUS_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_STATUS_PARMSA, 24) + TEST_TYPE_ALIGN (MCI_DGV_STATUS_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwReturn, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwReturn, 4) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwTrack, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwTrack, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwTrack, 12) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, lpstrDrive, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, lpstrDrive, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, lpstrDrive, 16) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSA, dwReference, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSA, dwReference, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSA, dwReference, 20) +} + +static void test_pack_MCI_DGV_STATUS_PARMSW(void) +{ + /* MCI_DGV_STATUS_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_STATUS_PARMSW, 24) + TEST_TYPE_ALIGN (MCI_DGV_STATUS_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwReturn, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwReturn, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwReturn, 4) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwItem, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwItem, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwItem, 8) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwTrack, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwTrack, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwTrack, 12) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, lpstrDrive, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, lpstrDrive, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, lpstrDrive, 16) + TEST_FIELD_SIZE (MCI_DGV_STATUS_PARMSW, dwReference, 4) + TEST_FIELD_ALIGN (MCI_DGV_STATUS_PARMSW, dwReference, 1) + TEST_FIELD_OFFSET(MCI_DGV_STATUS_PARMSW, dwReference, 20) +} + +static void test_pack_MCI_DGV_STEP_PARMS(void) +{ + /* MCI_DGV_STEP_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_STEP_PARMS, 8) + TEST_TYPE_ALIGN (MCI_DGV_STEP_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_STEP_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_STEP_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_STEP_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_STEP_PARMS, dwFrames, 4) + TEST_FIELD_ALIGN (MCI_DGV_STEP_PARMS, dwFrames, 1) + TEST_FIELD_OFFSET(MCI_DGV_STEP_PARMS, dwFrames, 4) +} + +static void test_pack_MCI_DGV_UPDATE_PARMS(void) +{ + /* MCI_DGV_UPDATE_PARMS (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_UPDATE_PARMS, 24) + TEST_TYPE_ALIGN (MCI_DGV_UPDATE_PARMS, 1) + TEST_FIELD_SIZE (MCI_DGV_UPDATE_PARMS, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_UPDATE_PARMS, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_UPDATE_PARMS, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_UPDATE_PARMS, rc, 16) + TEST_FIELD_ALIGN (MCI_DGV_UPDATE_PARMS, rc, 1) + TEST_FIELD_OFFSET(MCI_DGV_UPDATE_PARMS, rc, 4) + TEST_FIELD_SIZE (MCI_DGV_UPDATE_PARMS, hDC, 4) + TEST_FIELD_ALIGN (MCI_DGV_UPDATE_PARMS, hDC, 1) + TEST_FIELD_OFFSET(MCI_DGV_UPDATE_PARMS, hDC, 20) +} + +static void test_pack_MCI_DGV_WINDOW_PARMSA(void) +{ + /* MCI_DGV_WINDOW_PARMSA (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_WINDOW_PARMSA, 16) + TEST_TYPE_ALIGN (MCI_DGV_WINDOW_PARMSA, 1) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, hWnd, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, hWnd, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, hWnd, 4) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, nCmdShow, 8) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSA, lpstrText, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSA, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSA, lpstrText, 12) +} + +static void test_pack_MCI_DGV_WINDOW_PARMSW(void) +{ + /* MCI_DGV_WINDOW_PARMSW (pack 1) */ + TEST_TYPE_SIZE (MCI_DGV_WINDOW_PARMSW, 16) + TEST_TYPE_ALIGN (MCI_DGV_WINDOW_PARMSW, 1) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, dwCallback, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, dwCallback, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, dwCallback, 0) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, hWnd, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, hWnd, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, hWnd, 4) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, nCmdShow, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, nCmdShow, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, nCmdShow, 8) + TEST_FIELD_SIZE (MCI_DGV_WINDOW_PARMSW, lpstrText, 4) + TEST_FIELD_ALIGN (MCI_DGV_WINDOW_PARMSW, lpstrText, 1) + TEST_FIELD_OFFSET(MCI_DGV_WINDOW_PARMSW, lpstrText, 12) +} + ... 676 lines suppressed ...
5 years
1
0
0
0
[reactos] 01/01: [WININET_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a4f791d9206d3b1c67fba…
commit a4f791d9206d3b1c67fba2793f80234ad8a2411f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:07:21 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:07:21 2019 +0100 [WININET_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/wininet/CMakeLists.txt | 2 +- modules/rostests/winetests/wininet/ftp.c | 35 +- modules/rostests/winetests/wininet/http.c | 539 +++++++++++++++++++++- modules/rostests/winetests/wininet/internet.c | 27 +- modules/rostests/winetests/wininet/url.c | 52 +-- modules/rostests/winetests/wininet/urlcache.c | 105 ++++- 6 files changed, 680 insertions(+), 80 deletions(-) diff --git a/modules/rostests/winetests/wininet/CMakeLists.txt b/modules/rostests/winetests/wininet/CMakeLists.txt index 576bcaaa0ae..ca770fda0f5 100644 --- a/modules/rostests/winetests/wininet/CMakeLists.txt +++ b/modules/rostests/winetests/wininet/CMakeLists.txt @@ -12,5 +12,5 @@ list(APPEND SOURCE add_executable(wininet_winetest ${SOURCE}) set_module_type(wininet_winetest win32cui) -add_importlibs(wininet_winetest wininet crypt32 ws2_32 user32 advapi32 msvcrt kernel32) +add_importlibs(wininet_winetest wininet crypt32 ws2_32 user32 advapi32 shell32 msvcrt kernel32 ntdll) add_rostests_file(TARGET wininet_winetest) diff --git a/modules/rostests/winetests/wininet/ftp.c b/modules/rostests/winetests/wininet/ftp.c index baf20ffa118..6a3e4dc1d98 100644 --- a/modules/rostests/winetests/wininet/ftp.c +++ b/modules/rostests/winetests/wininet/ftp.c @@ -71,7 +71,7 @@ static void test_connect(HINTERNET hInternet) */ SetLastError(0xdeadbeef); - hFtp = InternetConnectA(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0); + hFtp = InternetConnectA(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "anonymous", "IEUser@", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0); if (hFtp) /* some servers accept an empty password */ { ros_skip_flaky @@ -707,7 +707,7 @@ static void test_renamefile(HINTERNET hFtp, HINTERNET hConnect) "Expected ERROR_INTERNET_INCORRECT_HANDLE_TYPE, got %d\n", GetLastError()); } -static void test_command(HINTERNET hFtp, HINTERNET hConnect) +static void test_command(HINTERNET hFtp) { BOOL ret; DWORD error; @@ -722,17 +722,18 @@ static void test_command(HINTERNET hFtp, HINTERNET hConnect) { { FALSE, ERROR_INVALID_PARAMETER, NULL }, { FALSE, ERROR_INVALID_PARAMETER, "" }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "HELO" }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE " }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, " SIZE" }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE " }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE /welcome.msg /welcome.msg" }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE /welcome.msg" }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE /welcome.msg " }, - { TRUE, ERROR_SUCCESS, "SIZE\t/welcome.msg" }, - { TRUE, ERROR_SUCCESS, "SIZE /welcome.msg" }, - { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "PWD /welcome.msg" }, - { TRUE, ERROR_SUCCESS, "PWD" } + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "invalid" }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size" }, + { TRUE, ERROR_SUCCESS, "type i" }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size " }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, " size" }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size " }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size welcome.msg welcome.msg" }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size welcome.msg" }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size welcome.msg " }, + { TRUE, ERROR_SUCCESS, "size welcome.msg" }, + { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "pwd welcome.msg" }, + { TRUE, ERROR_SUCCESS, "pwd" } }; if (!pFtpCommandA) @@ -741,7 +742,7 @@ static void test_command(HINTERNET hFtp, HINTERNET hConnect) return; } - for (i = 0; i < sizeof(command_test) / sizeof(command_test[0]); i++) + for (i = 0; i < ARRAY_SIZE(command_test); i++) { SetLastError(0xdeadbeef); ret = pFtpCommandA(hFtp, FALSE, FTP_TRANSFER_TYPE_ASCII, command_test[i].cmd, 0, NULL); @@ -970,7 +971,7 @@ static void test_status_callbacks(HINTERNET hInternet) cb = pInternetSetStatusCallbackA(hInternet, status_callback); ok(cb == NULL, "expected NULL got %p\n", cb); - hFtp = InternetConnectA(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, + hFtp = InternetConnectA(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "anonymous", "IEUser@", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 1); if (!hFtp) { @@ -1004,7 +1005,7 @@ START_TEST(ftp) hInternet = InternetOpenA("winetest", 0, NULL, NULL, 0); ok(hInternet != NULL, "InternetOpen failed: %u\n", GetLastError()); - hFtp = InternetConnectA(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0); + hFtp = InternetConnectA(hInternet, "
ftp.winehq.org
", INTERNET_DEFAULT_FTP_PORT, "anonymous", "IEUser@", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0); if (!hFtp) { InternetCloseHandle(hInternet); @@ -1037,7 +1038,7 @@ START_TEST(ftp) test_putfile(hFtp, hHttp); test_removedir(hFtp, hHttp); test_renamefile(hFtp, hHttp); - test_command(hFtp, hHttp); + test_command(hFtp); test_find_first_file(hFtp, hHttp); test_get_current_dir(hFtp, hHttp); test_status_callbacks(hInternet); diff --git a/modules/rostests/winetests/wininet/http.c b/modules/rostests/winetests/wininet/http.c index 1c5cbfe834b..de34a37cd6b 100644 --- a/modules/rostests/winetests/wininet/http.c +++ b/modules/rostests/winetests/wininet/http.c @@ -23,6 +23,7 @@ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> +#include <limits.h> #include "windef.h" #include "winbase.h" @@ -172,7 +173,7 @@ static BOOL (WINAPI *pInternetGetSecurityInfoByURLA)(LPSTR,PCCERT_CHAIN_CONTEXT* static int strcmp_wa(LPCWSTR strw, const char *stra) { WCHAR buf[512]; - MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, sizeof(buf)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, ARRAY_SIZE(buf)); return lstrcmpW(strw, buf); } @@ -723,8 +724,11 @@ static void InternetReadFile_test(int flags, const test_data_t *test) length = sizeof(buffer)-2; memset(buffer, 0x77, sizeof(buffer)); + SetLastError(0xdeadbeef); res = HttpQueryInfoA(hor,HTTP_QUERY_RAW_HEADERS,buffer,&length,0x0); ok(res, "HttpQueryInfoA(HTTP_QUERY_RAW_HEADERS) failed with error %d\n", GetLastError()); + ok(GetLastError() == 0 || + broken(GetLastError() == 0xdeadbeef /* XP/W2K3 */), "Last Error not reset %u\n", GetLastError()); /* show that the function writes data past the length returned */ ok(buffer[length-2], "Expected any header character, got 0x00\n"); ok(!buffer[length-1], "Expected 0x00, got %02X\n", buffer[length-1]); @@ -985,7 +989,10 @@ static void InternetReadFile_chunked_test(void) { char *buffer = HeapAlloc(GetProcessHeap(),0,length+1); + SetLastError(0xdeadbeef); res = InternetReadFile(hor,buffer,length,&got); + ok(GetLastError() == 0 || + broken(GetLastError() == 0xdeadbeef /* XP/W2K3 */), "Last Error not reset %u\n", GetLastError()); buffer[got]=0; trace("ReadFile -> %i %i\n",res,got); @@ -998,8 +1005,11 @@ static void InternetReadFile_chunked_test(void) if (length == 0) { got = 0xdeadbeef; + SetLastError(0xdeadbeef); res = InternetReadFile( hor, buffer, 1, &got ); ok( res, "InternetReadFile failed: %u\n", GetLastError() ); + ok(GetLastError() == 0 || + broken(GetLastError() == 0xdeadbeef /* XP/W2K3 */), "Last Error not reset %u\n", GetLastError()); ok( !got, "got %u\n", got ); break; } @@ -2044,6 +2054,11 @@ static const char okmsg[] = "Server: winetest\r\n" "\r\n"; +static const char okmsg201[] = +"HTTP/1.1 201 OK\r\n" +"Server: winetest\r\n" +"\r\n"; + static const char okmsg2[] = "HTTP/1.1 200 OK\r\n" "Date: Mon, 01 Dec 2008 13:44:34 GMT\r\n" @@ -2053,6 +2068,12 @@ static const char okmsg2[] = "Set-Cookie: two\r\n" "\r\n"; +static DWORD64 content_length; +static const char largemsg[] = +"HTTP/1.1 200 OK\r\n" +"Content-Length: %I64u\r\n" +"\r\n"; + static const char okmsg_cookie_path[] = "HTTP/1.1 200 OK\r\n" "Date: Mon, 01 Dec 2008 13:44:34 GMT\r\n" @@ -2432,6 +2453,22 @@ static DWORD CALLBACK server_thread(LPVOID param) else send(c, notokmsg, sizeof notokmsg-1, 0); } + if (strstr(buffer, "HEAD /upload3.txt")) + { + if (strstr(buffer, "Authorization: Basic dXNlcjE6cHdkMQ==")) + send(c, okmsg, sizeof okmsg-1, 0); + else + send(c, noauthmsg, sizeof noauthmsg-1, 0); + } + if (strstr(buffer, "HEAD /upload4.txt")) + { + if (strstr(buffer, "Authorization: Bearer dXNlcjE6cHdkMQ==")) + send(c, okmsg, sizeof okmsg-1, 0); + else if (strstr(buffer, "Authorization: Basic dXNlcjpwd2Q=")) + send(c, okmsg201, sizeof okmsg-1, 0); + else + send(c, noauthmsg, sizeof noauthmsg-1, 0); + } if (strstr(buffer, "/test_cookie_path1")) { if (strstr(buffer, "subcookie=data")) @@ -2508,6 +2545,13 @@ static DWORD CALLBACK server_thread(LPVOID param) { send(c, okmsg, sizeof(okmsg)-1, 0); } + + if (strstr(buffer, "HEAD /test_large_content")) + { + char msg[sizeof(largemsg) + 16]; + sprintf(msg, largemsg, content_length); + send(c, msg, strlen(msg), 0); + } if (strstr(buffer, "HEAD /test_auth_host1")) { if (strstr(buffer, "Authorization: Basic dGVzdDE6cGFzcw==")) @@ -4245,7 +4289,7 @@ static void test_head_request(int port) len = sizeof(content_length); content_length = -1; ret = HttpQueryInfoA(req.request, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_CONTENT_LENGTH, &content_length, &len, 0); - ok(ret, "HttpQueryInfo dailed: %u\n", GetLastError()); + ok(ret, "HttpQueryInfo failed: %u\n", GetLastError()); ok(len == sizeof(DWORD), "len = %u\n", len); ok(content_length == 100, "content_length = %u\n", content_length); @@ -4544,7 +4588,7 @@ static void test_http_status(int port) DWORD i, size; BOOL res; - for(i=0; i < sizeof(http_status_tests)/sizeof(*http_status_tests); i++) { + for(i = 0; i < ARRAY_SIZE(http_status_tests); i++) { send_buffer = http_status_tests[i].response_text; open_simple_request(&req, "localhost", port, NULL, "/send_from_buffer"); @@ -4681,6 +4725,7 @@ static void test_basic_auth_credentials_reuse(int port) HINTERNET ses, con, req; DWORD status, size; BOOL ret; + char buffer[0x40]; ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); ok( ses != NULL, "InternetOpenA failed\n" ); @@ -4695,6 +4740,20 @@ static void test_basic_auth_credentials_reuse(int port) ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_USERNAME, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "user"), "got %s\n", buffer); + ok(size == 4, "got %u\n", size); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_PASSWORD, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "pwd"), "got %s\n", buffer); + ok(size == 3, "got %u\n", size); + status = 0xdeadbeef; size = sizeof(status); ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); @@ -4718,6 +4777,316 @@ static void test_basic_auth_credentials_reuse(int port) ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_USERNAME, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "user"), "got %s\n", buffer); + ok(size == 4, "got %u\n", size); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_PASSWORD, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "pwd"), "got %s\n", buffer); + ok(size == 3, "got %u\n", size); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == 200, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); +} + +static void test_basic_auth_credentials_end_session(int port) +{ + HINTERNET ses, con, req; + DWORD status, size; + BOOL ret; + char buffer[0x40]; + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + con = InternetConnectA( ses, "localhost", port, "user", "pwd", + INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_USERNAME, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "user"), "got %s\n", buffer); + ok(size == 4, "got %u\n", size); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_PASSWORD, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "pwd"), "got %s\n", buffer); + ok(size == 3, "got %u\n", size); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == HTTP_STATUS_OK, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + /* Clear the cached credentials */ + ret = InternetSetOptionA(ses, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0); + ok(ret, "unexpected failure %u\n", GetLastError()); + + con = InternetConnectA( ses, "localhost", port, NULL, NULL, + INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "PUT", "/upload2.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_USERNAME, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, ""), "got %s\n", buffer); + ok(size == 0, "got %u\n", size); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_PASSWORD, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, ""), "got %s\n", buffer); + ok(size == 0, "got %u\n", size); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == HTTP_STATUS_BAD_REQUEST, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); +} + +static void test_basic_auth_credentials_different(int port) +{ + HINTERNET ses, con, req; + DWORD status, size; + BOOL ret; + char buffer[0x40]; + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + con = InternetConnectA( ses, "localhost", port, "user", "pwd", + INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_USERNAME, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "user"), "got %s\n", buffer); + ok(size == 4, "got %u\n", size); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_PASSWORD, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "pwd"), "got %s\n", buffer); + ok(size == 3, "got %u\n", size); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == 200, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + con = InternetConnectA( ses, "localhost", port, "user1", "pwd1", + INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload3.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_USERNAME, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "user1"), "got %s\n", buffer); + ok(size == 5, "got %u\n", size); + + size = sizeof(buffer); + SetLastError(0xdeadbeef); + ret = InternetQueryOptionA(req, INTERNET_OPTION_PASSWORD, buffer, &size); + ok(ret, "unexpected failure %u\n", GetLastError()); + ok(!strcmp(buffer, "pwd1"), "got %s\n", buffer); + ok(size == 4, "got %u\n", size); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == 200, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); +} + +/* + * Manually set the Authorization for both calls. + */ +static void test_basic_auth_credentials_manual(int port) +{ + HINTERNET ses, con, req; + DWORD status, size; + BOOL ret; + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + /* Clear the cached credentials */ + ret = InternetSetOptionA(ses, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0); + ok(ret, "unexpected failure %u\n", GetLastError()); + + con = InternetConnectA( ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + /* Set Authorization Header */ + ret = HttpAddRequestHeadersA(req, "Authorization: Basic dXNlcjpwd2Q=\r\n", ~0u, + HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD); + ok(ret, "HttpAddRequestHeaders Failed\n"); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == 200, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); + + /* Show manual headers are cached. */ + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + con = InternetConnectA( ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == 401, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + con = InternetConnectA( ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload4.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + /* Set Authorization Header */ + ret = HttpAddRequestHeadersA(req, "Authorization: Bearer dXNlcjE6cHdkMQ==\r\n", ~0u, + HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD); + ok(ret, "HttpAddRequestHeaders Failed\n"); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == 200, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); +} + +/* + * Manually set the Authorization for the bearer call, which shows the cached is used. + */ +static void test_basic_auth_credentials_cached_manual(int port) +{ + HINTERNET ses, con, req; + DWORD status, size; + BOOL ret; + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + /* Clear the cached credentials */ + ret = InternetSetOptionA(ses, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0); + ok(ret, "unexpected failure %u\n", GetLastError()); + + con = InternetConnectA( ses, "localhost", port, "user", "pwd", + INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + status = 0xdeadbeef; size = sizeof(status); ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); @@ -4727,6 +5096,33 @@ static void test_basic_auth_credentials_reuse(int port) InternetCloseHandle( req ); InternetCloseHandle( con ); InternetCloseHandle( ses ); + + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); + ok( ses != NULL, "InternetOpenA failed\n" ); + + con = InternetConnectA( ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0 ); + ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() ); + + req = HttpOpenRequestA( con, "HEAD", "/upload4.txt", NULL, NULL, NULL, 0, 0 ); + ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() ); + + /* Setting an Authorization Header doesn't override the cached one. */ + ret = HttpAddRequestHeadersA(req, "Authorization: Bearer dXNlcjE6cHdkMQ==\r\n", ~0u, + HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD); + ok(ret, "HttpAddRequestHeaders Failed\n"); + + ret = HttpSendRequestA( req, NULL, 0, NULL, 0 ); + ok( ret, "HttpSendRequestA failed %u\n", GetLastError() ); + + status = 0xdeadbeef; + size = sizeof(status); + ret = HttpQueryInfoA( req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok( ret, "HttpQueryInfoA failed %u\n", GetLastError() ); + ok( status == 201, "got %u\n", status ); + + InternetCloseHandle( req ); + InternetCloseHandle( con ); + InternetCloseHandle( ses ); } static void test_async_read(int port) @@ -5792,6 +6188,94 @@ static void test_remove_dot_segments(int port) close_request(&req); } +struct large_test +{ + DWORD64 content_length; + BOOL ret; +}; + +static void test_large_content(int port) +{ + struct large_test tests[] = { + { 0, TRUE }, + { UINT_MAX-1, TRUE }, + { UINT_MAX, TRUE }, + { (DWORD64)UINT_MAX+1, FALSE }, + { ~0, FALSE }, + }; + test_request_t req; + DWORD sizelen, len; + DWORD read_size; + DWORD64 len64; + char buf[16]; + BOOL ret; + size_t i; + + open_simple_request(&req, "localhost", port, "HEAD", "/test_large_content"); + + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + content_length = tests[i].content_length; + ret = HttpSendRequestA(req.request, NULL, 0, NULL, 0); + ok(ret, "HttpSendRequest failed: %u\n", GetLastError()); + + len = ~0; + sizelen = sizeof(len); + SetLastError(0xdeadbeef); + ret = HttpQueryInfoA(req.request, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_CONTENT_LENGTH, + &len, &sizelen, 0); + if (tests[i].ret) + { + ok(ret, "HttpQueryInfo should have succeeded\n"); + ok(GetLastError() == ERROR_SUCCESS || + broken(GetLastError() == 0xdeadbeef), /* xp, 2k8, vista */ + "expected ERROR_SUCCESS, got %x\n", GetLastError()); + ok(len == (DWORD)tests[i].content_length, "expected %u, got %u\n", + (DWORD)tests[i].content_length, len); + } + else + { + ok(!ret, "HttpQueryInfo should have failed\n"); + ok(GetLastError() == ERROR_HTTP_INVALID_HEADER, + "expected ERROR_HTTP_INVALID_HEADER, got %x\n", GetLastError()); + ok(len == ~0, "expected ~0, got %u\n", len); + } + ok(sizelen == sizeof(DWORD), "sizelen %u\n", sizelen); + } + + /* test argument size */ + len64 = ~0; + sizelen = sizeof(len64); + SetLastError(0xdeadbeef); + ret = HttpQueryInfoA(req.request, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_CONTENT_LENGTH, + &len64, &len, 0); + ok(!ret, "HttpQueryInfo should have failed\n"); + ok(GetLastError() == ERROR_HTTP_INVALID_HEADER, + "expected ERROR_HTTP_INVALID_HEADER, got %x\n", GetLastError()); + ok(sizelen == sizeof(DWORD64), "sizelen %u\n", sizelen); + ok(len64 == ~0, "len64 %x%08x\n", (DWORD)(len64 >> 32), (DWORD)len64); + + close_request(&req); + + /* test internal use of HttpQueryInfo on large size */ + open_read_test_request(port, &req, + "HTTP/1.1 200 OK\r\n" + "Server: winetest\r\n" + "Content-Length: 4294967296\r\n" + "\r\n" + "xx"); + read_expect_async(req.request, buf, 4, &read_size, "xx"); + send_response_and_wait("yy1234567890", FALSE, buf, &read_size, "xxyy", 4, 0, 2); + read_expect_sync_data(req.request, buf, 10, "1234567890"); + + SET_EXPECT(INTERNET_STATUS_CLOSING_CONNECTION); + SET_EXPECT(INTERNET_STATUS_CONNECTION_CLOSED); + close_async_handle(req.session, 2); + CHECK_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION); + CHECK_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED); + close_connection(); +} + static void test_http_connection(void) { struct server_info si; @@ -5801,7 +6285,7 @@ static void test_http_connection(void) si.hEvent = CreateEventW(NULL, 0, 0, NULL); si.port = 7531; - hThread = CreateThread(NULL, 0, server_thread, (LPVOID) &si, 0, &id); + hThread = CreateThread(NULL, 0, server_thread, &si, 0, &id); ok( hThread != NULL, "create thread failed\n"); r = WaitForSingleObject(si.hEvent, 10000); @@ -5843,6 +6327,10 @@ static void test_http_connection(void) test_request_content_length(si.port); test_accept_encoding(si.port); test_basic_auth_credentials_reuse(si.port); + test_basic_auth_credentials_end_session(si.port); + test_basic_auth_credentials_different(si.port); + test_basic_auth_credentials_manual(si.port); + test_basic_auth_credentials_cached_manual(si.port); test_async_read(si.port); test_http_read(si.port); test_connection_break(si.port); @@ -5861,6 +6349,7 @@ else } #endif test_remove_dot_segments(si.port); + test_large_content(si.port); /* send the basic request again to shutdown the server thread */ test_basic_request(si.port, "GET", "/quit"); @@ -5908,12 +6397,15 @@ static const cert_struct_test_t test_winehq_com_cert = { "Minnesota\r\n" "Saint Paul\r\n" "WineHQ\r\n" + "IT\r\n" "test.winehq.com\r\n" "webmaster(a)winehq.org", "US\r\n" "Minnesota\r\n" + "Saint Paul\r\n" "WineHQ\r\n" + "IT\r\n" "test.winehq.com\r\n" "webmaster(a)winehq.org" }; @@ -5928,6 +6420,12 @@ static void test_cert_struct(HINTERNET req, const cert_struct_test_t *test) size = sizeof(info); res = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, &info, &size); + if (!res) + { + win_skip("Querying INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT failed, skipping tests\n"); + return; + } + ok(res, "InternetQueryOption failed: %u\n", GetLastError()); ok(size == sizeof(info), "size = %u\n", size); @@ -6142,7 +6640,7 @@ static void test_security_flags(void) ok(!res && GetLastError() == ERROR_IO_PENDING, "HttpSendRequest failed: %u\n", GetLastError()); WaitForSingleObject(complete_event, INFINITE); - ok(req_error == ERROR_INTERNET_SEC_CERT_REV_FAILED || broken(req_error == ERROR_INTERNET_SEC_CERT_ERRORS), + ok(req_error == ERROR_INTERNET_SEC_CERT_ERRORS, "req_error = %d\n", req_error); size = 0; @@ -6166,6 +6664,9 @@ static void test_security_flags(void) ok(!cert->lpszEncryptionAlgName, "unexpected encryption algorithm name\n"); ok(!cert->lpszProtocolName, "unexpected protocol name\n"); ok(cert->dwKeySize != 0xdeadbeef, "unexpected key size\n"); + + LocalFree(cert->lpszSubjectInfo); + LocalFree(cert->lpszIssuerInfo); } HeapFree(GetProcessHeap(), 0, cert); @@ -6178,7 +6679,7 @@ static void test_security_flags(void) CLEAR_NOTIFIED(INTERNET_STATUS_COOKIE_SENT); CLEAR_NOTIFIED(INTERNET_STATUS_DETECTING_PROXY); - if(req_error != ERROR_INTERNET_SEC_CERT_REV_FAILED) { + if(req_error != ERROR_INTERNET_SEC_CERT_ERRORS) { win_skip("Unexpected cert errors %u, skipping security flags tests\n", req_error); close_async_handle(ses, 3); @@ -6192,10 +6693,10 @@ static void test_security_flags(void) test_request_flags(req, 8); /* IE11 finds both rev failure and invalid CA. Previous versions required rev failure to be ignored before invalid CA was reported. */ - test_secflags_option(req, _SECURITY_FLAG_CERT_REV_FAILED, _SECURITY_FLAG_CERT_INVALID_CA); + test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA, _SECURITY_FLAG_CERT_REV_FAILED); set_secflags(req, FALSE, SECURITY_FLAG_IGNORE_REVOCATION); - test_secflags_option(req, _SECURITY_FLAG_CERT_REV_FAILED|SECURITY_FLAG_IGNORE_REVOCATION, _SECURITY_FLAG_CERT_INVALID_CA); + test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA|SECURITY_FLAG_IGNORE_REVOCATION, _SECURITY_FLAG_CERT_REV_FAILED); SET_EXPECT(INTERNET_STATUS_CONNECTING_TO_SERVER); SET_EXPECT(INTERNET_STATUS_CONNECTED_TO_SERVER); @@ -6209,7 +6710,7 @@ static void test_security_flags(void) ok(!res && GetLastError() == ERROR_IO_PENDING, "HttpSendRequest failed: %u\n", GetLastError()); WaitForSingleObject(complete_event, INFINITE); - ok(req_error == ERROR_INTERNET_SEC_CERT_ERRORS, "req_error = %d\n", req_error); + ok(req_error == ERROR_INTERNET_INVALID_CA || req_error == ERROR_INTERNET_SEC_CERT_ERRORS, "req_error = %d\n", req_error); CHECK_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER); CHECK_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER); @@ -6220,11 +6721,11 @@ static void test_security_flags(void) CLEAR_NOTIFIED(INTERNET_STATUS_DETECTING_PROXY); test_request_flags(req, INTERNET_REQFLAG_NO_HEADERS); - test_secflags_option(req, SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0); + test_secflags_option(req, SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_INVALID_CA, 0); test_security_info("
https://test.winehq.com/data/some_file.html?q
", ERROR_INTERNET_ITEM_NOT_FOUND, 0); set_secflags(req, FALSE, SECURITY_FLAG_IGNORE_UNKNOWN_CA); - test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA|_SECURITY_FLAG_CERT_REV_FAILED + test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA |SECURITY_FLAG_IGNORE_REVOCATION|SECURITY_FLAG_IGNORE_UNKNOWN_CA, 0); test_http_version(req); @@ -6262,11 +6763,11 @@ static void test_security_flags(void) test_request_flags(req, 0); test_secflags_option(req, SECURITY_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_FLAG_IGNORE_REVOCATION - |SECURITY_FLAG_STRENGTH_STRONG|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0); + |SECURITY_FLAG_STRENGTH_STRONG|_SECURITY_FLAG_CERT_INVALID_CA, 0); test_cert_struct(req, &test_winehq_com_cert); test_security_info("
https://test.winehq.com/data/some_file.html?q
", 0, - _SECURITY_FLAG_CERT_INVALID_CA|_SECURITY_FLAG_CERT_REV_FAILED); + _SECURITY_FLAG_CERT_INVALID_CA); res = InternetReadFile(req, buf, sizeof(buf), &size); ok(res, "InternetReadFile failed: %u\n", GetLastError()); @@ -6299,7 +6800,7 @@ static void test_security_flags(void) CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED); test_secflags_option(req, SECURITY_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_FLAG_STRENGTH_STRONG - |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0); + |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_INVALID_CA, 0); test_http_version(req); SET_EXPECT(INTERNET_STATUS_CONNECTING_TO_SERVER); @@ -6334,7 +6835,7 @@ static void test_security_flags(void) test_request_flags(req, 0); test_secflags_option(req, SECURITY_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_FLAG_STRENGTH_STRONG - |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0); + |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_INVALID_CA, 0); res = InternetReadFile(req, buf, sizeof(buf), &size); ok(res, "InternetReadFile failed: %u\n", GetLastError()); @@ -6903,14 +7404,14 @@ static const struct notification async_send_request_ex_chunked_test[] = static const struct notification_data notification_data[] = { { async_send_request_ex_chunked_test, - sizeof(async_send_request_ex_chunked_test)/sizeof(async_send_request_ex_chunked_test[0]), + ARRAY_SIZE(async_send_request_ex_chunked_test), "GET", "
test.winehq.org
", "tests/data.php" }, { async_send_request_ex_test, - sizeof(async_send_request_ex_test)/sizeof(async_send_request_ex_test[0]), + ARRAY_SIZE(async_send_request_ex_test), "POST", "
test.winehq.org
", "tests/post.php", @@ -6918,14 +7419,14 @@ static const struct notification_data notification_data[] = { }, { async_send_request_ex_test2, - sizeof(async_send_request_ex_test)/sizeof(async_send_request_ex_test[0]), + ARRAY_SIZE(async_send_request_ex_test2), "POST", "
test.winehq.org
", "tests/post.php" }, { async_send_request_ex_resolve_failure_test, - sizeof(async_send_request_ex_resolve_failure_test)/sizeof(async_send_request_ex_resolve_failure_test[0]), + ARRAY_SIZE(async_send_request_ex_resolve_failure_test), "GET", "brokenhost", "index.html", diff --git a/modules/rostests/winetests/wininet/internet.c b/modules/rostests/winetests/wininet/internet.c index 39c698f5dbf..13b29309888 100644 --- a/modules/rostests/winetests/wininet/internet.c +++ b/modules/rostests/winetests/wininet/internet.c @@ -629,7 +629,7 @@ static void test_cookie_url(void) ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, "InternetGetCookeA failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - len = sizeof(bufw)/sizeof(*bufw); + len = ARRAY_SIZE(bufw); res = InternetGetCookieW(about_blankW, NULL, bufw, &len); ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, "InternetGetCookeW failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); @@ -639,7 +639,7 @@ static void test_cookie_url(void) ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, "InternetGetCookeExA failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - len = sizeof(bufw)/sizeof(*bufw); + len = ARRAY_SIZE(bufw); res = pInternetGetCookieExW(about_blankW, NULL, bufw, &len, 0, NULL); ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, "InternetGetCookeExW failed: %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); @@ -887,7 +887,7 @@ static void InternetTimeFromSystemTimeW_test(void) /* test too small buffer size */ SetLastError(0xdeadbeef); - ret = pInternetTimeFromSystemTimeW( &time, INTERNET_RFC1123_FORMAT, string, sizeof(string)/sizeof(string[0]) ); + ret = pInternetTimeFromSystemTimeW( &time, INTERNET_RFC1123_FORMAT, string, ARRAY_SIZE(string)); error = GetLastError(); ok( !ret, "InternetTimeFromSystemTimeW should have returned FALSE\n" ); ok( error == ERROR_INSUFFICIENT_BUFFER, @@ -1084,7 +1084,7 @@ static void test_PrivacyGetSetZonePreferenceW(void) trace("template %u\n", old_template); if(old_template == PRIVACY_TEMPLATE_ADVANCED) { - pref_size = sizeof(pref)/sizeof(WCHAR); + pref_size = ARRAY_SIZE(pref); ret = pPrivacyGetZonePreferenceW(zone, type, &old_template, pref, &pref_size); ok(ret == 0, "expected ret == 0, got %u\n", ret); } @@ -1555,14 +1555,11 @@ static void test_InternetErrorDlg(void) /* Handle some special cases */ switch(i) { - case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR: - case ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR: + case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR: /* later 9.x versions */ + case ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR: /* later 9.x versions */ + case ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE: /* later 11.x versions */ if(res == ERROR_CANCELLED) - { - /* Some windows XP, w2k3 x64, W2K8 */ - win_skip("Skipping some tests for %d\n", i); - continue; - } + expected = ERROR_CANCELLED; break; case ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED: if(res != expected) @@ -1721,7 +1718,7 @@ static void test_InternetGetConnectedStateExW(void) flags = 0; buffer[0] = 0; - res = pInternetGetConnectedStateExW(&flags, buffer, sizeof(buffer) / sizeof(buffer[0]), 0); + res = pInternetGetConnectedStateExW(&flags, buffer, ARRAY_SIZE(buffer), 0); trace("Internet Connection: Flags 0x%02x - Name '%s'\n", flags, wine_dbgstr_w(buffer)); todo_wine ok (flags & INTERNET_RAS_INSTALLED, "Missing RAS flag\n"); @@ -1755,21 +1752,21 @@ todo_wine ok(!buffer[0], "Buffer must not change, got %02X\n", buffer[0]); buffer[0] = 0; - res = pInternetGetConnectedStateExW(NULL, buffer, sizeof(buffer) / sizeof(buffer[0]), 0); + res = pInternetGetConnectedStateExW(NULL, buffer, ARRAY_SIZE(buffer), 0); ok(res == TRUE, "Expected TRUE, got %d\n", res); sz = lstrlenW(buffer); ok(sz > 0, "Expected a connection name\n"); buffer[0] = 0; flags = 0; - res = pInternetGetConnectedStateExW(&flags, buffer, sizeof(buffer) / sizeof(buffer[0]), 0); + res = pInternetGetConnectedStateExW(&flags, buffer, ARRAY_SIZE(buffer), 0); ok(res == TRUE, "Expected TRUE, got %d\n", res); ok(flags, "Expected at least one flag set\n"); sz = lstrlenW(buffer); ok(sz > 0, "Expected a connection name\n"); flags = 0; - res = pInternetGetConnectedStateExW(&flags, NULL, sizeof(buffer) / sizeof(buffer[0]), 0); + res = pInternetGetConnectedStateExW(&flags, NULL, ARRAY_SIZE(buffer), 0); ok(res == TRUE, "Expected TRUE, got %d\n", res); ok(flags, "Expected at least one flag set\n"); diff --git a/modules/rostests/winetests/wininet/url.c b/modules/rostests/winetests/wininet/url.c index 2024b158ff0..19ae7c3314e 100644 --- a/modules/rostests/winetests/wininet/url.c +++ b/modules/rostests/winetests/wininet/url.c @@ -672,17 +672,17 @@ static void InternetCrackUrlW_test(void) memset(&comp, 0, sizeof comp); comp.dwStructSize = sizeof(comp); comp.lpszScheme = scheme; - comp.dwSchemeLength = sizeof(scheme)/sizeof(scheme[0]); + comp.dwSchemeLength = ARRAY_SIZE(scheme); comp.lpszHostName = host; - comp.dwHostNameLength = sizeof(host)/sizeof(host[0]); + comp.dwHostNameLength = ARRAY_SIZE(host); comp.lpszUserName = user; - comp.dwUserNameLength = sizeof(user)/sizeof(user[0]); + comp.dwUserNameLength = ARRAY_SIZE(user); comp.lpszPassword = pwd; - comp.dwPasswordLength = sizeof(pwd)/sizeof(pwd[0]); + comp.dwPasswordLength = ARRAY_SIZE(pwd); comp.lpszUrlPath = urlpart; - comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]); + comp.dwUrlPathLength = ARRAY_SIZE(urlpart); comp.lpszExtraInfo = extra; - comp.dwExtraInfoLength = sizeof(extra)/sizeof(extra[0]); + comp.dwExtraInfoLength = ARRAY_SIZE(extra); SetLastError(0xdeadbeef); r = InternetCrackUrlW(NULL, 0, 0, &comp ); @@ -721,9 +721,9 @@ static void InternetCrackUrlW_test(void) memset(&comp, 0, sizeof comp); comp.dwStructSize = sizeof comp; comp.lpszHostName = host; - comp.dwHostNameLength = sizeof(host)/sizeof(host[0]); + comp.dwHostNameLength = ARRAY_SIZE(host); comp.lpszUrlPath = urlpart; - comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]); + comp.dwUrlPathLength = ARRAY_SIZE(urlpart); r = InternetCrackUrlW(url, 0, 0, &comp ); ok( r, "failed to crack url\n"); @@ -739,11 +739,11 @@ static void InternetCrackUrlW_test(void) memset(&comp, 0, sizeof comp); comp.dwStructSize = sizeof comp; comp.lpszHostName = host; - comp.dwHostNameLength = sizeof(host)/sizeof(host[0]); + comp.dwHostNameLength = ARRAY_SIZE(host); comp.lpszUrlPath = urlpart; - comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]); + comp.dwUrlPathLength = ARRAY_SIZE(urlpart); comp.lpszExtraInfo = NULL; - comp.dwExtraInfoLength = sizeof(extra)/sizeof(extra[0]); + comp.dwExtraInfoLength = ARRAY_SIZE(extra); r = InternetCrackUrlW(url, 0, 0, &comp ); ok( r, "failed to crack url\n"); @@ -763,17 +763,17 @@ static void InternetCrackUrlW_test(void) memset(&comp, 0, sizeof(comp)); comp.dwStructSize = sizeof(comp); comp.lpszScheme = scheme; - comp.dwSchemeLength = sizeof(scheme)/sizeof(scheme[0]); + comp.dwSchemeLength = ARRAY_SIZE(scheme); comp.lpszHostName = host; - comp.dwHostNameLength = sizeof(host)/sizeof(host[0]); + comp.dwHostNameLength = ARRAY_SIZE(host); comp.lpszUserName = user; - comp.dwUserNameLength = sizeof(user)/sizeof(user[0]); + comp.dwUserNameLength = ARRAY_SIZE(user); comp.lpszPassword = pwd; - comp.dwPasswordLength = sizeof(pwd)/sizeof(pwd[0]); + comp.dwPasswordLength = ARRAY_SIZE(pwd); comp.lpszUrlPath = urlpart; - comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]); + comp.dwUrlPathLength = ARRAY_SIZE(urlpart); comp.lpszExtraInfo = extra; - comp.dwExtraInfoLength = sizeof(extra)/sizeof(extra[0]); + comp.dwExtraInfoLength = ARRAY_SIZE(extra); r = InternetCrackUrlW(url2, 0, 0, &comp); ok(!r, "InternetCrackUrl should have failed\n"); @@ -791,17 +791,17 @@ static void InternetCrackUrlW_test(void) memset(&comp, 0, sizeof comp); comp.dwStructSize = sizeof comp; comp.lpszScheme = scheme; - comp.dwSchemeLength = sizeof(scheme)/sizeof(scheme[0]); + comp.dwSchemeLength = ARRAY_SIZE(scheme); comp.lpszHostName = host; - comp.dwHostNameLength = sizeof(host)/sizeof(host[0]); + comp.dwHostNameLength = ARRAY_SIZE(host); comp.lpszUserName = user; - comp.dwUserNameLength = sizeof(user)/sizeof(user[0]); + comp.dwUserNameLength = ARRAY_SIZE(user); comp.lpszPassword = pwd; - comp.dwPasswordLength = sizeof(pwd)/sizeof(pwd[0]); + comp.dwPasswordLength = ARRAY_SIZE(pwd); comp.lpszUrlPath = urlpart; - comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]); + comp.dwUrlPathLength = ARRAY_SIZE(urlpart); comp.lpszExtraInfo = extra; - comp.dwExtraInfoLength = sizeof(extra)/sizeof(extra[0]); + comp.dwExtraInfoLength = ARRAY_SIZE(extra); r = InternetCrackUrlW(url3, 0, 0, &comp ); ok( r, "InternetCrackUrlW failed unexpectedly\n"); ok( host[0] == 'x', "host should be x.org\n"); @@ -812,9 +812,9 @@ static void InternetCrackUrlW_test(void) memset(&comp, 0, sizeof(comp)); comp.dwStructSize = sizeof(comp); comp.lpszHostName = host; - comp.dwHostNameLength = sizeof(host)/sizeof(host[0]); + comp.dwHostNameLength = ARRAY_SIZE(host); comp.lpszUrlPath = urlpart; - comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]); + comp.dwUrlPathLength = ARRAY_SIZE(urlpart); r = InternetCrackUrlW(url3, 0, ICU_DECODE, &comp); ok(r, "InternetCrackUrlW failed unexpectedly\n"); ok(!strcmp_wa(host, "x.org"), "host is %s, should be x.org\n", wine_dbgstr_w(host)); @@ -1224,7 +1224,7 @@ START_TEST(url) return; } - for(i=0; i < sizeof(crack_url_tests)/sizeof(*crack_url_tests); i++) + for(i = 0; i < ARRAY_SIZE(crack_url_tests); i++) test_crack_url(crack_url_tests+i); test_long_url(); diff --git a/modules/rostests/winetests/wininet/urlcache.c b/modules/rostests/winetests/wininet/urlcache.c index 310054b6a7e..f7a5cef0bb1 100644 --- a/modules/rostests/winetests/wininet/urlcache.c +++ b/modules/rostests/winetests/wininet/urlcache.c @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -27,6 +30,7 @@ #include "winnls.h" #include "wininet.h" #include "winineti.h" +#include "shlobj.h" #include "wine/test.h" @@ -891,13 +895,13 @@ static void test_urlcacheW(void) if(ie10_cache) { if(!MultiByteToWideChar(CP_ACP, 0, urls[6].encoded_url, -1, - urls[6].url, sizeof(urls[6].url)/sizeof(WCHAR))) + urls[6].url, ARRAY_SIZE(urls[6].url))) urls[6].url[0] = 0; trace("converted url in test 6: %s\n", wine_dbgstr_w(urls[6].url)); } - for(i=0; i<sizeof(urls)/sizeof(*urls); i++) { + for(i=0; i<ARRAY_SIZE(urls); i++) { INTERNET_CACHE_ENTRY_INFOA *entry_infoA; INTERNET_CACHE_ENTRY_INFOW *entry_infoW; DWORD size; @@ -1100,6 +1104,102 @@ static void test_trailing_slash(void) DeleteFileA(filename); } +static void get_cache_path(DWORD flags, char path[MAX_PATH], char path_win8[MAX_PATH]) +{ + BOOL ret; + int folder = -1; + const char *suffix = ""; + const char *suffix_win8 = ""; + + switch (flags) + { + case 0: + case CACHE_CONFIG_CONTENT_PATHS_FC: + folder = CSIDL_INTERNET_CACHE; + suffix = "\\Content.IE5\\"; + suffix_win8 = "\\IE\\"; + break; + + case CACHE_CONFIG_COOKIES_PATHS_FC: + folder = CSIDL_COOKIES; + suffix = "\\"; + suffix_win8 = "\\"; + break; + + case CACHE_CONFIG_HISTORY_PATHS_FC: + folder = CSIDL_HISTORY; + suffix = "\\History.IE5\\"; + suffix_win8 = "\\History.IE5\\"; + break; + + default: + ok(0, "unexpected flags %#x\n", flags); + break; + } + + ret = SHGetSpecialFolderPathA(0, path, folder, FALSE); + ok(ret, "SHGetSpecialFolderPath error %u\n", GetLastError()); + + strcpy(path_win8, path); + strcat(path_win8, suffix_win8); + + strcat(path, suffix); +} + +static void test_GetUrlCacheConfigInfo(void) +{ + INTERNET_CACHE_CONFIG_INFOA info; + struct + { + INTERNET_CACHE_CONFIG_INFOA *info; + DWORD dwStructSize; + DWORD flags; + BOOL ret; + DWORD error; + } td[] = + { +#if 0 /* crashes under Vista */ + { NULL, 0, 0, FALSE, ERROR_INVALID_PARAMETER }, +#endif + { &info, 0, 0, TRUE }, + { &info, sizeof(info) - 1, 0, TRUE }, + { &info, sizeof(info) + 1, 0, TRUE }, + { &info, 0, CACHE_CONFIG_CONTENT_PATHS_FC, TRUE }, + { &info, sizeof(info), CACHE_CONFIG_CONTENT_PATHS_FC, TRUE }, + { &info, 0, CACHE_CONFIG_COOKIES_PATHS_FC, TRUE }, + { &info, sizeof(info), CACHE_CONFIG_COOKIES_PATHS_FC, TRUE }, + { &info, 0, CACHE_CONFIG_HISTORY_PATHS_FC, TRUE }, + { &info, sizeof(info), CACHE_CONFIG_HISTORY_PATHS_FC, TRUE }, + }; + int i; + BOOL ret; + + for (i = 0; i < ARRAY_SIZE(td); i++) + { + if (td[i].info) + { + memset(&info, 0, sizeof(*td[i].info)); + info.dwStructSize = td[i].dwStructSize; + } + + SetLastError(0xdeadbeef); + ret = GetUrlCacheConfigInfoA(td[i].info, NULL, td[i].flags); + ok(ret == td[i].ret, "%d: expected %d, got %d\n", i, td[i].ret, ret); + if (!ret) + ok(GetLastError() == td[i].error, "%d: expected %u, got %u\n", i, td[i].error, GetLastError()); + else + { + char path[MAX_PATH], path_win8[MAX_PATH]; + + get_cache_path(td[i].flags, path, path_win8); + + ok(info.dwStructSize == td[i].dwStructSize, "got %u\n", info.dwStructSize); + ok(!lstrcmpA(info.CachePath, path) || !lstrcmpA(info.CachePath, path_win8), + "%d: expected %s or %s, got %s\n", i, path, path_win8, info.CachePath); + } + } +} + START_TEST(urlcache) { HMODULE hdll; @@ -1124,4 +1224,5 @@ START_TEST(urlcache) test_FindCloseUrlCache(); test_GetDiskInfoA(); test_trailing_slash(); + test_GetUrlCacheConfigInfo(); }
5 years
1
0
0
0
[reactos] 01/01: [PSDK] Add missing define. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56601978c4dfeba5add6e…
commit 56601978c4dfeba5add6e5a4abb853de72c8bb34 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:06:57 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:06:57 2019 +0100 [PSDK] Add missing define. CORE-16441 --- sdk/include/psdk/wininet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/include/psdk/wininet.h b/sdk/include/psdk/wininet.h index c29646c7cd2..cfc2b2675b0 100644 --- a/sdk/include/psdk/wininet.h +++ b/sdk/include/psdk/wininet.h @@ -2042,6 +2042,7 @@ PrivacyGetZonePreferenceW( #define ERROR_INTERNET_SEC_CERT_ERRORS (INTERNET_ERROR_BASE + 55) #define ERROR_INTERNET_SEC_CERT_NO_REV (INTERNET_ERROR_BASE + 56) #define ERROR_INTERNET_SEC_CERT_REV_FAILED (INTERNET_ERROR_BASE + 57) +#define ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE (INTERNET_ERROR_BASE + 62) #define ERROR_FTP_TRANSFER_IN_PROGRESS (INTERNET_ERROR_BASE + 110) #define ERROR_FTP_DROPPED (INTERNET_ERROR_BASE + 111) #define ERROR_FTP_NO_PASSIVE_MODE (INTERNET_ERROR_BASE + 112)
5 years
1
0
0
0
[reactos] 01/01: [WININET] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c239cdd4e6cc6de59a47a…
commit c239cdd4e6cc6de59a47a5f221ff6e9ae39c14c4 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Dec 7 13:06:34 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Dec 7 13:06:34 2019 +0100 [WININET] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/wininet/cookie.c | 37 ++++--- dll/win32/wininet/dialogs.c | 32 +++--- dll/win32/wininet/ftp.c | 5 +- dll/win32/wininet/http.c | 217 +++++++++++++++++++++++++------------- dll/win32/wininet/internet.c | 17 ++- dll/win32/wininet/internet.h | 9 +- dll/win32/wininet/netconnection.c | 14 +-- dll/win32/wininet/urlcache.c | 112 +++++++++++++++++--- dll/win32/wininet/utility.c | 2 +- media/doc/README.WINE | 2 +- 10 files changed, 299 insertions(+), 148 deletions(-) diff --git a/dll/win32/wininet/cookie.c b/dll/win32/wininet/cookie.c index 60b8335639a..2af752110c0 100644 --- a/dll/win32/wininet/cookie.c +++ b/dll/win32/wininet/cookie.c @@ -151,18 +151,18 @@ static WCHAR *create_cookie_url(substr_t domain, substr_t path, substr_t *ret_pa static const WCHAR cookie_prefix[] = {'C','o','o','k','i','e',':'}; - user_len = sizeof(user)/sizeof(WCHAR); + user_len = ARRAY_SIZE(user); if(!GetUserNameW(user, &user_len)) return FALSE; user_len--; - len = sizeof(cookie_prefix)/sizeof(WCHAR) + user_len + 1 /* @ */ + domain.len + path.len; + len = ARRAY_SIZE(cookie_prefix) + user_len + 1 /* @ */ + domain.len + path.len; url = heap_alloc((len+1) * sizeof(WCHAR)); if(!url) return NULL; memcpy(url, cookie_prefix, sizeof(cookie_prefix)); - p = url + sizeof(cookie_prefix)/sizeof(WCHAR); + p = url + ARRAY_SIZE(cookie_prefix); memcpy(p, user, user_len*sizeof(WCHAR)); p += user_len; @@ -238,7 +238,7 @@ static cookie_t *alloc_cookie(substr_t name, substr_t data, FILETIME expiry, FIL { cookie_t *new_cookie; - new_cookie = heap_alloc(sizeof(*new_cookie)); + new_cookie = heap_alloc_zero(sizeof(*new_cookie)); if(!new_cookie) return NULL; @@ -247,9 +247,12 @@ static cookie_t *alloc_cookie(substr_t name, substr_t data, FILETIME expiry, FIL new_cookie->flags = flags; list_init(&new_cookie->entry); - new_cookie->name = heap_strndupW(name.str, name.len); - new_cookie->data = heap_strndupW(data.str, data.len); - if(!new_cookie->name || !new_cookie->data) { + if(name.str && !(new_cookie->name = heap_strndupW(name.str, name.len))) { + delete_cookie(new_cookie); + return NULL; + } + + if(data.str && !(new_cookie->data = heap_strndupW(data.str, data.len))) { delete_cookie(new_cookie); return NULL; } @@ -658,7 +661,7 @@ DWORD get_cookie_header(const WCHAR *host, const WCHAR *path, WCHAR **ret) ptr = header = heap_alloc(sizeof(cookieW) + (cookie_set.string_len + 3 /* crlf0 */) * sizeof(WCHAR)); if(header) { memcpy(ptr, cookieW, sizeof(cookieW)); - ptr += sizeof(cookieW)/sizeof(*cookieW); + ptr += ARRAY_SIZE(cookieW); cookie_set_to_string(&cookie_set, ptr); heap_free(cookie_set.cookies); @@ -730,7 +733,7 @@ BOOL WINAPI InternetGetCookieExW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, TRACE("(%s, %s, %p, %p, %x, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName), lpCookieData, lpdwSize, flags, reserved); - if (flags) + if (flags & ~INTERNET_COOKIE_HTTPONLY) FIXME("flags 0x%08x not supported\n", flags); if (!lpszUrl) @@ -949,7 +952,7 @@ DWORD set_cookie(substr_t domain, substr_t path, substr_t name, substr_t data, D if(!(end_ptr = memchrW(data.str, ';', data.len))) end_ptr = data.str + data.len; - if(data.len >= (len = sizeof(szDomain)/sizeof(WCHAR)) && !strncmpiW(data.str, szDomain, len)) { + if(data.len >= (len = ARRAY_SIZE(szDomain)) && !strncmpiW(data.str, szDomain, len)) { substr_skip(&data, len); if(data.len && *data.str == '.') @@ -960,17 +963,17 @@ DWORD set_cookie(substr_t domain, substr_t path, substr_t name, substr_t data, D domain = substr(data.str, end_ptr-data.str); TRACE("Parsing new domain %s\n", debugstr_wn(domain.str, domain.len)); - }else if(data.len >= (len = sizeof(szPath)/sizeof(WCHAR)) && !strncmpiW(data.str, szPath, len)) { + }else if(data.len >= (len = ARRAY_SIZE(szPath)) && !strncmpiW(data.str, szPath, len)) { substr_skip(&data, len); path = substr(data.str, end_ptr - data.str); TRACE("Parsing new path %s\n", debugstr_wn(path.str, path.len)); - }else if(data.len >= (len = sizeof(szExpires)/sizeof(WCHAR)) && !strncmpiW(data.str, szExpires, len)) { + }else if(data.len >= (len = ARRAY_SIZE(szExpires)) && !strncmpiW(data.str, szExpires, len)) { SYSTEMTIME st; WCHAR buf[128]; substr_skip(&data, len); - if(end_ptr - data.str < sizeof(buf)/sizeof(WCHAR)-1) { + if(end_ptr - data.str < ARRAY_SIZE(buf)-1) { memcpy(buf, data.str, data.len*sizeof(WCHAR)); buf[data.len] = 0; @@ -983,10 +986,10 @@ DWORD set_cookie(substr_t domain, substr_t path, substr_t name, substr_t data, D } } } - }else if(data.len >= (len = sizeof(szSecure)/sizeof(WCHAR)) && !strncmpiW(data.str, szSecure, len)) { + }else if(data.len >= (len = ARRAY_SIZE(szSecure)) && !strncmpiW(data.str, szSecure, len)) { substr_skip(&data, len); FIXME("secure not handled\n"); - }else if(data.len >= (len = sizeof(szHttpOnly)/sizeof(WCHAR)) && !strncmpiW(data.str, szHttpOnly, len)) { + }else if(data.len >= (len = ARRAY_SIZE(szHttpOnly)) && !strncmpiW(data.str, szHttpOnly, len)) { substr_skip(&data, len); if(!(flags & INTERNET_COOKIE_HTTPONLY)) { @@ -996,11 +999,11 @@ DWORD set_cookie(substr_t domain, substr_t path, substr_t name, substr_t data, D } cookie_flags |= INTERNET_COOKIE_HTTPONLY; - }else if(data.len >= (len = sizeof(szVersion)/sizeof(WCHAR)) && !strncmpiW(data.str, szVersion, len)) { + }else if(data.len >= (len = ARRAY_SIZE(szVersion)) && !strncmpiW(data.str, szVersion, len)) { substr_skip(&data, len); FIXME("version not handled (%s)\n",debugstr_wn(data.str, data.len)); - }else if(data.len >= (len = sizeof(max_ageW)/sizeof(WCHAR)) && !strncmpiW(data.str, max_ageW, len)) { + }else if(data.len >= (len = ARRAY_SIZE(max_ageW)) && !strncmpiW(data.str, max_ageW, len)) { /* Native doesn't support Max-Age attribute. */ WARN("Max-Age ignored\n"); }else if(data.len) { diff --git a/dll/win32/wininet/dialogs.c b/dll/win32/wininet/dialogs.c index b13b566a8eb..5e26c8b7b4d 100644 --- a/dll/win32/wininet/dialogs.c +++ b/dll/win32/wininet/dialogs.c @@ -135,12 +135,10 @@ static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer, if( bSet ) { szUserPass[0] = 0; - GetWindowTextW( hUserItem, szUserPass, - (sizeof szUserPass-1)/sizeof(WCHAR) ); + GetWindowTextW( hUserItem, szUserPass, ARRAY_SIZE( szUserPass ) - 1 ); lstrcatW(szUserPass, szColon); u_len = strlenW( szUserPass ); - GetWindowTextW( hPassItem, szUserPass+u_len, - (sizeof szUserPass)/sizeof(WCHAR)-u_len ); + GetWindowTextW( hPassItem, szUserPass+u_len, ARRAY_SIZE( szUserPass ) - u_len ); r_len = (strlenW( szResource ) + 1)*sizeof(WCHAR); u_len = (strlenW( szUserPass ) + 1)*sizeof(WCHAR); @@ -218,7 +216,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog( { HWND hitem; struct WININET_ErrorDlgParams *params; - WCHAR szRealm[0x80], szServer[0x80]; + WCHAR szRealm[0x80]; if( uMsg == WM_INITDIALOG ) { @@ -230,7 +228,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog( /* extract the Realm from the proxy response and show it */ if( WININET_GetAuthRealm( params->req->hdr.hInternet, - szRealm, sizeof szRealm/sizeof(WCHAR), TRUE ) ) + szRealm, ARRAY_SIZE( szRealm ), TRUE ) ) { hitem = GetDlgItem( hdlg, IDC_REALM ); SetWindowTextW( hitem, szRealm ); @@ -239,7 +237,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog( hitem = GetDlgItem( hdlg, IDC_PROXY ); SetWindowTextW( hitem, params->req->session->appInfo->proxy ); - WININET_GetSetPassword( hdlg, szServer, szRealm, FALSE ); + WININET_GetSetPassword( hdlg, params->req->session->appInfo->proxy, szRealm, FALSE ); return TRUE; } @@ -257,18 +255,18 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog( username[0] = 0; hitem = GetDlgItem( hdlg, IDC_USERNAME ); if( hitem ) - GetWindowTextW( hitem, username, sizeof username/sizeof(WCHAR) ); - + GetWindowTextW( hitem, username, ARRAY_SIZE( username )); + password[0] = 0; hitem = GetDlgItem( hdlg, IDC_PASSWORD ); if( hitem ) - GetWindowTextW( hitem, password, sizeof password/sizeof(WCHAR) ); + GetWindowTextW( hitem, password, ARRAY_SIZE( password )); hitem = GetDlgItem( hdlg, IDC_SAVEPASSWORD ); if( hitem && SendMessageW( hitem, BM_GETSTATE, 0, 0 ) && WININET_GetAuthRealm( params->req->hdr.hInternet, - szRealm, sizeof szRealm/sizeof(WCHAR), TRUE) ) + szRealm, ARRAY_SIZE( szRealm ), TRUE) ) WININET_GetSetPassword( hdlg, params->req->session->appInfo->proxy, szRealm, TRUE ); WININET_SetAuthorization( params->req, username, password, TRUE ); @@ -293,7 +291,7 @@ static INT_PTR WINAPI WININET_PasswordDialog( { HWND hitem; struct WININET_ErrorDlgParams *params; - WCHAR szRealm[0x80], szServer[0x80]; + WCHAR szRealm[0x80]; if( uMsg == WM_INITDIALOG ) { @@ -305,7 +303,7 @@ static INT_PTR WINAPI WININET_PasswordDialog( /* extract the Realm from the response and show it */ if( WININET_GetAuthRealm( params->req->hdr.hInternet, - szRealm, sizeof szRealm/sizeof(WCHAR), FALSE ) ) + szRealm, ARRAY_SIZE( szRealm ), FALSE ) ) { hitem = GetDlgItem( hdlg, IDC_REALM ); SetWindowTextW( hitem, szRealm ); @@ -314,7 +312,7 @@ static INT_PTR WINAPI WININET_PasswordDialog( hitem = GetDlgItem( hdlg, IDC_SERVER ); SetWindowTextW( hitem, params->req->session->hostName ); - WININET_GetSetPassword( hdlg, szServer, szRealm, FALSE ); + WININET_GetSetPassword( hdlg, params->req->session->hostName, szRealm, FALSE ); return TRUE; } @@ -332,18 +330,18 @@ static INT_PTR WINAPI WININET_PasswordDialog( username[0] = 0; hitem = GetDlgItem( hdlg, IDC_USERNAME ); if( hitem ) - GetWindowTextW( hitem, username, sizeof username/sizeof(WCHAR) ); + GetWindowTextW( hitem, username, ARRAY_SIZE( username )); password[0] = 0; hitem = GetDlgItem( hdlg, IDC_PASSWORD ); if( hitem ) - GetWindowTextW( hitem, password, sizeof password/sizeof(WCHAR) ); + GetWindowTextW( hitem, password, ARRAY_SIZE( password )); hitem = GetDlgItem( hdlg, IDC_SAVEPASSWORD ); if( hitem && SendMessageW( hitem, BM_GETSTATE, 0, 0 ) && WININET_GetAuthRealm( params->req->hdr.hInternet, - szRealm, sizeof szRealm/sizeof(WCHAR), FALSE )) + szRealm, ARRAY_SIZE( szRealm ), FALSE )) { WININET_GetSetPassword( hdlg, params->req->session->hostName, szRealm, TRUE ); } diff --git a/dll/win32/wininet/ftp.c b/dll/win32/wininet/ftp.c index e12e4941605..f2a88b741ea 100644 --- a/dll/win32/wininet/ftp.c +++ b/dll/win32/wininet/ftp.c @@ -2581,8 +2581,7 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, lerror: if (!bSuccess) { - if(lpwfs) - WININET_Release( &lpwfs->hdr ); + WININET_Release(&lpwfs->hdr); return NULL; } @@ -3746,7 +3745,7 @@ static BOOL FTP_ParseNextFile(INT nSocket, LPCWSTR lpszSearchFile, LPFILEPROPERT pszToken = strtok(NULL, szSpace); if(!pszToken) continue; - if(!strcasecmp(pszToken, "<DIR>")) { + if(!_strnicmp(pszToken, "<DIR>", -1)) { lpfp->bIsDirectory = TRUE; lpfp->nSize = 0; TRACE("Is directory\n"); diff --git a/dll/win32/wininet/http.c b/dll/win32/wininet/http.c index 35ea56ba9a5..45036f2fe56 100644 --- a/dll/win32/wininet/http.c +++ b/dll/win32/wininet/http.c @@ -42,6 +42,8 @@ #include <stdio.h> #include <time.h> #include <assert.h> +#include <errno.h> +#include <limits.h> #include "windef.h" #include "winbase.h" @@ -50,7 +52,6 @@ #include "winternl.h" #define NO_SHLWAPI_STREAM #define NO_SHLWAPI_REG -#define NO_SHLWAPI_STRFCNS #define NO_SHLWAPI_GDI #include "shlwapi.h" #include "sspi.h" @@ -137,7 +138,6 @@ static const WCHAR emptyW[] = {0}; #define HTTP_ADDHDR_FLAG_ADD 0x20000000 #define HTTP_ADDHDR_FLAG_ADD_IF_NEW 0x10000000 -#define HTTP_ADDHDR_FLAG_COALESCE 0x40000000 #define HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA 0x40000000 #define HTTP_ADDHDR_FLAG_COALESCE_WITH_SEMICOLON 0x01000000 #define HTTP_ADDHDR_FLAG_REPLACE 0x80000000 @@ -145,9 +145,6 @@ static const WCHAR emptyW[] = {0}; #define COLLECT_TIME 60000 -#undef ARRAYSIZE -#define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) - struct HttpAuthInfo { LPWSTR scheme; @@ -830,12 +827,12 @@ static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue, LPWSTR *pszRealm ) static const WCHAR szBasic[] = {'B','a','s','i','c'}; /* Note: not nul-terminated */ static const WCHAR szRealm[] = {'r','e','a','l','m'}; /* Note: not nul-terminated */ BOOL is_basic; - is_basic = !strncmpiW(pszAuthValue, szBasic, ARRAYSIZE(szBasic)) && - ((pszAuthValue[ARRAYSIZE(szBasic)] == ' ') || !pszAuthValue[ARRAYSIZE(szBasic)]); + is_basic = !strncmpiW(pszAuthValue, szBasic, ARRAY_SIZE(szBasic)) && + ((pszAuthValue[ARRAY_SIZE(szBasic)] == ' ') || !pszAuthValue[ARRAY_SIZE(szBasic)]); if (is_basic && pszRealm) { LPCWSTR token; - LPCWSTR ptr = &pszAuthValue[ARRAYSIZE(szBasic)]; + LPCWSTR ptr = &pszAuthValue[ARRAY_SIZE(szBasic)]; LPCWSTR realm; ptr++; *pszRealm=NULL; @@ -845,8 +842,8 @@ static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue, LPWSTR *pszRealm ) realm = ptr; while (*realm == ' ') realm++; - if(!strncmpiW(realm, szRealm, ARRAYSIZE(szRealm)) && - (realm[ARRAYSIZE(szRealm)] == ' ' || realm[ARRAYSIZE(szRealm)] == '=')) + if(!strncmpiW(realm, szRealm, ARRAY_SIZE(szRealm)) && + (realm[ARRAY_SIZE(szRealm)] == ' ' || realm[ARRAY_SIZE(szRealm)] == '=')) { token++; while (*token == ' ') @@ -875,7 +872,7 @@ static void destroy_authinfo( struct HttpAuthInfo *authinfo ) heap_free(authinfo); } -static UINT retrieve_cached_basic_authorization(const WCHAR *host, const WCHAR *realm, char **auth_data) +static UINT retrieve_cached_basic_authorization(http_request_t *req, const WCHAR *host, const WCHAR *realm, char **auth_data) { basicAuthorizationData *ad; UINT rc = 0; @@ -887,10 +884,24 @@ static UINT retrieve_cached_basic_authorization(const WCHAR *host, const WCHAR * { if (!strcmpiW(host, ad->host) && (!realm || !strcmpW(realm, ad->realm))) { + char *colon; + DWORD length; + TRACE("Authorization found in cache\n"); *auth_data = heap_alloc(ad->authorizationLen); memcpy(*auth_data,ad->authorization,ad->authorizationLen); rc = ad->authorizationLen; + + /* update session username and password to reflect current credentials */ + colon = strchr(ad->authorization, ':'); + length = colon - ad->authorization; + + heap_free(req->session->userName); + heap_free(req->session->password); + + req->session->userName = heap_strndupAtoW(ad->authorization, length, &length); + length++; + req->session->password = heap_strndupAtoW(&ad->authorization[length], ad->authorizationLen - length, &length); break; } } @@ -1027,6 +1038,37 @@ static void cache_authorization(LPWSTR host, LPWSTR scheme, LeaveCriticalSection(&authcache_cs); } +void free_authorization_cache(void) +{ + authorizationData *ad, *sa_safe; + basicAuthorizationData *basic, *basic_safe; + + EnterCriticalSection(&authcache_cs); + + LIST_FOR_EACH_ENTRY_SAFE(basic, basic_safe, &basicAuthorizationCache, basicAuthorizationData, entry) + { + heap_free(basic->host); + heap_free(basic->realm); + heap_free(basic->authorization); + + list_remove(&basic->entry); + heap_free(basic); + } + + LIST_FOR_EACH_ENTRY_SAFE(ad, sa_safe, &authorizationCache, authorizationData, entry) + { + heap_free(ad->host); + heap_free(ad->scheme); + heap_free(ad->user); + heap_free(ad->password); + heap_free(ad->domain); + list_remove(&ad->entry); + heap_free(ad); + } + + LeaveCriticalSection(&authcache_cs); +} + static BOOL HTTP_DoAuthorization( http_request_t *request, LPCWSTR pszAuthValue, struct HttpAuthInfo **ppAuthInfo, LPWSTR domain_and_username, LPWSTR password, @@ -1166,7 +1208,7 @@ static BOOL HTTP_DoAuthorization( http_request_t *request, LPCWSTR pszAuthValue, if (!domain_and_username) { if (host && szRealm) - auth_data_len = retrieve_cached_basic_authorization(host, szRealm,&auth_data); + auth_data_len = retrieve_cached_basic_authorization(request, host, szRealm,&auth_data); if (auth_data_len == 0) { heap_free(szRealm); @@ -1357,7 +1399,7 @@ BOOL WINAPI HttpAddRequestHeadersW(HINTERNET hHttpRequest, http_request_t *request; DWORD res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; - TRACE("%p, %s, %i, %i\n", hHttpRequest, debugstr_wn(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier); + TRACE("%p, %s, %u, %08x\n", hHttpRequest, debugstr_wn(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier); if (!lpszHeader) return TRUE; @@ -1389,7 +1431,7 @@ BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest, WCHAR *headers = NULL; BOOL r; - TRACE("%p, %s, %i, %i\n", hHttpRequest, debugstr_an(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier); + TRACE("%p, %s, %u, %08x\n", hHttpRequest, debugstr_an(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier); if(lpszHeader) headers = heap_strndupAtoW(lpszHeader, dwHeaderLength, &dwHeaderLength); @@ -1586,9 +1628,9 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin ) { signed char in[4]; - if (base64[0] >= ARRAYSIZE(HTTP_Base64Dec) || + if (base64[0] >= ARRAY_SIZE(HTTP_Base64Dec) || ((in[0] = HTTP_Base64Dec[base64[0]]) == -1) || - base64[1] >= ARRAYSIZE(HTTP_Base64Dec) || + base64[1] >= ARRAY_SIZE(HTTP_Base64Dec) || ((in[1] = HTTP_Base64Dec[base64[1]]) == -1)) { WARN("invalid base64: %s\n", debugstr_w(base64)); @@ -1600,7 +1642,7 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin ) if ((base64[2] == '=') && (base64[3] == '=')) break; - if (base64[2] > ARRAYSIZE(HTTP_Base64Dec) || + if (base64[2] > ARRAY_SIZE(HTTP_Base64Dec) || ((in[2] = HTTP_Base64Dec[base64[2]]) == -1)) { WARN("invalid base64: %s\n", debugstr_w(&base64[2])); @@ -1612,7 +1654,7 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin ) if (base64[3] == '=') break; - if (base64[3] > ARRAYSIZE(HTTP_Base64Dec) || + if (base64[3] > ARRAY_SIZE(HTTP_Base64Dec) || ((in[3] = HTTP_Base64Dec[base64[3]]) == -1)) { WARN("invalid base64: %s\n", debugstr_w(&base64[3])); @@ -1677,12 +1719,19 @@ static BOOL HTTP_InsertAuthorization( http_request_t *request, struct HttpAuthIn HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD); heap_free(authorization); } - else if (!strcmpW(header, szAuthorization) && (host = get_host_header(request))) + else { UINT data_len; char *data; - if ((data_len = retrieve_cached_basic_authorization(host, NULL, &data))) + /* Don't use cached credentials when a username or Authorization was specified */ + if ((request->session->userName && request->session->userName[0]) || strcmpW(header, szAuthorization)) + return TRUE; + + if (!(host = get_host_header(request))) + return TRUE; + + if ((data_len = retrieve_cached_basic_authorization(request, host, NULL, &data))) { TRACE("Found cached basic authorization for %s\n", debugstr_w(host)); @@ -1734,7 +1783,7 @@ static BOOL HTTP_DomainMatches(LPCWSTR server, substr_t domain) const WCHAR *dot, *ptr; int len; - if(domain.len == sizeof(localW)/sizeof(WCHAR)-1 && !strncmpiW(domain.str, localW, domain.len) && !strchrW(server, '.' )) + if(domain.len == ARRAY_SIZE(localW)-1 && !strncmpiW(domain.str, localW, domain.len) && !strchrW(server, '.' )) return TRUE; if(domain.len && *domain.str != '*') @@ -2294,6 +2343,15 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe *(DWORD*)buffer = flags; return ERROR_SUCCESS; } + case INTERNET_OPTION_ERROR_MASK: + TRACE("INTERNET_OPTION_ERROR_MASK\n"); + + if (*size < sizeof(ULONG)) + return ERROR_INSUFFICIENT_BUFFER; + + *(ULONG*)buffer = hdr->ErrorMask; + *size = sizeof(ULONG); + return ERROR_SUCCESS; } return INET_QueryOption(hdr, option, buffer, size, unicode); @@ -2431,8 +2489,8 @@ static void create_cache_entry(http_request_t *req) if(!end) end = ptr + strlenW(ptr); - if(!strncmpiW(ptr, no_cacheW, sizeof(no_cacheW)/sizeof(*no_cacheW)-1) - || !strncmpiW(ptr, no_storeW, sizeof(no_storeW)/sizeof(*no_storeW)-1)) { + if(!strncmpiW(ptr, no_cacheW, ARRAY_SIZE(no_cacheW)-1) + || !strncmpiW(ptr, no_storeW, ARRAY_SIZE(no_storeW)-1)) { b = FALSE; break; } @@ -2459,7 +2517,7 @@ static void create_cache_entry(http_request_t *req) return; } - b = CreateUrlCacheEntryW(url, req->contentLength == ~0u ? 0 : req->contentLength, NULL, file_name, 0); + b = CreateUrlCacheEntryW(url, req->contentLength == ~0 ? 0 : req->contentLength, NULL, file_name, 0); if(!b) { WARN("Could not create cache entry: %08x\n", GetLastError()); return; @@ -2663,7 +2721,7 @@ static DWORD netconn_drain_content(data_stream_t *stream, http_request_t *req, B int len, res; size_t size; - if(netconn_stream->content_length == ~0u) + if(netconn_stream->content_length == ~0) return WSAEISCONN; while(netconn_stream->content_read < netconn_stream->content_length) { @@ -2769,7 +2827,7 @@ static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf, TRACE("reading %u byte chunk\n", chunked_stream->chunk_size); chunked_stream->buf_size++; chunked_stream->buf_pos--; - if(req->contentLength == ~0u) req->contentLength = chunked_stream->chunk_size; + if(req->contentLength == ~0) req->contentLength = chunked_stream->chunk_size; else req->contentLength += chunked_stream->chunk_size; chunked_stream->state = CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_SIZE; } @@ -2891,6 +2949,7 @@ static DWORD set_content_length(http_request_t *request) { static const WCHAR szChunked[] = {'c','h','u','n','k','e','d',0}; static const WCHAR headW[] = {'H','E','A','D',0}; + WCHAR contentLength[32]; WCHAR encoding[20]; DWORD size; @@ -2899,10 +2958,13 @@ static DWORD set_content_length(http_request_t *request) return ERROR_SUCCESS; } - size = sizeof(request->contentLength); - if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_CONTENT_LENGTH, - &request->contentLength, &size, NULL) != ERROR_SUCCESS) - request->contentLength = ~0u; + size = sizeof(contentLength); + if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_CONTENT_LENGTH, + contentLength, &size, NULL) != ERROR_SUCCESS || + !StrToInt64ExW(contentLength, STIF_DEFAULT, (LONGLONG*)&request->contentLength)) { + request->contentLength = ~0; + } + request->netconn_stream.content_length = request->contentLength; request->netconn_stream.content_read = request->read_size; @@ -2928,7 +2990,7 @@ static DWORD set_content_length(http_request_t *request) } request->data_stream = &chunked_stream->data_stream; - request->contentLength = ~0u; + request->contentLength = ~0; } if(request->hdr.decoding) { @@ -3318,7 +3380,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, request->hdr.dwFlags = dwFlags; request->hdr.dwContext = dwContext; request->hdr.decoding = session->hdr.decoding; - request->contentLength = ~0u; + request->contentLength = ~0; request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl; request->data_stream = &request->netconn_stream.data_stream; @@ -3536,8 +3598,6 @@ static const LPCWSTR header_lookup[] = { szUnless_Modified_Since, /* HTTP_QUERY_UNLESS_MODIFIED_SINCE = 70 */ }; -#define LAST_TABLE_HEADER (sizeof(header_lookup)/sizeof(header_lookup[0])) - /*********************************************************************** * HTTP_HttpQueryInfoW (internal) */ @@ -3723,9 +3783,9 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *request, DWORD dwInfoLevel, return res; } default: - assert (LAST_TABLE_HEADER == (HTTP_QUERY_UNLESS_MODIFIED_SINCE + 1)); + assert (ARRAY_SIZE(header_lookup) == (HTTP_QUERY_UNLESS_MODIFIED_SINCE + 1)); - if (level < LAST_TABLE_HEADER && header_lookup[level]) + if (level < ARRAY_SIZE(header_lookup) && header_lookup[level]) index = HTTP_GetCustomHeaderIndex(request, header_lookup[level], requested_index,request_only); } @@ -3745,9 +3805,25 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *request, DWORD dwInfoLevel, /* coalesce value to requested type */ if (dwInfoLevel & HTTP_QUERY_FLAG_NUMBER && lpBuffer) { - *(int *)lpBuffer = atoiW(lphttpHdr->lpszValue); - TRACE(" returning number: %d\n", *(int *)lpBuffer); - } + unsigned long value; + + if (*lpdwBufferLength != sizeof(DWORD)) + { + LeaveCriticalSection( &request->headers_section ); + return ERROR_HTTP_INVALID_HEADER; + } + + errno = 0; + value = strtoulW( lphttpHdr->lpszValue, NULL, 10 ); + if (value > UINT_MAX || (value == ULONG_MAX && errno == ERANGE)) + { + LeaveCriticalSection( &request->headers_section ); + return ERROR_HTTP_INVALID_HEADER; + } + + *(DWORD *)lpBuffer = value; + TRACE(" returning number: %u\n", *(DWORD *)lpBuffer); + } else if (dwInfoLevel & HTTP_QUERY_FLAG_SYSTEMTIME && lpBuffer) { time_t tmpTime; @@ -3896,18 +3972,18 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, TRACE("(%p, 0x%08x)--> %d\n", hHttpRequest, dwInfoLevel, info); TRACE(" Attribute:"); - for (i = 0; i < (sizeof(query_flags) / sizeof(query_flags[0])); i++) { + for (i = 0; i < ARRAY_SIZE(query_flags); i++) { if (query_flags[i].val == info) { TRACE(" %s", query_flags[i].name); break; } } - if (i == (sizeof(query_flags) / sizeof(query_flags[0]))) { + if (i == ARRAY_SIZE(query_flags)) { TRACE(" Unknown (%08x)", info); } TRACE(" Modifier:"); - for (i = 0; i < (sizeof(modifier_flags) / sizeof(modifier_flags[0])); i++) { + for (i = 0; i < ARRAY_SIZE(modifier_flags); i++) { if (modifier_flags[i].val & info_mod) { TRACE(" %s", modifier_flags[i].name); info_mod &= ~ modifier_flags[i].val; @@ -3937,8 +4013,8 @@ lend: WININET_Release( &request->hdr ); TRACE("%u <--\n", res); - if(res != ERROR_SUCCESS) - SetLastError(res); + + SetLastError(res); return res == ERROR_SUCCESS; } @@ -4233,7 +4309,7 @@ static WORD HTTP_ParseWkday(LPCWSTR day) { 'f','r','i',0 }, { 's','a','t',0 }}; unsigned int i; - for (i = 0; i < sizeof(days)/sizeof(*days); i++) + for (i = 0; i < ARRAY_SIZE(days); i++) if (!strcmpiW(day, days[i])) return i; @@ -4323,8 +4399,7 @@ static BOOL HTTP_ParseTime(SYSTEMTIME *st, LPCWSTR *str) ERR("unexpected second in time format %s\n", debugstr_w(ptr)); return FALSE; } - ptr = nextPtr + 1; - *str = ptr; + *str = nextPtr; st->wSecond = (WORD)num; return TRUE; } @@ -4338,7 +4413,7 @@ static BOOL HTTP_ParseDateAsAsctime(LPCWSTR value, FILETIME *ft) unsigned long num; for (ptr = value, dayPtr = day; *ptr && !isspaceW(*ptr) && - dayPtr - day < sizeof(day) / sizeof(day[0]) - 1; ptr++, dayPtr++) + dayPtr - day < ARRAY_SIZE(day) - 1; ptr++, dayPtr++) *dayPtr = *ptr; *dayPtr = 0; st.wDayOfWeek = HTTP_ParseWkday(day); @@ -4351,8 +4426,7 @@ static BOOL HTTP_ParseDateAsAsctime(LPCWSTR value, FILETIME *ft) while (isspaceW(*ptr)) ptr++; - for (monthPtr = month; !isspaceW(*ptr) && - monthPtr - month < sizeof(month) / sizeof(month[0]) - 1; + for (monthPtr = month; !isspaceW(*ptr) && monthPtr - month < ARRAY_SIZE(month) - 1; monthPtr++, ptr++) *monthPtr = *ptr; *monthPtr = 0; @@ -4448,8 +4522,7 @@ static BOOL HTTP_ParseRfc1123Date(LPCWSTR value, FILETIME *ft) while (isspaceW(*ptr)) ptr++; - for (monthPtr = month; !isspaceW(*ptr) && - monthPtr - month < sizeof(month) / sizeof(month[0]) - 1; + for (monthPtr = month; !isspaceW(*ptr) && monthPtr - month < ARRAY_SIZE(month) - 1; monthPtr++, ptr++) *monthPtr = *ptr; *monthPtr = 0; @@ -4496,7 +4569,7 @@ static WORD HTTP_ParseWeekday(LPCWSTR day) { 'f','r','i','d','a','y',0 }, { 's','a','t','u','r','d','a','y',0 }}; unsigned int i; - for (i = 0; i < sizeof(days)/sizeof(*days); i++) + for (i = 0; i < ARRAY_SIZE(days); i++) if (!strcmpiW(day, days[i])) return i; @@ -4526,7 +4599,7 @@ static BOOL HTTP_ParseRfc850Date(LPCWSTR value, FILETIME *ft) return FALSE; } } - else if (ptr - value < sizeof(day) / sizeof(day[0])) + else if (ptr - value < ARRAY_SIZE(day)) { memcpy(day, value, (ptr - value) * sizeof(WCHAR)); day[ptr - value + 1] = 0; @@ -4563,8 +4636,7 @@ static BOOL HTTP_ParseRfc850Date(LPCWSTR value, FILETIME *ft) } ptr++; - for (monthPtr = month; *ptr != '-' && - monthPtr - month < sizeof(month) / sizeof(month[0]) - 1; + for (monthPtr = month; *ptr != '-' && monthPtr - month < ARRAY_SIZE(month) - 1; monthPtr++, ptr++) *monthPtr = *ptr; *monthPtr = 0; @@ -4762,7 +4834,6 @@ static void http_process_keep_alive(http_request_t *req) static DWORD open_http_connection(http_request_t *request, BOOL *reusing) { - const BOOL is_https = (request->hdr.dwFlags & INTERNET_FLAG_SECURE) != 0; netconn_t *netconn = NULL; DWORD res; @@ -4817,7 +4888,7 @@ static DWORD open_http_connection(http_request_t *request, BOOL *reusing) request->server->addr_str, strlen(request->server->addr_str)+1); - res = create_netconn(is_https, request->proxy ? request->proxy : request->server, request->security_flags, + res = create_netconn(request->proxy ? request->proxy : request->server, request->security_flags, (request->hdr.ErrorMask & INTERNET_ERROR_MASK_COMBINED_SEC_CERT) != 0, request->connect_timeout, &netconn); if(res != ERROR_SUCCESS) { @@ -4853,7 +4924,7 @@ static void set_content_length_header( http_request_t *request, DWORD len, DWORD { static const WCHAR fmtW[] = {'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':',' ','%','u','\r','\n',0}; - WCHAR buf[sizeof(fmtW)/sizeof(fmtW[0]) + 10]; + WCHAR buf[ARRAY_SIZE(fmtW) + 10]; sprintfW( buf, fmtW, len ); HTTP_HttpAddRequestHeadersW( request, buf, ~0u, flags ); @@ -4874,7 +4945,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, DWORD dwContentLength, BOOL bEndRequest) { BOOL redirected = FALSE, secure_proxy_connect = FALSE, loop_next; - LPWSTR requestString = NULL; + WCHAR *request_header = NULL; INT responseLen, cnt; DWORD res; @@ -4932,7 +5003,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, loop_next = FALSE; if(redirected) { - request->contentLength = ~0u; + request->contentLength = ~0; request->bytesToWrite = 0; } @@ -4984,12 +5055,12 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, if (HTTP_GetCustomHeaderIndex(request, szContent_Length, 0, TRUE) >= 0) set_content_length_header(request, 0, HTTP_ADDREQ_FLAG_REPLACE); - requestString = build_request_header(request, connectW, target, g_szHttp1_1, TRUE); + request_header = build_request_header(request, connectW, target, g_szHttp1_1, TRUE); } else if (request->proxy && !(request->hdr.dwFlags & INTERNET_FLAG_SECURE)) { WCHAR *url = build_proxy_path_url(request); - requestString = build_request_header(request, request->verb, url, request->version, TRUE); + request_header = build_request_header(request, request->verb, url, request->version, TRUE); heap_free(url); } else @@ -4997,16 +5068,17 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, if (request->proxy && HTTP_GetCustomHeaderIndex(request, szContent_Length, 0, TRUE) >= 0) set_content_length_header(request, dwContentLength, HTTP_ADDREQ_FLAG_REPLACE); - requestString = build_request_header(request, request->verb, request->path, request->version, TRUE); + request_header = build_request_header(request, request->verb, request->path, request->version, TRUE); } - TRACE("Request header -> %s\n", debugstr_w(requestString) ); + TRACE("Request header -> %s\n", debugstr_w(request_header) ); /* send the request as ASCII, tack on the optional data */ if (!lpOptional || redirected || secure_proxy_connect) data_len = 0; - ascii_req = build_ascii_request( requestString, lpOptional, data_len, &len ); + ascii_req = build_ascii_request(request_header, lpOptional, data_len, &len); + heap_free(request_header); TRACE("full request -> %s\n", debugstr_a(ascii_req) ); INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, @@ -5089,10 +5161,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, http_release_netconn(request, drain_content(request, FALSE) == ERROR_SUCCESS); res = HTTP_HandleRedirect(request, new_url); heap_free(new_url); - if (res == ERROR_SUCCESS) { - heap_free(requestString); + if (res == ERROR_SUCCESS) loop_next = TRUE; - } redirected = TRUE; } } @@ -5111,7 +5181,6 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, request->session->userName, request->session->password, host)) { - heap_free(requestString); if (drain_content(request, TRUE) != ERROR_SUCCESS) { FIXME("Could not drain content\n"); @@ -5140,7 +5209,6 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, request->session->appInfo->proxyPassword, NULL)) { - heap_free(requestString); if (drain_content(request, TRUE) != ERROR_SUCCESS) { FIXME("Could not drain content\n"); @@ -5183,8 +5251,6 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, while (loop_next); lend: - heap_free(requestString); - /* TODO: send notification for P3P header */ if(res == ERROR_SUCCESS) @@ -5838,8 +5904,7 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, session->hostName = heap_strdupW(lpszServerName); if (lpszUserName && lpszUserName[0]) session->userName = heap_strdupW(lpszUserName); - if (lpszPassword && lpszPassword[0]) - session->password = heap_strdupW(lpszPassword); + session->password = heap_strdupW(lpszPassword); session->hostPort = serverPort; session->connect_timeout = hIC->connect_timeout; session->send_timeout = 0; @@ -6083,7 +6148,7 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer) * */ -#define COALESCEFLAGS (HTTP_ADDHDR_FLAG_COALESCE|HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA|HTTP_ADDHDR_FLAG_COALESCE_WITH_SEMICOLON) +#define COALESCEFLAGS (HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA|HTTP_ADDHDR_FLAG_COALESCE_WITH_SEMICOLON) static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR value, DWORD dwModifier) { diff --git a/dll/win32/wininet/internet.c b/dll/win32/wininet/internet.c index 3df84d1d73f..fe45030c8c5 100644 --- a/dll/win32/wininet/internet.c +++ b/dll/win32/wininet/internet.c @@ -34,7 +34,6 @@ #include <CoreServices/CoreServices.h> #undef GetCurrentThread #undef LoadResource -#undef DPRINTF #endif #include "winsock2.h" @@ -777,7 +776,7 @@ static void dump_INTERNET_FLAGS(DWORD dwFlags) #undef FE unsigned int i; - for (i = 0; i < (sizeof(flag) / sizeof(flag[0])); i++) { + for (i = 0; i < ARRAY_SIZE(flag); i++) { if (flag[i].val & dwFlags) { TRACE(" %s", flag[i].name); dwFlags &= ~flag[i].val; @@ -1021,7 +1020,7 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, TRACE("(%s, %i, %s, %s, %i)\n", debugstr_w(lpszAgent), dwAccessType, debugstr_w(lpszProxy), debugstr_w(lpszProxyBypass), dwFlags); - for (i = 0; i < (sizeof(access_type) / sizeof(access_type[0])); i++) { + for (i = 0; i < ARRAY_SIZE(access_type); i++) { if (access_type[i].val == dwAccessType) { access_type_str = access_type[i].name; break; @@ -1626,7 +1625,7 @@ static INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, DWORD nMaxCmp) if(lpszScheme==NULL) return INTERNET_SCHEME_UNKNOWN; - for (i = 0; i < sizeof(url_schemes)/sizeof(url_schemes[0]); i++) + for (i = 0; i < ARRAY_SIZE(url_schemes); i++) if (!strncmpiW(lpszScheme, url_schemes[i], nMaxCmp)) return INTERNET_SCHEME_FIRST + i; @@ -2197,8 +2196,7 @@ BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, TRACE("-- %s (%u) (bytes read: %d)\n", res == ERROR_SUCCESS ? "TRUE": "FALSE", res, pdwNumOfBytesRead ? *pdwNumOfBytesRead : -1); - if(res != ERROR_SUCCESS) - SetLastError(res); + SetLastError(res); return res == ERROR_SUCCESS; } @@ -2836,6 +2834,7 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, case INTERNET_OPTION_END_BROWSER_SESSION: FIXME("Option INTERNET_OPTION_END_BROWSER_SESSION: semi-stub\n"); free_cookie(); + free_authorization_cache(); break; case INTERNET_OPTION_CONNECTED_STATE: FIXME("Option INTERNET_OPTION_CONNECTED_STATE: STUB\n"); @@ -2880,7 +2879,6 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, FIXME("Option INTERNET_OPTION_DISABLE_AUTODIAL; STUB\n"); break; case INTERNET_OPTION_HTTP_DECODING: - { if (!lpwhh) { SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); @@ -2894,7 +2892,6 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, else lpwhh->decoding = *(BOOL *)lpBuffer; break; - } case INTERNET_OPTION_COOKIES_3RD_PARTY: FIXME("INTERNET_OPTION_COOKIES_3RD_PARTY; STUB\n"); SetLastError(ERROR_INTERNET_INVALID_OPTION); @@ -4091,7 +4088,7 @@ static LPCWSTR INTERNET_GetSchemeString(INTERNET_SCHEME scheme) if (scheme < INTERNET_SCHEME_FIRST) return NULL; index = scheme - INTERNET_SCHEME_FIRST; - if (index >= sizeof(url_schemes)/sizeof(url_schemes[0])) + if (index >= ARRAY_SIZE(url_schemes)) return NULL; return (LPCWSTR)url_schemes[index]; } @@ -4368,7 +4365,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags, if (!scheme_is_opaque(nScheme) || lpUrlComponents->lpszHostName) { memcpy(lpszUrl, slashSlashW, sizeof(slashSlashW)); - lpszUrl += sizeof(slashSlashW)/sizeof(slashSlashW[0]); + lpszUrl += ARRAY_SIZE(slashSlashW); } if (lpUrlComponents->lpszUserName) diff --git a/dll/win32/wininet/internet.h b/dll/win32/wininet/internet.h index e80f6036f02..8954d071f9b 100644 --- a/dll/win32/wininet/internet.h +++ b/dll/win32/wininet/internet.h @@ -335,8 +335,8 @@ typedef struct { typedef struct { data_stream_t data_stream; - DWORD content_length; - DWORD content_read; + ULONGLONG content_length; + ULONGLONG content_read; } netconn_stream_t; #define READ_BUFFER_SIZE 8192 @@ -372,7 +372,7 @@ typedef struct struct HttpAuthInfo *proxyAuthInfo; CRITICAL_SECTION read_section; /* section to protect the following fields */ - DWORD contentLength; /* total number of bytes to be read */ + ULONGLONG contentLength; /* total number of bytes to be read */ BOOL read_gzip; /* are we reading in gzip mode? */ DWORD read_pos; /* current read position in read_buf */ DWORD read_size; /* valid data size in read_buf */ @@ -428,7 +428,7 @@ VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwStatusInfoLength) DECLSPEC_HIDDEN; WCHAR *INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto) DECLSPEC_HIDDEN; -DWORD create_netconn(BOOL,server_t*,DWORD,BOOL,DWORD,netconn_t**) DECLSPEC_HIDDEN; +DWORD create_netconn(server_t*,DWORD,BOOL,DWORD,netconn_t**) DECLSPEC_HIDDEN; void free_netconn(netconn_t*) DECLSPEC_HIDDEN; void NETCON_unload(void) DECLSPEC_HIDDEN; DWORD NETCON_secure_connect(netconn_t*,server_t*) DECLSPEC_HIDDEN; @@ -456,6 +456,7 @@ static inline req_file_t *req_file_addref(req_file_t *req_file) BOOL init_urlcache(void) DECLSPEC_HIDDEN; void free_urlcache(void) DECLSPEC_HIDDEN; void free_cookie(void) DECLSPEC_HIDDEN; +void free_authorization_cache(void) DECLSPEC_HIDDEN; void init_winsock(void) DECLSPEC_HIDDEN; diff --git a/dll/win32/wininet/netconnection.c b/dll/win32/wininet/netconnection.c index b91c6be8dc6..d177d98a2a4 100644 --- a/dll/win32/wininet/netconnection.c +++ b/dll/win32/wininet/netconnection.c @@ -340,7 +340,7 @@ static DWORD create_netconn_socket(server_t *server, netconn_t *netconn, DWORD t return ERROR_SUCCESS; } -DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, BOOL mask_errors, DWORD timeout, netconn_t **ret) +DWORD create_netconn(server_t *server, DWORD security_flags, BOOL mask_errors, DWORD timeout, netconn_t **ret) { netconn_t *netconn; int result; @@ -392,9 +392,9 @@ void free_netconn(netconn_t *netconn) heap_free(netconn->extra_buf); netconn->extra_buf = NULL; netconn->extra_len = 0; - if (SecIsValidHandle(&netconn->ssl_ctx)) - DeleteSecurityContext(&netconn->ssl_ctx); } + if (SecIsValidHandle(&netconn->ssl_ctx)) + DeleteSecurityContext(&netconn->ssl_ctx); close_netconn(netconn); heap_free(netconn); @@ -639,7 +639,7 @@ static BOOL send_ssl_chunk(netconn_t *conn, const void *msg, size_t size) {conn->ssl_sizes.cbTrailer, SECBUFFER_STREAM_TRAILER, conn->ssl_buf+conn->ssl_sizes.cbHeader+size}, {0, SECBUFFER_EMPTY, NULL} }; - SecBufferDesc buf_desc = {SECBUFFER_VERSION, sizeof(bufs)/sizeof(*bufs), bufs}; + SecBufferDesc buf_desc = {SECBUFFER_VERSION, ARRAY_SIZE(bufs), bufs}; SECURITY_STATUS res; memcpy(bufs[1].pvBuffer, msg, size); @@ -698,7 +698,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, BOOL blo { const SIZE_T ssl_buf_size = conn->ssl_sizes.cbHeader+conn->ssl_sizes.cbMaximumMessage+conn->ssl_sizes.cbTrailer; SecBuffer bufs[4]; - SecBufferDesc buf_desc = {SECBUFFER_VERSION, sizeof(bufs)/sizeof(*bufs), bufs}; + SecBufferDesc buf_desc = {SECBUFFER_VERSION, ARRAY_SIZE(bufs), bufs}; SSIZE_T size, buf_len = 0; int i; SECURITY_STATUS res; @@ -781,7 +781,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, BOOL blo } } while(res != SEC_E_OK); - for(i=0; i < sizeof(bufs)/sizeof(*bufs); i++) { + for(i = 0; i < ARRAY_SIZE(bufs); i++) { if(bufs[i].BufferType == SECBUFFER_DATA) { size = min(buf_size, bufs[i].cbBuffer); memcpy(buf, bufs[i].pvBuffer, size); @@ -798,7 +798,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, BOOL blo } } - for(i=0; i < sizeof(bufs)/sizeof(*bufs); i++) { + for(i = 0; i < ARRAY_SIZE(bufs); i++) { if(bufs[i].BufferType == SECBUFFER_EXTRA) { conn->extra_buf = heap_alloc(bufs[i].cbBuffer); if(!conn->extra_buf) diff --git a/dll/win32/wininet/urlcache.c b/dll/win32/wininet/urlcache.c index 30a469a93a1..40e2afa49b8 100644 --- a/dll/win32/wininet/urlcache.c +++ b/dll/win32/wininet/urlcache.c @@ -23,6 +23,7 @@ */ #define NONAMELESSUNION +#define NONAMELESSSTRUCT #include "ws2tcpip.h" @@ -777,7 +778,7 @@ static void cache_containers_init(void) return; } - for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++) + for (i = 0; i < ARRAY_SIZE(DefaultContainerData); i++) { WCHAR wszCachePath[MAX_PATH]; WCHAR wszMutexName[MAX_PATH]; @@ -1505,12 +1506,12 @@ static DWORD urlcache_hash_key(LPCSTR lpszKey) BYTE key[4]; DWORD i; - for (i = 0; i < sizeof(key) / sizeof(key[0]); i++) + for (i = 0; i < ARRAY_SIZE(key); i++) key[i] = lookupTable[(*lpszKey + i) & 0xFF]; for (lpszKey++; *lpszKey; lpszKey++) { - for (i = 0; i < sizeof(key) / sizeof(key[0]); i++) + for (i = 0; i < ARRAY_SIZE(key); i++) key[i] = lookupTable[*lpszKey ^ key[i]]; } @@ -2468,7 +2469,7 @@ BOOL WINAPI FreeUrlCacheSpaceW(LPCWSTR cache_path, DWORD size, DWORD filter) hash_table_entry = 0; rate_no = 0; GetSystemTimeAsFileTime(&cur_time); - while(rate_no<sizeof(rate)/sizeof(*rate) && + while(rate_no < ARRAY_SIZE(rate) && urlcache_next_entry(header, &hash_table_off, &hash_table_entry, &hash_entry, &entry)) { if(entry->signature != URL_SIGNATURE) { WARN("only url entries are currently supported\n"); @@ -3788,24 +3789,111 @@ BOOL WINAPI SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName, DWORD dwFlags, return FALSE; } +static cache_container *find_container(DWORD flags) +{ + cache_container *container; + + LIST_FOR_EACH_ENTRY(container, &UrlContainers, cache_container, entry) + { + switch (flags & (CACHE_CONFIG_CONTENT_PATHS_FC | CACHE_CONFIG_COOKIES_PATHS_FC | CACHE_CONFIG_HISTORY_PATHS_FC)) + { + case 0: + case CACHE_CONFIG_CONTENT_PATHS_FC: + if (container->default_entry_type == NORMAL_CACHE_ENTRY) + return container; + break; + + case CACHE_CONFIG_COOKIES_PATHS_FC: + if (container->default_entry_type == COOKIE_CACHE_ENTRY) + return container; + break; + + case CACHE_CONFIG_HISTORY_PATHS_FC: + if (container->default_entry_type == URLHISTORY_CACHE_ENTRY) + return container; + break; + + default: + FIXME("flags %08x not handled\n", flags); + break; + } + } + + return NULL; +} + /*********************************************************************** * GetUrlCacheConfigInfoW (WININET.@) */ -BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW CacheInfo, LPDWORD size, DWORD bitmask) +BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW info, LPDWORD size, DWORD flags) { - FIXME("(%p, %p, %x)\n", CacheInfo, size, bitmask); - INTERNET_SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; + cache_container *container; + DWORD error; + + FIXME("(%p, %p, %x): semi-stub\n", info, size, flags); + + if (!info || !(container = find_container(flags))) + { + INTERNET_SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + error = cache_container_open_index(container, MIN_BLOCK_NO); + if (error != ERROR_SUCCESS) + { + INTERNET_SetLastError(error); + return FALSE; + } + + info->dwContainer = 0; + info->dwQuota = FILE_SIZE(MAX_BLOCK_NO) / 1024; + info->dwReserved4 = 0; + info->fPerUser = TRUE; + info->dwSyncMode = 0; + info->dwNumCachePaths = 1; + info->dwNormalUsage = 0; + info->dwExemptUsage = 0; + info->u.s.dwCacheSize = container->file_size / 1024; + lstrcpynW(info->u.s.CachePath, container->path, MAX_PATH); + + cache_container_close_index(container); + + TRACE("CachePath %s\n", debugstr_w(info->u.s.CachePath)); + + return TRUE; } /*********************************************************************** * GetUrlCacheConfigInfoA (WININET.@) */ -BOOL WINAPI GetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA CacheInfo, LPDWORD size, DWORD bitmask) +BOOL WINAPI GetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA info, LPDWORD size, DWORD flags) { - FIXME("(%p, %p, %x)\n", CacheInfo, size, bitmask); - INTERNET_SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; + INTERNET_CACHE_CONFIG_INFOW infoW; + + TRACE("(%p, %p, %x)\n", info, size, flags); + + if (!info) + { + INTERNET_SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + infoW.dwStructSize = sizeof(infoW); + if (!GetUrlCacheConfigInfoW(&infoW, size, flags)) + return FALSE; + + info->dwContainer = infoW.dwContainer; + info->dwQuota = infoW.dwQuota; + info->dwReserved4 = infoW.dwReserved4; + info->fPerUser = infoW.fPerUser; + info->dwSyncMode = infoW.dwSyncMode; + info->dwNumCachePaths = infoW.dwNumCachePaths; + info->dwNormalUsage = infoW.dwNormalUsage; + info->dwExemptUsage = infoW.dwExemptUsage; + info->u.s.dwCacheSize = infoW.u.s.dwCacheSize; + WideCharToMultiByte(CP_ACP, 0, infoW.u.s.CachePath, -1, info->u.s.CachePath, MAX_PATH, NULL, NULL); + + return TRUE; } BOOL WINAPI GetUrlCacheGroupAttributeA( GROUPID gid, DWORD dwFlags, DWORD dwAttributes, diff --git a/dll/win32/wininet/utility.c b/dll/win32/wininet/utility.c index 0e67da98db0..1853e398f47 100644 --- a/dll/win32/wininet/utility.c +++ b/dll/win32/wininet/utility.c @@ -219,7 +219,7 @@ static const char *get_callback_name(DWORD dwInternetStatus) { }; DWORD i; - for (i = 0; i < (sizeof(internet_status) / sizeof(internet_status[0])); i++) { + for (i = 0; i < ARRAY_SIZE(internet_status); i++) { if (internet_status[i].val == dwInternetStatus) return internet_status[i].name; } return "Unknown"; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index c6c62324999..e27bd33f0e5 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -202,7 +202,7 @@ dll/win32/windowscodecsext # Synced to WineStaging-2.9 dll/win32/winemp3.acm # Synced to WineStaging-4.18 dll/win32/wing32 # Synced to WineStaging-3.3 dll/win32/winhttp # Synced to WineStaging-4.18 -dll/win32/wininet # Synced to WineStaging-3.9 +dll/win32/wininet # Synced to WineStaging-4.18 dll/win32/winmm # Forked at Wine-20050628 dll/win32/winmm/midimap # Forked at Wine-20050628 dll/win32/winmm/wavemap # Forked at Wine-20050628
5 years
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
22
23
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Results per page:
10
25
50
100
200