File hide-wine-version.patch of Package wine-test
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index 11111111111..11111111111 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -262,6 +262,34 @@ BOOL WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType )
return GetBinaryTypeW(NtCurrentTeb()->StaticUnicodeString.Buffer, lpBinaryType);
}
+static BOOL block_wine_get_version = FALSE;
+
+BOOL CALLBACK init_block_wine_get_version( INIT_ONCE* init_once, PVOID param, PVOID *ctx )
+{
+ WCHAR *buffer;
+ DWORD size;
+
+ if ((size = GetEnvironmentVariableW( L"WINE_BLOCK_GET_VERSION", NULL, 0 )))
+ {
+ if (!(buffer = HeapAlloc( GetProcessHeap(), 0, sizeof(*buffer) * size )))
+ {
+ ERR("No memory.\n");
+ return FALSE;
+ }
+
+ if (GetEnvironmentVariableW( L"WINE_BLOCK_GET_VERSION", buffer, size ) != size - 1)
+ {
+ ERR("Error getting WINE_BLOCK_GET_VERSION env variable.\n");
+ return FALSE;
+ }
+
+ block_wine_get_version = *buffer && !!wcsncmp( buffer, L"0", 1 );
+
+ HeapFree( GetProcessHeap(), 0, buffer );
+ }
+ return TRUE;
+}
+
/***********************************************************************
* GetProcAddress (KERNEL32.@)
*
@@ -279,6 +307,14 @@ FARPROC get_proc_address( HMODULE hModule, LPCSTR function )
{
FARPROC fp;
+ if ((ULONG_PTR)function >> 16)
+ {
+ static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
+ InitOnceExecuteOnce( &init_once, init_block_wine_get_version, NULL, NULL );
+ if (block_wine_get_version && !strncmp( function, "wine_get_version", 16 ))
+ return NULL;
+ }
+
if (!hModule) hModule = NtCurrentTeb()->Peb->ImageBaseAddress;
if ((ULONG_PTR)function >> 16)
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index 0f8a9438821..7ef414c2092 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -210,7 +210,7 @@ HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, cons
FIXME("stub: %d %p %p %p %p\n", name_element_count, name_elements, meta_data_locator, iid, hiid);
if (iid) *iid = GUID_NULL;
if (hiid) *hiid = INVALID_HANDLE_VALUE;
- return E_NOTIMPL;
+ return S_OK;
}
/***********************************************************************