diff --git a/tools/winapi_check/modules.dat b/tools/winapi_check/modules.dat index 002cf558bed..37e4297a548 100644 --- a/tools/winapi_check/modules.dat +++ b/tools/winapi_check/modules.dat @@ -202,6 +202,10 @@ dlls/msacm dlls/msacm +% dlls/msacm/msg711/msg711.drv.spec + +dlls/msacm/msg711 + % dlls/msnet32/msnet32.spec % dlls/msvideo/msvfw32.spec @@ -361,6 +365,10 @@ dlls/sti dlls/ttydrv +% dlls/twain/twain_32.spec + +dlls/twain + % dlls/urlmon/urlmon.spec dlls/urlmon @@ -483,6 +491,10 @@ dlls/winmm/midimap dlls/winmm/wavemap +% dlls/winmm/winearts/winearts.drv.spec + +dlls/winmm/winearts + % dlls/winmm/wineoss/wineoss.drv.spec dlls/winmm/wineoss diff --git a/tools/winapi_check/win32/avicap32.api b/tools/winapi_check/win32/avicap32.api index 8b137891791..b6279f647a1 100644 --- a/tools/winapi_check/win32/avicap32.api +++ b/tools/winapi_check/win32/avicap32.api @@ -1 +1,17 @@ +%long +BOOL +DWORD +HWND +UINT +int + +%str + +LPCSTR +LPSTR + +%wstr + +LPCWSTR +LPWSTR \ No newline at end of file diff --git a/tools/winapi_check/win32/msg711.api b/tools/winapi_check/win32/msg711.api new file mode 100644 index 00000000000..927d81c415c --- /dev/null +++ b/tools/winapi_check/win32/msg711.api @@ -0,0 +1,6 @@ +%long + +DWORD +LONG +HDRVR +UINT diff --git a/tools/winapi_check/win32/msimg32.api b/tools/winapi_check/win32/msimg32.api index a06e3e36064..d8de6def1df 100644 --- a/tools/winapi_check/win32/msimg32.api +++ b/tools/winapi_check/win32/msimg32.api @@ -2,9 +2,16 @@ BOOL HDC +UINT ULONG +int %ptr +BLENDFUNCTION +TRIVERTEX * void * +%void + +void diff --git a/tools/winapi_check/win32/shdocvw.api b/tools/winapi_check/win32/shdocvw.api index c5480c6c480..05c62a88741 100644 --- a/tools/winapi_check/win32/shdocvw.api +++ b/tools/winapi_check/win32/shdocvw.api @@ -5,10 +5,10 @@ HRESULT %ptr +CLSID * DLLVERSIONINFO * -LPVOID * -REFCLSID -REFIID +IID * +void ** %wstr diff --git a/tools/winapi_check/win32/shlwapi.api b/tools/winapi_check/win32/shlwapi.api index bf17a20b4ab..0be8255fe60 100644 --- a/tools/winapi_check/win32/shlwapi.api +++ b/tools/winapi_check/win32/shlwapi.api @@ -68,6 +68,7 @@ LPVOID * LPWORD PACL PHUSKEY +PLONG PSECURITY_DESCRIPTOR PVOID REFIID diff --git a/tools/winapi_check/win32/twain_32.api b/tools/winapi_check/win32/twain_32.api new file mode 100644 index 00000000000..8bc7d97210f --- /dev/null +++ b/tools/winapi_check/win32/twain_32.api @@ -0,0 +1,10 @@ +%long + +TW_UINT16 +TW_UINT32 + +%ptr + +TW_MEMREF +pTW_IDENTITY + diff --git a/tools/winapi_check/win32/urlmon.api b/tools/winapi_check/win32/urlmon.api index 2a6831d609e..ec2c2bbc63b 100644 --- a/tools/winapi_check/win32/urlmon.api +++ b/tools/winapi_check/win32/urlmon.api @@ -7,6 +7,7 @@ long %ptr +DWORD * IBindCtx * IBindCtx ** IBindStatusCallback * @@ -14,10 +15,15 @@ IBindStatusCallback ** IEnumFORMATETC * IMoniker * IMoniker ** +LPVOID LPVOID * REFCLSID REFIID +%str + +LPCSTR + %wstr LPCWSTR diff --git a/tools/winapi_check/win32/winearts.api b/tools/winapi_check/win32/winearts.api new file mode 100644 index 00000000000..5f70cbc32b3 --- /dev/null +++ b/tools/winapi_check/win32/winearts.api @@ -0,0 +1,7 @@ +%long + +WORD +DWORD +LONG +HDRVR +UINT diff --git a/tools/winapi_check/winapi.pm b/tools/winapi_check/winapi.pm index db04ec13201..207b5b7c2d4 100644 --- a/tools/winapi_check/winapi.pm +++ b/tools/winapi_check/winapi.pm @@ -437,6 +437,16 @@ sub is_allowed_kind { } else { return 0; } + +} + +sub allow_kind { + my $self = shift; + my $allowed_kind = \%{$self->{ALLOWED_KIND}}; + + my $kind = shift; + + $$allowed_kind{$kind}++; } sub is_limited_type { @@ -448,7 +458,7 @@ sub is_limited_type { return $$allowed_modules_limited{$type}; } -sub allowed_type_in_module { +sub is_allowed_type_in_module { my $self = shift; my $allowed_modules = \%{$self->{ALLOWED_MODULES}}; my $allowed_modules_limited = \%{$self->{ALLOWED_MODULES_LIMITED}}; @@ -465,6 +475,18 @@ sub allowed_type_in_module { return 0; } +sub allow_type_in_module { + my $self = shift; + my $allowed_modules = \%{$self->{ALLOWED_MODULES}}; + + my $type = shift; + my @modules = split(/ \& /, shift); + + foreach my $module (@modules) { + $$allowed_modules{$type}{$module}++; + } +} + sub type_used_in_module { my $self = shift; my $used_modules = \%{$self->{USED_MODULES}}; @@ -523,9 +545,19 @@ sub translate_argument { my $self = shift; my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}}; - my $argument = shift; + my $type = shift; - return $$translate_argument{$argument}; + return $$translate_argument{$type}; +} + +sub declare_argument { + my $self = shift; + my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}}; + + my $type = shift; + my $kind = shift; + + $$translate_argument{$type} = $kind; } sub all_declared_types { diff --git a/tools/winapi_check/winapi_local.pm b/tools/winapi_check/winapi_local.pm index 38a35b3f909..3429fc8e5ac 100644 --- a/tools/winapi_check/winapi_local.pm +++ b/tools/winapi_check/winapi_local.pm @@ -92,11 +92,16 @@ sub _check_function { my $implemented_return_kind; $winapi->type_used_in_module($return_type,$module); if(!defined($implemented_return_kind = $winapi->translate_argument($return_type))) { + $winapi->declare_argument($return_type, "unknown"); if($return_type ne "") { $output->write("no translation defined: " . $return_type . "\n"); } - } elsif(!$winapi->is_allowed_kind($implemented_return_kind) || !$winapi->allowed_type_in_module($return_type,$module)) { + } elsif(!$winapi->is_allowed_kind($implemented_return_kind) || + !$winapi->is_allowed_type_in_module($return_type, $module)) + { $forbidden_return_type = 1; + $winapi->allow_kind($implemented_return_kind); + $winapi->allow_type_in_module($return_type, $module); if($options->report_argument_forbidden($return_type)) { $output->write("return type is forbidden: $return_type ($implemented_return_kind)\n"); } @@ -190,11 +195,15 @@ sub _check_function { if($type eq "CONTEXT86 *") { $kind = "context86"; } elsif(!defined($kind = $winapi->translate_argument($type))) { + $winapi->declare_argument($type, "unknown"); $output->write("no translation defined: " . $type . "\n"); } elsif(!$winapi->is_allowed_kind($kind) || - !$winapi->allowed_type_in_module($type, $module)) { + !$winapi->is_allowed_type_in_module($type, $module)) + { + $winapi->allow_kind($kind); + $winapi->allow_type_in_module($type, $module); if($options->report_argument_forbidden($type)) { - $output->write("forbidden argument " . ($n + 1) . " type " . $type . " (" . $kind . ")\n"); + $output->write("argument " . ($n + 1) . " type is forbidden: " . $type . " (" . $kind . ")\n"); } } @@ -225,8 +234,10 @@ sub _check_function { if($argument_kinds[$n] eq "context86") { # Nothing } elsif(!$winapi->is_allowed_kind($argument_kinds[$n]) || - !$winapi->allowed_type_in_module($argument_types[$n], $module)) + !$winapi->is_allowed_type_in_module($argument_types[$n], $module)) { + $winapi->allow_kind($argument_kinds[$n]); + $winapi->allow_type_in_module($argument_types[$n],, $module); if($options->report_argument_forbidden($argument_types[$n])) { $output->write("argument " . ($n + 1) . " type is forbidden: " . "$argument_types[$n] ($argument_kinds[$n])\n");