You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
120 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
76900de5bb | ||
|
776306026a | ||
|
c4c72e90ab | ||
|
f8c3c9a6f8 | ||
|
39678da196 | ||
|
be8a670b5b | ||
|
4d11895651 | ||
|
bf3fbb7bdf | ||
|
160a5024b4 | ||
|
f36c844f11 | ||
|
732ab97a7e | ||
|
46fbb7d31e | ||
|
44d1a45e98 | ||
|
f23b6cb7dc | ||
|
4d01e48843 | ||
|
90109a5fc5 | ||
|
e8abb98858 | ||
|
56b4eed468 | ||
|
755d1ca559 | ||
|
001ea51fb5 | ||
|
db80e169c7 | ||
|
7757a2d4f6 | ||
|
1a980ed93d | ||
|
528306ccb6 | ||
|
7fe7d87f09 | ||
|
805f2e9252 | ||
|
18f7125892 | ||
|
f993930ee6 | ||
|
2a9e87abea | ||
|
af97ec8ce0 | ||
|
b14430433d | ||
|
f9d1798edb | ||
|
e5da84dc36 | ||
|
75c7644c3d | ||
|
7c7868f4bb | ||
|
d1a8b6bc14 | ||
|
53b02cd0ee | ||
|
36b8b8cc65 | ||
|
13536af59c | ||
|
a6f3bd989e | ||
|
0830db32cd | ||
|
cd7d77fe36 | ||
|
2e9977f4ac | ||
|
a1246b5e92 | ||
|
676dd02663 | ||
|
648db00708 | ||
|
6bfaa3b0a5 | ||
|
cbf7f73313 | ||
|
c896e5cb69 | ||
|
4d65ec9456 | ||
|
d14250ab03 | ||
|
789f5c7c64 | ||
|
69cb47fd36 | ||
|
8450903b5c | ||
|
ffe93505d2 | ||
|
5213d551f8 | ||
|
e61a75f75f | ||
|
7428dd8656 | ||
|
40e84b052b | ||
|
92b2688a74 | ||
|
f7eec766a5 | ||
|
b4e0277488 | ||
|
f54b943bca | ||
|
6138369b4f | ||
|
59fe96c14c | ||
|
afdf5020ff | ||
|
2fc5c88068 | ||
|
ad3de029e7 | ||
|
4ff3984c49 | ||
|
deeaa04aa4 | ||
|
592b853fe4 | ||
|
26f14c2ddd | ||
|
57204d77d9 | ||
|
37e000145f | ||
|
d68ab574f5 | ||
|
469cbe7ed8 | ||
|
1fe141dd3e | ||
|
a3b99d730d | ||
|
de7c2faf80 | ||
|
8b2fd051c9 | ||
|
ede44e4e8f | ||
|
aca614eb8b | ||
|
49d52336e1 | ||
|
17fdb93f55 | ||
|
3f43238b01 | ||
|
59d19c8963 | ||
|
d3ad4e1115 | ||
|
b3f1e5566f | ||
|
c26be86c42 | ||
|
14a3242b92 | ||
|
991bebfee7 | ||
|
0d7a4f0c73 | ||
|
30c1e2757a | ||
|
e55a3a3f43 | ||
|
ca1047528f | ||
|
d53a1b4a17 | ||
|
47facf2571 | ||
|
b7c9feb3c1 | ||
|
c263c4f896 | ||
|
fa188fd6b0 | ||
|
6e474e34fb | ||
|
f917b2fc24 | ||
|
44115dbd63 | ||
|
59f43478d6 | ||
|
d83b9f53fb | ||
|
f57d1b8d02 | ||
|
f397af1c7f | ||
|
44fb25d66d | ||
|
4ad9169f53 | ||
|
bbc86a61db | ||
|
537b6dd5e3 | ||
|
8b862038c5 | ||
|
3b2fb113fa | ||
|
964b6c1ab5 | ||
|
fc87fb74db | ||
|
8bbe365bfc | ||
|
07ef9c93b8 | ||
|
050435f28e | ||
|
00f288b12e | ||
|
b1e9ef0294 |
@@ -1,4 +1,4 @@
|
||||
From fa73044dd60bae90b9a5ec850205a07579d4db17 Mon Sep 17 00:00:00 2001
|
||||
From 63d2046a8f4388fbc7c12a07ae5f412fccc1b202 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 29 May 2014 23:43:45 +0200
|
||||
Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
||||
@@ -14,13 +14,14 @@ Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
||||
6 files changed, 58 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
||||
index bb75d9c..21e2db6 100644
|
||||
index c29a1c26c26..8906e194272 100644
|
||||
--- a/dlls/ntdll/misc.c
|
||||
+++ b/dlls/ntdll/misc.c
|
||||
@@ -61,6 +61,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
||||
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
||||
return wine_get_version();
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
+/*********************************************************************
|
||||
+ * wine_get_patches (NTDLL.@)
|
||||
+ */
|
||||
+const void * CDECL NTDLL_wine_get_patches(void)
|
||||
@@ -28,15 +29,14 @@ index bb75d9c..21e2db6 100644
|
||||
+ return wine_get_patches();
|
||||
+}
|
||||
+
|
||||
+/*********************************************************************
|
||||
/*********************************************************************
|
||||
* wine_get_build_id (NTDLL.@)
|
||||
*/
|
||||
const char * CDECL NTDLL_wine_get_build_id(void)
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 292b0f6..fb45a94 100644
|
||||
index e61a2578da5..52db67fd978 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1516,6 +1516,7 @@
|
||||
@@ -1571,6 +1571,7 @@
|
||||
|
||||
# Version
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
@@ -45,10 +45,10 @@ index 292b0f6..fb45a94 100644
|
||||
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index 242bb69..fae73fe 100644
|
||||
index f338c4da190..1f992da6062 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -43,6 +43,7 @@ extern const char *wine_get_data_dir(void);
|
||||
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
|
||||
extern const char *wine_get_server_dir(void);
|
||||
extern const char *wine_get_user_name(void);
|
||||
extern const char *wine_get_version(void);
|
||||
@@ -57,10 +57,10 @@ index 242bb69..fae73fe 100644
|
||||
extern void wine_init_argv0_path( const char *argv0 );
|
||||
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 3c9110b..5da6263 100644
|
||||
index 2a3314cbfda..5b66c063db6 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -522,6 +522,12 @@ const char *wine_get_version(void)
|
||||
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
|
||||
return PACKAGE_VERSION;
|
||||
}
|
||||
|
||||
@@ -74,22 +74,22 @@ index 3c9110b..5da6263 100644
|
||||
const char *wine_get_build_id(void)
|
||||
{
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 2159fac..7cb2918 100644
|
||||
index 7ea849b908e..a7359ee7872 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -90,6 +90,7 @@ WINE_1.0
|
||||
wine_get_ss;
|
||||
@@ -22,6 +22,7 @@ WINE_1.0
|
||||
wine_get_server_dir;
|
||||
wine_get_user_name;
|
||||
wine_get_version;
|
||||
+ wine_get_patches;
|
||||
wine_init;
|
||||
wine_init_argv0_path;
|
||||
wine_is_dbcs_leadbyte;
|
||||
wine_mmap_add_reserved_area;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f197cf8..f662912 100644
|
||||
index 407c897892d..d97d6b28bf8 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -54,7 +54,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
@@ -53,7 +53,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
static const char usage[] =
|
||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
||||
" wine --help Display this help and exit\n"
|
||||
@@ -99,7 +99,7 @@ index f197cf8..f662912 100644
|
||||
|
||||
if (argc <= 1)
|
||||
{
|
||||
@@ -71,6 +72,45 @@ static void check_command_line( int argc, char *argv[] )
|
||||
@@ -70,6 +71,45 @@ static void check_command_line( int argc, char *argv[] )
|
||||
printf( "%s\n", wine_get_build_id() );
|
||||
exit(0);
|
||||
}
|
||||
@@ -146,5 +146,5 @@ index f197cf8..f662912 100644
|
||||
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.25.1
|
||||
|
||||
|
@@ -1,313 +0,0 @@
|
||||
From 9618572cf2eace39198fb83b747a70d1865015e3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 28 May 2014 19:50:51 +0200
|
||||
Subject: [PATCH] loader: Add commandline option --check-libs.
|
||||
|
||||
---
|
||||
include/wine/library.h | 2 +
|
||||
libs/wine/config.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
libs/wine/loader.c | 36 ++++++++++++++
|
||||
libs/wine/wine.map | 2 +
|
||||
loader/main.c | 50 +++++++++++++++++++-
|
||||
5 files changed, 213 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index fae73fe..7395a11 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -40,6 +40,7 @@ extern "C" {
|
||||
extern const char *wine_get_build_dir(void);
|
||||
extern const char *wine_get_config_dir(void);
|
||||
extern const char *wine_get_data_dir(void);
|
||||
+extern const char **wine_get_libs(void);
|
||||
extern const char *wine_get_server_dir(void);
|
||||
extern const char *wine_get_user_name(void);
|
||||
extern const char *wine_get_version(void);
|
||||
@@ -52,6 +53,7 @@ extern void wine_exec_wine_binary( const char *name, char **argv, const char *en
|
||||
|
||||
typedef void (*load_dll_callback_t)( void *, const char * );
|
||||
|
||||
+extern int wine_dladdr( void *addr, void *info, char *error, size_t errorsize );
|
||||
extern void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize );
|
||||
extern void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize );
|
||||
extern int wine_dlclose( void *handle, char *error, size_t errorsize );
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 5da6263..6cedfb7 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -488,6 +488,130 @@ const char *wine_get_build_dir(void)
|
||||
return build_dir;
|
||||
}
|
||||
|
||||
+const char *wine_libs[] = {
|
||||
+#ifdef SONAME_LIBCAIRO
|
||||
+ SONAME_LIBCAIRO,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBCAPI20
|
||||
+ SONAME_LIBCAPI20,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBCUPS
|
||||
+ SONAME_LIBCUPS,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBCURSES
|
||||
+ SONAME_LIBCURSES,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBDBUS_1
|
||||
+ SONAME_LIBDBUS_1,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBFONTCONFIG
|
||||
+ SONAME_LIBFONTCONFIG,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBFREETYPE
|
||||
+ SONAME_LIBFREETYPE,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGL
|
||||
+ SONAME_LIBGL,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGNUTLS
|
||||
+ SONAME_LIBGNUTLS,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGOBJECT_2_0
|
||||
+ SONAME_LIBGOBJECT_2_0,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGSM
|
||||
+ SONAME_LIBGSM,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGTK_3
|
||||
+ SONAME_LIBGTK_3,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBHAL
|
||||
+ SONAME_LIBHAL,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBJPEG
|
||||
+ SONAME_LIBJPEG,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBNCURSES
|
||||
+ SONAME_LIBNCURSES,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBNETAPI
|
||||
+ SONAME_LIBNETAPI,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBODBC
|
||||
+ SONAME_LIBODBC,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBOSMESA
|
||||
+ SONAME_LIBOSMESA,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBPCAP
|
||||
+ SONAME_LIBPCAP,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBPNG
|
||||
+ SONAME_LIBPNG,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBSANE
|
||||
+ SONAME_LIBSANE,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBTIFF
|
||||
+ SONAME_LIBTIFF,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBTXC_DXTN
|
||||
+ SONAME_LIBTXC_DXTN,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBV4L1
|
||||
+ SONAME_LIBV4L1,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBVA
|
||||
+ SONAME_LIBVA,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBVA_DRM
|
||||
+ SONAME_LIBVA_DRM,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBVA_X11
|
||||
+ SONAME_LIBVA_X11,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBX11
|
||||
+ SONAME_LIBX11,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBX11_XCB
|
||||
+ SONAME_LIBX11_XCB,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXCOMPOSITE
|
||||
+ SONAME_LIBXCOMPOSITE,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXCURSOR
|
||||
+ SONAME_LIBXCURSOR,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXEXT
|
||||
+ SONAME_LIBXEXT,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXI
|
||||
+ SONAME_LIBXI,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXINERAMA
|
||||
+ SONAME_LIBXINERAMA,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXRANDR
|
||||
+ SONAME_LIBXRANDR,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXRENDER
|
||||
+ SONAME_LIBXRENDER,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXSLT
|
||||
+ SONAME_LIBXSLT,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXXF86VM
|
||||
+ SONAME_LIBXXF86VM,
|
||||
+#endif
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+/* return the list of shared libs used by wine */
|
||||
+const char **wine_get_libs(void)
|
||||
+{
|
||||
+ return &wine_libs[0];
|
||||
+}
|
||||
+
|
||||
/* return the full name of the server directory (the one containing the socket) */
|
||||
const char *wine_get_server_dir(void)
|
||||
{
|
||||
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
|
||||
index 649aa22..367dde3 100644
|
||||
--- a/libs/wine/loader.c
|
||||
+++ b/libs/wine/loader.c
|
||||
@@ -1064,6 +1064,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+ * wine_dladdr
|
||||
+ */
|
||||
+int wine_dladdr( void *addr, void *info, char *error, size_t errorsize )
|
||||
+{
|
||||
+#ifdef HAVE_DLADDR
|
||||
+ int ret;
|
||||
+ const char *s;
|
||||
+ dlerror(); dlerror();
|
||||
+ ret = dladdr( addr, (Dl_info *)info );
|
||||
+ s = dlerror();
|
||||
+ if (error && errorsize)
|
||||
+ {
|
||||
+ if (s)
|
||||
+ {
|
||||
+ size_t len = strlen(s);
|
||||
+ if (len >= errorsize) len = errorsize - 1;
|
||||
+ memcpy( error, s, len );
|
||||
+ error[len] = 0;
|
||||
+ }
|
||||
+ else error[0] = 0;
|
||||
+ }
|
||||
+ dlerror();
|
||||
+ return ret;
|
||||
+#else
|
||||
+ if (error)
|
||||
+ {
|
||||
+ static const char msg[] = "dladdr interface not detected by configure";
|
||||
+ size_t len = min( errorsize, sizeof(msg) );
|
||||
+ memcpy( error, msg, len );
|
||||
+ error[len - 1] = 0;
|
||||
+ }
|
||||
+ return 0;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* wine_dlsym
|
||||
*/
|
||||
void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize )
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 7cb2918..72ffed8 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -65,6 +65,7 @@ WINE_1.0
|
||||
wine_dbg_sprintf;
|
||||
wine_dbgstr_an;
|
||||
wine_dbgstr_wn;
|
||||
+ wine_dladdr;
|
||||
wine_dlclose;
|
||||
wine_dll_enum_load_path;
|
||||
wine_dll_get_owner;
|
||||
@@ -85,6 +86,7 @@ WINE_1.0
|
||||
wine_get_es;
|
||||
wine_get_fs;
|
||||
wine_get_gs;
|
||||
+ wine_get_libs;
|
||||
wine_get_server_dir;
|
||||
wine_get_sortkey;
|
||||
wine_get_ss;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f662912..a2dc40c 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -36,6 +36,12 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
+#ifdef HAVE_DLADDR
|
||||
+# include <dlfcn.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_LINK_H
|
||||
+# include <link.h>
|
||||
+#endif
|
||||
#include <pthread.h>
|
||||
|
||||
#include "wine/library.h"
|
||||
@@ -55,7 +61,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
||||
" wine --help Display this help and exit\n"
|
||||
" wine --version Output version information and exit\n"
|
||||
- " wine --patches Output patch information and exit";
|
||||
+ " wine --patches Output patch information and exit\n"
|
||||
+ " wine --check-libs Checks if shared libs are installed";
|
||||
|
||||
if (argc <= 1)
|
||||
{
|
||||
@@ -111,6 +118,47 @@ static void check_command_line( int argc, char *argv[] )
|
||||
|
||||
exit(0);
|
||||
}
|
||||
+ if (!strcmp( argv[1], "--check-libs" ))
|
||||
+ {
|
||||
+ void* lib_handle;
|
||||
+ int ret = 0;
|
||||
+ const char **wine_libs = wine_get_libs();
|
||||
+
|
||||
+ for(; *wine_libs; wine_libs++)
|
||||
+ {
|
||||
+ lib_handle = wine_dlopen( *wine_libs, RTLD_NOW, NULL, 0 );
|
||||
+ if (lib_handle)
|
||||
+ {
|
||||
+ #ifdef HAVE_DLADDR
|
||||
+ Dl_info libinfo;
|
||||
+ void* symbol;
|
||||
+
|
||||
+ #ifdef HAVE_LINK_H
|
||||
+ struct link_map *lm = (struct link_map *)lib_handle;
|
||||
+ symbol = (void *)lm->l_addr;
|
||||
+ #else
|
||||
+ symbol = wine_dlsym( lib_handle, "_init", NULL, 0 );
|
||||
+ #endif
|
||||
+ if (symbol && wine_dladdr( symbol, &libinfo, NULL, 0 ))
|
||||
+ {
|
||||
+ printf( "%s: %s\n", *wine_libs, libinfo.dli_fname );
|
||||
+ }
|
||||
+ else
|
||||
+ #endif
|
||||
+ {
|
||||
+ printf( "%s: found\n", *wine_libs );
|
||||
+ }
|
||||
+ wine_dlclose( lib_handle, NULL, 0 );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ printf( "%s: missing\n", *wine_libs );
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ exit(ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,60 +0,0 @@
|
||||
From 07ca5e888c3265c57c88ef1758e6c47fbea4fb07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 27 Jun 2015 19:28:51 +0200
|
||||
Subject: loader: Print library paths for --check-libs on Mac OS X.
|
||||
|
||||
---
|
||||
loader/main.c | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index a2dc40c51c..1642fb0965 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -50,6 +50,30 @@
|
||||
/* the preloader will set this variable */
|
||||
const struct wine_preload_info *wine_main_preload_info = NULL;
|
||||
|
||||
+#ifdef __APPLE__
|
||||
+#include <mach-o/dyld.h>
|
||||
+
|
||||
+static const char *get_macho_library_path( const char *libname )
|
||||
+{
|
||||
+ unsigned int path_len, libname_len = strlen( libname );
|
||||
+ uint32_t i, count = _dyld_image_count();
|
||||
+
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ const char *path = _dyld_get_image_name( i );
|
||||
+ if (!path) continue;
|
||||
+
|
||||
+ path_len = strlen( path );
|
||||
+ if (path_len < libname_len + 1) continue;
|
||||
+ if (path[path_len - libname_len - 1] != '/') continue;
|
||||
+ if (strcmp( path + path_len - libname_len, libname )) continue;
|
||||
+
|
||||
+ return path;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/***********************************************************************
|
||||
* check_command_line
|
||||
*
|
||||
@@ -146,7 +170,11 @@ static void check_command_line( int argc, char *argv[] )
|
||||
else
|
||||
#endif
|
||||
{
|
||||
- printf( "%s: found\n", *wine_libs );
|
||||
+ const char *path = NULL;
|
||||
+ #ifdef __APPLE__
|
||||
+ path = get_macho_library_path( *wine_libs );
|
||||
+ #endif
|
||||
+ printf( "%s: %s\n", *wine_libs, path ? path : "found");
|
||||
}
|
||||
wine_dlclose( lib_handle, NULL, 0 );
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,83 +0,0 @@
|
||||
From e5500b9a3c7d36563725dc7975c2436a02165906 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 15 Nov 2019 15:46:23 +0800
|
||||
Subject: [PATCH] include: Add adserr.h.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
include/Makefile.in | 1 +
|
||||
include/adserr.h | 50 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
create mode 100644 include/adserr.h
|
||||
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index cbad4d604f..2e0a10d650 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -7,6 +7,7 @@ SOURCES = \
|
||||
activaut.idl \
|
||||
activdbg.idl \
|
||||
activscp.idl \
|
||||
+ adserr.h \
|
||||
adshlp.h \
|
||||
advpub.h \
|
||||
af_irda.h \
|
||||
diff --git a/include/adserr.h b/include/adserr.h
|
||||
new file mode 100644
|
||||
index 0000000000..83da568763
|
||||
--- /dev/null
|
||||
+++ b/include/adserr.h
|
||||
@@ -0,0 +1,50 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef __ADSERR_H
|
||||
+#define __ADSERR_H
|
||||
+
|
||||
+#ifdef RC_INVOKED
|
||||
+#define _HRESULT_TYPEDEF_(x) (x)
|
||||
+#else
|
||||
+#define _HRESULT_TYPEDEF_(x) ((HRESULT)x)
|
||||
+#endif
|
||||
+
|
||||
+#define E_ADS_BAD_PATHNAME _HRESULT_TYPEDEF_(0x80005000)
|
||||
+#define E_ADS_INVALID_DOMAIN_OBJECT _HRESULT_TYPEDEF_(0x80005001)
|
||||
+#define E_ADS_INVALID_USER_OBJECT _HRESULT_TYPEDEF_(0x80005002)
|
||||
+#define E_ADS_INVALID_COMPUTER_OBJECT _HRESULT_TYPEDEF_(0x80005003)
|
||||
+#define E_ADS_UNKNOWN_OBJECT _HRESULT_TYPEDEF_(0x80005004)
|
||||
+#define E_ADS_PROPERTY_NOT_SET _HRESULT_TYPEDEF_(0x80005005)
|
||||
+#define E_ADS_PROPERTY_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x80005006)
|
||||
+#define E_ADS_PROPERTY_INVALID _HRESULT_TYPEDEF_(0x80005007)
|
||||
+#define E_ADS_BAD_PARAMETER _HRESULT_TYPEDEF_(0x80005008)
|
||||
+#define E_ADS_OBJECT_UNBOUND _HRESULT_TYPEDEF_(0x80005009)
|
||||
+#define E_ADS_PROPERTY_NOT_MODIFIED _HRESULT_TYPEDEF_(0x8000500A)
|
||||
+#define E_ADS_PROPERTY_MODIFIED _HRESULT_TYPEDEF_(0x8000500B)
|
||||
+#define E_ADS_CANT_CONVERT_DATATYPE _HRESULT_TYPEDEF_(0x8000500C)
|
||||
+#define E_ADS_PROPERTY_NOT_FOUND _HRESULT_TYPEDEF_(0x8000500D)
|
||||
+#define E_ADS_OBJECT_EXISTS _HRESULT_TYPEDEF_(0x8000500E)
|
||||
+#define E_ADS_SCHEMA_VIOLATION _HRESULT_TYPEDEF_(0x8000500F)
|
||||
+#define E_ADS_COLUMN_NOT_SET _HRESULT_TYPEDEF_(0x80005010)
|
||||
+#define S_ADS_ERRORSOCCURRED _HRESULT_TYPEDEF_(0x00005011)
|
||||
+#define S_ADS_NOMORE_ROWS _HRESULT_TYPEDEF_(0x00005012)
|
||||
+#define S_ADS_NOMORE_COLUMNS _HRESULT_TYPEDEF_(0x00005013)
|
||||
+#define E_ADS_INVALID_FILTER _HRESULT_TYPEDEF_(0x80005014)
|
||||
+
|
||||
+#endif /* __ADSERR_H */
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,161 +0,0 @@
|
||||
From c12e335b0df736fe2a2f2447d0d751de7cc21d37 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 15 Nov 2019 17:37:11 +0800
|
||||
Subject: [PATCH 2/5] activeds: Implement ADsOpenObject.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/activeds/Makefile.in | 1 +
|
||||
dlls/activeds/activeds_main.c | 80 +++++++++++++++++++++++++++++++++--
|
||||
include/iads.idl | 14 ++++++
|
||||
3 files changed, 91 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/activeds/Makefile.in b/dlls/activeds/Makefile.in
|
||||
index 20578a93bc..54f86d661e 100644
|
||||
--- a/dlls/activeds/Makefile.in
|
||||
+++ b/dlls/activeds/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
MODULE = activeds.dll
|
||||
IMPORTLIB = activeds
|
||||
+IMPORTS = advapi32 ole32 oleaut32
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c
|
||||
index 69c5c447dc..8ff587e332 100644
|
||||
--- a/dlls/activeds/activeds_main.c
|
||||
+++ b/dlls/activeds/activeds_main.c
|
||||
@@ -2,6 +2,7 @@
|
||||
* Implementation of the Active Directory Service Interface
|
||||
*
|
||||
* Copyright 2005 Detlef Riekenberg
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
*
|
||||
* This file contains only stubs to get the printui.dll up and running
|
||||
* activeds.dll is much much more than this
|
||||
@@ -30,8 +31,10 @@
|
||||
#include "winuser.h"
|
||||
|
||||
#include "objbase.h"
|
||||
+#include "initguid.h"
|
||||
#include "iads.h"
|
||||
#include "adshlp.h"
|
||||
+#include "adserr.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -112,11 +115,80 @@ HRESULT WINAPI ADsBuildVarArrayInt(LPDWORD lpdwObjectTypes, DWORD dwObjectTypes,
|
||||
/*****************************************************
|
||||
* ADsOpenObject [ACTIVEDS.9]
|
||||
*/
|
||||
-HRESULT WINAPI ADsOpenObject(LPCWSTR lpszPathName, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwReserved, REFIID riid, VOID** ppObject)
|
||||
+HRESULT WINAPI ADsOpenObject(LPCWSTR path, LPCWSTR user, LPCWSTR password, DWORD reserved, REFIID riid, void **obj)
|
||||
{
|
||||
- FIXME("(%s,%s,%u,%s,%p)!stub\n", debugstr_w(lpszPathName),
|
||||
- debugstr_w(lpszUserName), dwReserved, debugstr_guid(riid), ppObject);
|
||||
- return E_NOTIMPL;
|
||||
+ HRESULT hr;
|
||||
+ HKEY hkey, hprov;
|
||||
+ WCHAR provider[MAX_PATH], progid[MAX_PATH];
|
||||
+ DWORD idx = 0;
|
||||
+
|
||||
+ TRACE("(%s,%s,%u,%s,%p)\n", debugstr_w(path), debugstr_w(user), reserved, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (!path || !riid || !obj)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey))
|
||||
+ return E_ADS_BAD_PATHNAME;
|
||||
+
|
||||
+ hr = E_ADS_BAD_PATHNAME;
|
||||
+
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ if (RegEnumKeyW(hkey, idx++, provider, ARRAY_SIZE(provider)))
|
||||
+ break;
|
||||
+
|
||||
+ TRACE("provider %s\n", debugstr_w(provider));
|
||||
+
|
||||
+ if (!wcsnicmp(path, provider, wcslen(provider)) && path[wcslen(provider)] == ':')
|
||||
+ {
|
||||
+ LONG size;
|
||||
+
|
||||
+ if (RegOpenKeyExW(hkey, provider, 0, KEY_READ, &hprov))
|
||||
+ break;
|
||||
+
|
||||
+ size = ARRAY_SIZE(progid);
|
||||
+ if (!RegQueryValueW(hprov, NULL, progid, &size))
|
||||
+ {
|
||||
+ CLSID clsid;
|
||||
+
|
||||
+ if (CLSIDFromProgID(progid, &clsid) == S_OK)
|
||||
+ {
|
||||
+ IADsOpenDSObject *adsopen;
|
||||
+ IDispatch *disp;
|
||||
+
|
||||
+ TRACE("ns %s => clsid %s\n", debugstr_w(progid), wine_dbgstr_guid(&clsid));
|
||||
+ if (CoCreateInstance(&clsid, 0, CLSCTX_INPROC_SERVER, &IID_IADsOpenDSObject, (void **)&adsopen) == S_OK)
|
||||
+ {
|
||||
+ BSTR bpath, buser, bpassword;
|
||||
+
|
||||
+ bpath = SysAllocString(path);
|
||||
+ buser = SysAllocString(user);
|
||||
+ bpassword = SysAllocString(password);
|
||||
+
|
||||
+ hr = IADsOpenDSObject_OpenDSObject(adsopen, bpath, buser, bpassword, reserved, &disp);
|
||||
+ if (hr == S_OK)
|
||||
+ {
|
||||
+ hr = IDispatch_QueryInterface(disp, riid, obj);
|
||||
+ IDispatch_Release(disp);
|
||||
+ }
|
||||
+
|
||||
+ SysFreeString(bpath);
|
||||
+ SysFreeString(buser);
|
||||
+ SysFreeString(bpassword);
|
||||
+
|
||||
+ IADsOpenDSObject_Release(adsopen);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ RegCloseKey(hprov);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ RegCloseKey(hkey);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
diff --git a/include/iads.idl b/include/iads.idl
|
||||
index 6931b6f734..add52571c7 100644
|
||||
--- a/include/iads.idl
|
||||
+++ b/include/iads.idl
|
||||
@@ -794,6 +794,20 @@ interface IDirectorySearch : IUnknown
|
||||
HRESULT CloseSearchHandle([in] ADS_SEARCH_HANDLE hSearchResult);
|
||||
}
|
||||
|
||||
+/*****************************************************************************
|
||||
+ * IID_IADsOpenDSObject interface
|
||||
+ */
|
||||
+[
|
||||
+ odl,
|
||||
+ uuid(ddf2891e-0f9c-11d0-8ad4-00c04fd8d503),
|
||||
+ dual,
|
||||
+ oleautomation
|
||||
+]
|
||||
+interface IADsOpenDSObject : IDispatch
|
||||
+{
|
||||
+ HRESULT OpenDSObject([in] BSTR path, [in] BSTR user, [in] BSTR password, [in] long reserved, [out,retval] IDispatch **obj);
|
||||
+}
|
||||
+
|
||||
/*****************************************************************************
|
||||
* IADsADSystemInfo interface
|
||||
*/
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,483 +0,0 @@
|
||||
From ba1eb1310db57db3820a3886e374afc507c2b507 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 19 Nov 2019 11:34:13 +0800
|
||||
Subject: [PATCH 3/5] adsldp: Add LDAPNamespace stubs.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/adsldp/Makefile.in | 5 +-
|
||||
dlls/adsldp/adsldp.c | 295 ++++++++++++++++++++++++++++++++++++----
|
||||
dlls/adsldp/adsldp.idl | 9 ++
|
||||
dlls/adsldp/adsldp.rgs | 16 +++
|
||||
dlls/adsldp/rsrc.rc | 20 +++
|
||||
5 files changed, 319 insertions(+), 26 deletions(-)
|
||||
create mode 100644 dlls/adsldp/adsldp.rgs
|
||||
create mode 100644 dlls/adsldp/rsrc.rc
|
||||
|
||||
diff --git a/dlls/adsldp/Makefile.in b/dlls/adsldp/Makefile.in
|
||||
index 4dce14fd0d..7bf07fce2c 100644
|
||||
--- a/dlls/adsldp/Makefile.in
|
||||
+++ b/dlls/adsldp/Makefile.in
|
||||
@@ -1,10 +1,13 @@
|
||||
MODULE = adsldp.dll
|
||||
-IMPORTS = oleaut32 secur32
|
||||
+IMPORTS = oleaut32 secur32 rpcrt4
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
+dlldata_EXTRADEFS = -DENTRY_PREFIX=ADSLDP_
|
||||
|
||||
C_SRCS = \
|
||||
adsldp.c
|
||||
|
||||
IDL_SRCS = \
|
||||
adsldp.idl
|
||||
+
|
||||
+RC_SRCS = rsrc.rc
|
||||
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
|
||||
index 4fc0de41eb..ef62aad279 100644
|
||||
--- a/dlls/adsldp/adsldp.c
|
||||
+++ b/dlls/adsldp/adsldp.c
|
||||
@@ -31,10 +31,15 @@
|
||||
#define SECURITY_WIN32
|
||||
#include "security.h"
|
||||
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(adsldp);
|
||||
|
||||
+DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
|
||||
+
|
||||
+extern HRESULT WINAPI ADSLDP_DllGetClassObject(REFCLSID,REFIID,void **) DECLSPEC_HIDDEN;
|
||||
+
|
||||
static HMODULE adsldp_hinst;
|
||||
|
||||
typedef struct
|
||||
@@ -235,31 +240,239 @@ static const IADsADSystemInfoVtbl IADsADSystemInfo_vtbl =
|
||||
sysinfo_GetTrees
|
||||
};
|
||||
|
||||
-static HRESULT ADSystemInfo_create(void **obj)
|
||||
+static HRESULT ADSystemInfo_create(REFIID riid, void **obj)
|
||||
{
|
||||
AD_sysinfo *sysinfo;
|
||||
+ HRESULT hr;
|
||||
|
||||
sysinfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*sysinfo));
|
||||
if (!sysinfo) return E_OUTOFMEMORY;
|
||||
|
||||
sysinfo->IADsADSystemInfo_iface.lpVtbl = &IADsADSystemInfo_vtbl;
|
||||
sysinfo->ref = 1;
|
||||
- *obj = &sysinfo->IADsADSystemInfo_iface;
|
||||
|
||||
- TRACE("created %p\n", *obj);
|
||||
+ hr = IADsADSystemInfo_QueryInterface(&sysinfo->IADsADSystemInfo_iface, riid, obj);
|
||||
+ IADsADSystemInfo_Release(&sysinfo->IADsADSystemInfo_iface);
|
||||
|
||||
- return S_OK;
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
+typedef struct
|
||||
+{
|
||||
+ IADs IADs_iface;
|
||||
+ LONG ref;
|
||||
+} LDAP_namespace;
|
||||
+
|
||||
+static inline LDAP_namespace *impl_from_IADs(IADs *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, LDAP_namespace, IADs_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (!riid || !obj) return E_INVALIDARG;
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDispatch) ||
|
||||
+ IsEqualGUID(riid, &IID_IADs))
|
||||
+ {
|
||||
+ IADs_AddRef(iface);
|
||||
+ *obj = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("interface %s is not implemented\n", debugstr_guid(riid));
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ldapns_AddRef(IADs *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADs(iface);
|
||||
+ return InterlockedIncrement(&ldap->ref);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ldapns_Release(IADs *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADs(iface);
|
||||
+ LONG ref = InterlockedDecrement(&ldap->ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ TRACE("destroying %p\n", iface);
|
||||
+ HeapFree(GetProcessHeap(), 0, ldap);
|
||||
+ }
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetTypeInfoCount(IADs *iface, UINT *count)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetTypeInfo(IADs *iface, UINT index, LCID lcid, ITypeInfo **info)
|
||||
+{
|
||||
+ FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetIDsOfNames(IADs *iface, REFIID riid, LPOLESTR *names,
|
||||
+ UINT count, LCID lcid, DISPID *dispid)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_Invoke(IADs *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
|
||||
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
|
||||
+{
|
||||
+ FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
|
||||
+ params, result, excepinfo, argerr);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Name(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Class(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_GUID(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_ADsPath(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Parent(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Schema(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetInfo(IADs *iface)
|
||||
+{
|
||||
+ FIXME("%p: stub\n", iface);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_SetInfo(IADs *iface)
|
||||
+{
|
||||
+ FIXME("%p: stub\n", iface);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_Get(IADs *iface, BSTR name, VARIANT *prop)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p: stub\n", iface, debugstr_w(name), prop);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_Put(IADs *iface, BSTR name, VARIANT prop)
|
||||
+{
|
||||
+ FIXME("%p,%s,%s: stub\n", iface, debugstr_w(name), wine_dbgstr_variant(&prop));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetEx(IADs *iface, BSTR name, VARIANT *prop)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p: stub\n", iface, debugstr_w(name), prop);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_PutEx(IADs *iface, LONG code, BSTR name, VARIANT prop)
|
||||
+{
|
||||
+ FIXME("%p,%d,%s,%s: stub\n", iface, code, debugstr_w(name), wine_dbgstr_variant(&prop));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetInfoEx(IADs *iface, VARIANT prop, LONG reserved)
|
||||
+{
|
||||
+ FIXME("%p,%s,%d: stub\n", iface, wine_dbgstr_variant(&prop), reserved);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IADsVtbl IADs_vtbl =
|
||||
+{
|
||||
+ ldapns_QueryInterface,
|
||||
+ ldapns_AddRef,
|
||||
+ ldapns_Release,
|
||||
+ ldapns_GetTypeInfoCount,
|
||||
+ ldapns_GetTypeInfo,
|
||||
+ ldapns_GetIDsOfNames,
|
||||
+ ldapns_Invoke,
|
||||
+ ldapns_get_Name,
|
||||
+ ldapns_get_Class,
|
||||
+ ldapns_get_GUID,
|
||||
+ ldapns_get_ADsPath,
|
||||
+ ldapns_get_Parent,
|
||||
+ ldapns_get_Schema,
|
||||
+ ldapns_GetInfo,
|
||||
+ ldapns_SetInfo,
|
||||
+ ldapns_Get,
|
||||
+ ldapns_Put,
|
||||
+ ldapns_GetEx,
|
||||
+ ldapns_PutEx,
|
||||
+ ldapns_GetInfoEx
|
||||
+};
|
||||
+
|
||||
+static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
|
||||
+{
|
||||
+ LDAP_namespace *ldap;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ ldap = heap_alloc(sizeof(*ldap));
|
||||
+ if (!ldap) return E_OUTOFMEMORY;
|
||||
+
|
||||
+ ldap->IADs_iface.lpVtbl = &IADs_vtbl;
|
||||
+ ldap->ref = 1;
|
||||
+
|
||||
+ hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj);
|
||||
+ IADs_Release(&ldap->IADs_iface);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static const struct class_info
|
||||
+{
|
||||
+ const CLSID *clsid;
|
||||
+ HRESULT (*constructor)(REFIID, void **);
|
||||
+} class_info[] =
|
||||
+{
|
||||
+ { &CLSID_ADSystemInfo, ADSystemInfo_create },
|
||||
+ { &CLSID_LDAPNamespace, LDAPNamespace_create },
|
||||
+};
|
||||
+
|
||||
typedef struct
|
||||
{
|
||||
IClassFactory IClassFactory_iface;
|
||||
- HRESULT (*constructor)(void **);
|
||||
-} ADSystemInfo_factory;
|
||||
+ LONG ref;
|
||||
+ const struct class_info *info;
|
||||
+} class_factory;
|
||||
|
||||
-static inline ADSystemInfo_factory *impl_from_IClassFactory(IClassFactory *iface)
|
||||
+static inline class_factory *impl_from_IClassFactory(IClassFactory *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, ADSystemInfo_factory, IClassFactory_iface);
|
||||
+ return CONTAINING_RECORD(iface, class_factory, IClassFactory_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *obj)
|
||||
@@ -283,19 +496,30 @@ static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid,
|
||||
|
||||
static ULONG WINAPI factory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
- return 2;
|
||||
+ class_factory *factory = impl_from_IClassFactory(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&factory->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref %u\n", iface, ref);
|
||||
+
|
||||
+ return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI factory_Release(IClassFactory *iface)
|
||||
{
|
||||
- return 1;
|
||||
+ class_factory *factory = impl_from_IClassFactory(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&factory->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref %u\n", iface, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ heap_free(factory);
|
||||
+
|
||||
+ return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
|
||||
{
|
||||
- ADSystemInfo_factory *factory = impl_from_IClassFactory(iface);
|
||||
- IUnknown *unknown;
|
||||
- HRESULT hr;
|
||||
+ class_factory *factory = impl_from_IClassFactory(iface);
|
||||
|
||||
TRACE("%p,%s,%p\n", outer, debugstr_guid(riid), obj);
|
||||
|
||||
@@ -304,13 +528,7 @@ static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *out
|
||||
*obj = NULL;
|
||||
if (outer) return CLASS_E_NOAGGREGATION;
|
||||
|
||||
- hr = factory->constructor((void **)&unknown);
|
||||
- if (hr == S_OK)
|
||||
- {
|
||||
- hr = IUnknown_QueryInterface(unknown, riid, obj);
|
||||
- IUnknown_Release(unknown);
|
||||
- }
|
||||
- return hr;
|
||||
+ return factory->info->constructor(riid, obj);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI factory_LockServer(IClassFactory *iface, BOOL lock)
|
||||
@@ -328,21 +546,48 @@ static const struct IClassFactoryVtbl factory_vtbl =
|
||||
factory_LockServer
|
||||
};
|
||||
|
||||
-static ADSystemInfo_factory ADSystemInfo_cf = { { &factory_vtbl }, ADSystemInfo_create };
|
||||
+static HRESULT factory_constructor(const struct class_info *info, REFIID riid, void **obj)
|
||||
+{
|
||||
+ class_factory *factory;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ factory = heap_alloc(sizeof(*factory));
|
||||
+ if (!factory) return E_OUTOFMEMORY;
|
||||
+
|
||||
+ factory->IClassFactory_iface.lpVtbl = &factory_vtbl;
|
||||
+ factory->ref = 1;
|
||||
+ factory->info = info;
|
||||
+
|
||||
+ hr = IClassFactory_QueryInterface(&factory->IClassFactory_iface, riid, obj);
|
||||
+ IClassFactory_Release(&factory->IClassFactory_iface);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *obj)
|
||||
{
|
||||
+ const struct class_info *info = NULL;
|
||||
+ int i;
|
||||
+
|
||||
TRACE("%s,%s,%p\n", debugstr_guid(clsid), debugstr_guid(iid), obj);
|
||||
|
||||
if (!clsid || !iid || !obj) return E_INVALIDARG;
|
||||
|
||||
*obj = NULL;
|
||||
|
||||
- if (IsEqualGUID(clsid, &CLSID_ADSystemInfo))
|
||||
- return IClassFactory_QueryInterface(&ADSystemInfo_cf.IClassFactory_iface, iid, obj);
|
||||
+ for (i = 0; i < ARRAY_SIZE(class_info); i++)
|
||||
+ {
|
||||
+ if (IsEqualCLSID(class_info[i].clsid, clsid))
|
||||
+ {
|
||||
+ info = &class_info[i];
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (info)
|
||||
+ return factory_constructor(info, iid, obj);
|
||||
|
||||
- FIXME("class %s/%s is not implemented\n", debugstr_guid(clsid), debugstr_guid(iid));
|
||||
- return CLASS_E_CLASSNOTAVAILABLE;
|
||||
+ return ADSLDP_DllGetClassObject(clsid, iid, obj);
|
||||
}
|
||||
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
diff --git a/dlls/adsldp/adsldp.idl b/dlls/adsldp/adsldp.idl
|
||||
index c2f7504d0c..634aa36327 100644
|
||||
--- a/dlls/adsldp/adsldp.idl
|
||||
+++ b/dlls/adsldp/adsldp.idl
|
||||
@@ -18,8 +18,17 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
+#pragma makedep proxy
|
||||
#pragma makedep register
|
||||
|
||||
+[
|
||||
+ helpstring("LDAP Namespace Object"),
|
||||
+ progid("LDAPNamespace"),
|
||||
+ uuid(228d9a82-c302-11cf-9aa4-00aa004a5691),
|
||||
+ threading(both)
|
||||
+]
|
||||
+coclass ADs { }
|
||||
+
|
||||
[
|
||||
helpstring("AD System Info Object"),
|
||||
uuid(50b6327f-afd1-11d2-9cb9-0000f87a369e),
|
||||
diff --git a/dlls/adsldp/adsldp.rgs b/dlls/adsldp/adsldp.rgs
|
||||
new file mode 100644
|
||||
index 0000000000..0da0946832
|
||||
--- /dev/null
|
||||
+++ b/dlls/adsldp/adsldp.rgs
|
||||
@@ -0,0 +1,16 @@
|
||||
+HKLM
|
||||
+{
|
||||
+ NoRemove Software
|
||||
+ {
|
||||
+ NoRemove Microsoft
|
||||
+ {
|
||||
+ NoRemove ADs
|
||||
+ {
|
||||
+ NoRemove Providers
|
||||
+ {
|
||||
+ ForceRemove 'LDAP' = s 'LDAPNamespace'
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/dlls/adsldp/rsrc.rc b/dlls/adsldp/rsrc.rc
|
||||
new file mode 100644
|
||||
index 0000000000..914fe0b2f3
|
||||
--- /dev/null
|
||||
+++ b/dlls/adsldp/rsrc.rc
|
||||
@@ -0,0 +1,20 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+/* @makedep: adsldp.rgs */
|
||||
+1 WINE_REGISTRY adsldp.rgs
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,156 +0,0 @@
|
||||
From 73b97a7095f833e5323117c1acbb8a64c5e3afcb Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 19 Nov 2019 11:46:50 +0800
|
||||
Subject: [PATCH 4/5] adsldp: Add IADsOpenDSObject stubs.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/adsldp/adsldp.c | 102 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 102 insertions(+)
|
||||
|
||||
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
|
||||
index ef62aad279..bdce30c143 100644
|
||||
--- a/dlls/adsldp/adsldp.c
|
||||
+++ b/dlls/adsldp/adsldp.c
|
||||
@@ -260,6 +260,7 @@ static HRESULT ADSystemInfo_create(REFIID riid, void **obj)
|
||||
typedef struct
|
||||
{
|
||||
IADs IADs_iface;
|
||||
+ IADsOpenDSObject IADsOpenDSObject_iface;
|
||||
LONG ref;
|
||||
} LDAP_namespace;
|
||||
|
||||
@@ -270,6 +271,8 @@ static inline LDAP_namespace *impl_from_IADs(IADs *iface)
|
||||
|
||||
static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj)
|
||||
{
|
||||
+ LDAP_namespace *ldap = impl_from_IADs(iface);
|
||||
+
|
||||
TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
|
||||
|
||||
if (!riid || !obj) return E_INVALIDARG;
|
||||
@@ -283,6 +286,13 @@ static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+ if (IsEqualGUID(riid, &IID_IADsOpenDSObject))
|
||||
+ {
|
||||
+ IADs_AddRef(iface);
|
||||
+ *obj = &ldap->IADsOpenDSObject_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
FIXME("interface %s is not implemented\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
@@ -436,6 +446,97 @@ static const IADsVtbl IADs_vtbl =
|
||||
ldapns_GetInfoEx
|
||||
};
|
||||
|
||||
+static inline LDAP_namespace *impl_from_IADsOpenDSObject(IADsOpenDSObject *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, LDAP_namespace, IADsOpenDSObject_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_QueryInterface(IADsOpenDSObject *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (!riid || !obj) return E_INVALIDARG;
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IADsOpenDSObject) ||
|
||||
+ IsEqualGUID(riid, &IID_IDispatch) ||
|
||||
+ IsEqualGUID(riid, &IID_IUnknown))
|
||||
+ {
|
||||
+ IADsOpenDSObject_AddRef(iface);
|
||||
+ *obj = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("interface %s is not implemented\n", debugstr_guid(riid));
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI openobj_AddRef(IADsOpenDSObject *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface);
|
||||
+ return InterlockedIncrement(&ldap->ref);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI openobj_Release(IADsOpenDSObject *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface);
|
||||
+ LONG ref = InterlockedDecrement(&ldap->ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ TRACE("destroying %p\n", iface);
|
||||
+ HeapFree(GetProcessHeap(), 0, ldap);
|
||||
+ }
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_GetTypeInfoCount(IADsOpenDSObject *iface, UINT *count)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_GetTypeInfo(IADsOpenDSObject *iface, UINT index, LCID lcid, ITypeInfo **info)
|
||||
+{
|
||||
+ FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_GetIDsOfNames(IADsOpenDSObject *iface, REFIID riid, LPOLESTR *names,
|
||||
+ UINT count, LCID lcid, DISPID *dispid)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_Invoke(IADsOpenDSObject *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
|
||||
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
|
||||
+{
|
||||
+ FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
|
||||
+ params, result, excepinfo, argerr);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, BSTR user, BSTR password,
|
||||
+ LONG reserved, IDispatch **obj)
|
||||
+{
|
||||
+ FIXME("%p,%s,%s,%s,%d,%p: stub\n", iface, debugstr_w(path), debugstr_w(user), debugstr_w(password),
|
||||
+ reserved, obj);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IADsOpenDSObjectVtbl IADsOpenDSObject_vtbl =
|
||||
+{
|
||||
+ openobj_QueryInterface,
|
||||
+ openobj_AddRef,
|
||||
+ openobj_Release,
|
||||
+ openobj_GetTypeInfoCount,
|
||||
+ openobj_GetTypeInfo,
|
||||
+ openobj_GetIDsOfNames,
|
||||
+ openobj_Invoke,
|
||||
+ openobj_OpenDSObject
|
||||
+};
|
||||
+
|
||||
static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
|
||||
{
|
||||
LDAP_namespace *ldap;
|
||||
@@ -445,6 +546,7 @@ static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
|
||||
if (!ldap) return E_OUTOFMEMORY;
|
||||
|
||||
ldap->IADs_iface.lpVtbl = &IADs_vtbl;
|
||||
+ ldap->IADsOpenDSObject_iface.lpVtbl = &IADsOpenDSObject_vtbl;
|
||||
ldap->ref = 1;
|
||||
|
||||
hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj);
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,123 +0,0 @@
|
||||
From 488afac28472b0563c67cfad8c02a82f489c2c04 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 19 Nov 2019 12:12:27 +0800
|
||||
Subject: [PATCH 5/5] adsldp/tests: Add some tests for LDAPNamespace.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/adsldp/tests/Makefile.in | 1 +
|
||||
dlls/adsldp/tests/ldap.c | 78 +++++++++++++++++++++++++++++++++++
|
||||
dlls/adsldp/tests/sysinfo.c | 2 +
|
||||
3 files changed, 81 insertions(+)
|
||||
create mode 100644 dlls/adsldp/tests/ldap.c
|
||||
|
||||
diff --git a/dlls/adsldp/tests/Makefile.in b/dlls/adsldp/tests/Makefile.in
|
||||
index 777d2aa9de..52141139d5 100644
|
||||
--- a/dlls/adsldp/tests/Makefile.in
|
||||
+++ b/dlls/adsldp/tests/Makefile.in
|
||||
@@ -2,4 +2,5 @@ TESTDLL = adsldp.dll
|
||||
IMPORTS = ole32 oleaut32 secur32 advapi32 uuid
|
||||
|
||||
C_SRCS = \
|
||||
+ ldap.c \
|
||||
sysinfo.c
|
||||
diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c
|
||||
new file mode 100644
|
||||
index 0000000000..36b128da20
|
||||
--- /dev/null
|
||||
+++ b/dlls/adsldp/tests/ldap.c
|
||||
@@ -0,0 +1,78 @@
|
||||
+/*
|
||||
+ * LDAPNamespace Tests
|
||||
+ *
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+#include "objbase.h"
|
||||
+#include "iads.h"
|
||||
+
|
||||
+#include "wine/test.h"
|
||||
+
|
||||
+#include "initguid.h"
|
||||
+DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
|
||||
+
|
||||
+static void test_LDAP(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ IUnknown *unk;
|
||||
+ IADs *ads;
|
||||
+ IADsOpenDSObject *ads_open;
|
||||
+ IDispatch *disp;
|
||||
+
|
||||
+ hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IADs, (void **)&ads);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+ IADs_Release(ads);
|
||||
+
|
||||
+ hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+
|
||||
+ hr = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **)&disp);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+ IDispatch_Release(disp);
|
||||
+
|
||||
+ hr = IUnknown_QueryInterface(unk, &IID_IADsOpenDSObject, (void **)&ads_open);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+ IADsOpenDSObject_Release(ads_open);
|
||||
+
|
||||
+ hr = IADsOpenDSObject_OpenDSObject(ads_open, (BSTR)L"LDAP:", NULL, NULL, ADS_SECURE_AUTHENTICATION, &disp);
|
||||
+todo_wine
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+if (hr == S_OK)
|
||||
+ IDispatch_Release(disp);
|
||||
+
|
||||
+ IUnknown_Release(unk);
|
||||
+}
|
||||
+
|
||||
+START_TEST(ldap)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = CoInitialize(NULL);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+
|
||||
+ test_LDAP();
|
||||
+
|
||||
+ CoUninitialize();
|
||||
+}
|
||||
diff --git a/dlls/adsldp/tests/sysinfo.c b/dlls/adsldp/tests/sysinfo.c
|
||||
index db982aa82f..cb250190f1 100644
|
||||
--- a/dlls/adsldp/tests/sysinfo.c
|
||||
+++ b/dlls/adsldp/tests/sysinfo.c
|
||||
@@ -216,4 +216,6 @@ START_TEST(sysinfo)
|
||||
test_ComputerName();
|
||||
test_UserName();
|
||||
test_sysinfo();
|
||||
+
|
||||
+ CoUninitialize();
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [40649] activeds: Implement ADsOpenObject.
|
||||
#Fixes: [42885] ADsOpenObject to bind to user's account/computer. (related)
|
@@ -1,47 +0,0 @@
|
||||
From 246cb6b72666dcb77fb2f553d318d7dabbe8811d Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 13:18:47 +0800
|
||||
Subject: advapi32: Prepend a hidden LSA_TRUST_INFORMATION in LsaLookupSids to
|
||||
avoid crash when Domains[-1] incorrectly accessed by application. (try 2)
|
||||
|
||||
---
|
||||
dlls/advapi32/lsa.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index 69c29c5..dfe25b3 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -488,14 +488,17 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
if (!(*Names = heap_alloc(name_fullsize))) return STATUS_NO_MEMORY;
|
||||
/* maximum count of stored domain infos is Count, allocate it like that cause really needed
|
||||
count could only be computed after sid data is retrieved */
|
||||
- domain_fullsize = sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION)*Count;
|
||||
+ domain_fullsize = sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION) * (Count + 1);
|
||||
if (!(*ReferencedDomains = heap_alloc(domain_fullsize)))
|
||||
{
|
||||
heap_free(*Names);
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
(*ReferencedDomains)->Entries = 0;
|
||||
- (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains + sizeof(LSA_REFERENCED_DOMAIN_LIST));
|
||||
+ (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains +
|
||||
+ sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION));
|
||||
+ (*ReferencedDomains)->Domains[-1].Sid = NULL;
|
||||
+ RtlInitUnicodeStringEx(&(*ReferencedDomains)->Domains[-1].Name, NULL);
|
||||
|
||||
/* Get full names data length and full length needed to store domain name and SID */
|
||||
for (i = 0; i < Count; i++)
|
||||
@@ -555,7 +558,8 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
|
||||
*ReferencedDomains = heap_realloc(*ReferencedDomains, domain_fullsize);
|
||||
/* fix pointer after reallocation */
|
||||
- (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains + sizeof(LSA_REFERENCED_DOMAIN_LIST));
|
||||
+ (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains +
|
||||
+ sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION));
|
||||
domain_data = (char*)(*ReferencedDomains)->Domains + sizeof(LSA_TRUST_INFORMATION)*Count;
|
||||
|
||||
mapped = 0;
|
||||
--
|
||||
2.3.5
|
||||
|
@@ -1,39 +0,0 @@
|
||||
From ce254ac3659e0c040136341d035629f99ec6d1ea Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 13:19:06 +0800
|
||||
Subject: advapi32: Prepend a hidden LSA_TRUST_INFORMATION in LsaLookupNames2
|
||||
to avoid crash when Domains[-1] incorrectly accessed by application. (try 2)
|
||||
|
||||
---
|
||||
dlls/advapi32/lsa.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index dfe25b3..258b8ca 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -404,14 +404,18 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
|
||||
sid = (SID *)(*sids + count);
|
||||
|
||||
/* use maximum domain count */
|
||||
- if (!(*domains = heap_alloc(sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION)*count +
|
||||
- sid_size_total + domainname_size_total*sizeof(WCHAR))))
|
||||
+ if (!(*domains = heap_alloc(sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION) * (count + 1) +
|
||||
+ sid_size_total + domainname_size_total * sizeof(WCHAR))))
|
||||
{
|
||||
heap_free(*sids);
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
(*domains)->Entries = 0;
|
||||
- (*domains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*domains + sizeof(LSA_REFERENCED_DOMAIN_LIST));
|
||||
+ (*domains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*domains +
|
||||
+ sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION));
|
||||
+ (*domains)->Domains[-1].Sid = NULL;
|
||||
+ RtlInitUnicodeStringEx(&(*domains)->Domains[-1].Name, NULL);
|
||||
+
|
||||
domain_data = (char*)(*domains)->Domains + sizeof(LSA_TRUST_INFORMATION)*count;
|
||||
|
||||
domain.Buffer = heap_alloc(domain_size_max*sizeof(WCHAR));
|
||||
--
|
||||
2.3.5
|
||||
|
@@ -1,68 +0,0 @@
|
||||
From 77d43d721793edda9b419f7426442a35f0cb5918 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 11:23:34 +0800
|
||||
Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
|
||||
|
||||
---
|
||||
dlls/advapi32/lsa.c | 31 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 31 insertions(+)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index 1b270a80829..b8dedbd6d58 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
+#include "sddl.h"
|
||||
#include "advapi32_misc.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
@@ -562,6 +563,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
domain.MaximumLength = sizeof(WCHAR);
|
||||
}
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ WCHAR *strsid = NULL;
|
||||
+
|
||||
+ if (ConvertSidToStringSidW(Sids[i], &strsid))
|
||||
+ {
|
||||
+ name_size = strlenW(strsid) + 1;
|
||||
+
|
||||
+ (*Names)[i].Name.Length = (name_size - 1) * sizeof(WCHAR);
|
||||
+ (*Names)[i].Name.MaximumLength = name_size * sizeof(WCHAR);
|
||||
+ name_fullsize += (*Names)[i].Name.MaximumLength;
|
||||
+
|
||||
+ LocalFree(strsid);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
/* now we have full length needed for both */
|
||||
@@ -605,6 +621,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
(*Names)[i].DomainIndex = lsa_reflist_add_domain(*ReferencedDomains, &domain, &domain_data);
|
||||
heap_free(domain.Buffer);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ WCHAR *strsid = NULL;
|
||||
+
|
||||
+ if (ConvertSidToStringSidW(Sids[i], &strsid))
|
||||
+ {
|
||||
+ name_size = strlenW(strsid) + 1;
|
||||
+ mapped++;
|
||||
+
|
||||
+ (*Names)[i].Name.Buffer = name_buffer;
|
||||
+ memcpy((*Names)[i].Name.Buffer, strsid, name_size * sizeof(WCHAR));
|
||||
+
|
||||
+ LocalFree(strsid);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
name_buffer += name_size;
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,56 +0,0 @@
|
||||
From 486ec8b5ea1b39195d92cfdbfe3a334280780a14 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 28 Apr 2015 23:00:08 +0800
|
||||
Subject: [PATCH] advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 7 +++++--
|
||||
dlls/advapi32/tests/security.c | 4 ++--
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index a7707f15d39..73c1f054d5c 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -187,7 +187,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m','
|
||||
static const WCHAR Domain_Computers[] = { 'D','o','m','a','i','n',' ','C','o','m','p','u','t','e','r','s',0 };
|
||||
static const WCHAR Domain_Controllers[] = { 'D','o','m','a','i','n',' ','C','o','n','t','r','o','l','l','e','r','s',0 };
|
||||
static const WCHAR Domain_Guests[] = { 'D','o','m','a','i','n',' ','G','u','e','s','t','s',0 };
|
||||
-static const WCHAR Domain_Users[] = { 'D','o','m','a','i','n',' ','U','s','e','r','s',0 };
|
||||
+static const WCHAR None[] = { 'N','o','n','e',0 };
|
||||
static const WCHAR Enterprise_Admins[] = { 'E','n','t','e','r','p','r','i','s','e',' ','A','d','m','i','n','s',0 };
|
||||
static const WCHAR ENTERPRISE_DOMAIN_CONTROLLERS[] = { 'E','N','T','E','R','P','R','I','S','E',' ','D','O','M','A','I','N',' ','C','O','N','T','R','O','L','L','E','R','S',0 };
|
||||
static const WCHAR Everyone[] = { 'E','v','e','r','y','o','n','e',0 };
|
||||
@@ -1185,7 +1185,10 @@ LookupAccountSidW(
|
||||
ac = Domain_Admins;
|
||||
break;
|
||||
case DOMAIN_GROUP_RID_USERS:
|
||||
- ac = Domain_Users;
|
||||
+ /* MSDN says the name of DOMAIN_GROUP_RID_USERS is Domain Users,
|
||||
+ * tests show that MSDN seems to be wrong. */
|
||||
+ ac = None;
|
||||
+ use = 2;
|
||||
break;
|
||||
case DOMAIN_GROUP_RID_GUESTS:
|
||||
ac = Domain_Guests;
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 5f65ed385dd..a9d745cfe39 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -3003,11 +3003,11 @@ static void test_process_security(void)
|
||||
dom_size = sizeof(domain);
|
||||
ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use );
|
||||
ok(ret, "LookupAccountSid failed with %d\n", ret);
|
||||
- todo_wine ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
|
||||
+ ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
|
||||
if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH)
|
||||
skip("Non-English locale (test with hardcoded 'None')\n");
|
||||
else
|
||||
- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account);
|
||||
+ ok(!strcmp(account, "None"), "expect None, got %s\n", account);
|
||||
|
||||
res = GetTokenInformation( token, TokenUser, NULL, 0, &size );
|
||||
ok(!res, "Expected failure, got %d\n", res);
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,3 +0,0 @@
|
||||
# Originally sent 2015 April by Qian Hong, apparently dropped off the list:
|
||||
# <https://www.winehq.org/pipermail/wine-patches/2015-April/138515.html>
|
||||
# Some of the patches were labeled as for Cygwin.
|
@@ -1,4 +1,4 @@
|
||||
From 8959c13f2be7e2a31f27c8483ee2202692f00710 Mon Sep 17 00:00:00 2001
|
||||
From 8fe522dadc480b57415a7b63e0752de113851231 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 01:45:29 +0200
|
||||
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
@@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
6 files changed, 117 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index d626e0bf2..5057e2b07 100644
|
||||
index 853da5c3fcf..33c1355c8b5 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1556,6 +1556,9 @@
|
||||
@@ -1569,6 +1569,9 @@
|
||||
# Virtual memory
|
||||
@ cdecl __wine_locked_recvmsg(long ptr long)
|
||||
|
||||
@@ -28,12 +28,12 @@ index d626e0bf2..5057e2b07 100644
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
@ cdecl wine_get_patches() NTDLL_wine_get_patches
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index ac1469412..6c2345c6c 100644
|
||||
index b62239de5b4..d494dc71263 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -89,6 +89,9 @@ extern void init_user_process_params( SIZE_T data_size ) DECLSPEC_HIDDEN;
|
||||
extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
|
||||
@@ -96,6 +96,9 @@ extern int __wine_main_argc;
|
||||
extern char **__wine_main_argv;
|
||||
extern WCHAR **__wine_main_wargv;
|
||||
|
||||
+/* token */
|
||||
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
|
||||
@@ -42,10 +42,10 @@ index ac1469412..6c2345c6c 100644
|
||||
extern timeout_t server_start_time DECLSPEC_HIDDEN;
|
||||
extern unsigned int server_cpus DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index 52d7ea429..e24691b8a 100644
|
||||
index 6d506c85306..9940e6cf7c9 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -125,6 +125,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
@@ -124,6 +124,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -71,10 +71,10 @@ index 52d7ea429..e24691b8a 100644
|
||||
|
||||
#define UNIMPLEMENTED_INFO_CLASS(c) \
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index e908f2131..0177cb579 100644
|
||||
index efacadac42b..434cd11baf0 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3734,6 +3734,14 @@ struct handle_info
|
||||
@@ -3749,6 +3749,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ index e908f2131..0177cb579 100644
|
||||
@REQ(create_completion)
|
||||
unsigned int access; /* desired access to a port */
|
||||
diff --git a/server/security.h b/server/security.h
|
||||
index 6c337143c..21e90ccf2 100644
|
||||
index 6c337143c3d..21e90ccf23f 100644
|
||||
--- a/server/security.h
|
||||
+++ b/server/security.h
|
||||
@@ -49,6 +49,7 @@ extern const PSID security_builtin_users_sid;
|
||||
@@ -102,10 +102,10 @@ index 6c337143c..21e90ccf2 100644
|
||||
|
||||
/* token functions */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 381ae6871..fcab79955 100644
|
||||
index c4f1cd943c2..970ed1838da 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -79,6 +79,7 @@ static const SID anonymous_logon_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORIT
|
||||
@@ -77,6 +77,7 @@ static const SID anonymous_logon_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORIT
|
||||
static const SID authenticated_user_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORITY }, { SECURITY_AUTHENTICATED_USER_RID } };
|
||||
static const SID local_system_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORITY }, { SECURITY_LOCAL_SYSTEM_RID } };
|
||||
static const SID high_label_sid = { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY }, { SECURITY_MANDATORY_HIGH_RID } };
|
||||
@@ -113,7 +113,7 @@ index 381ae6871..fcab79955 100644
|
||||
static const SID_N(5) local_user_sid = { SID_REVISION, 5, { SECURITY_NT_AUTHORITY }, { SECURITY_NT_NON_UNIQUE, 0, 0, 0, 1000 } };
|
||||
static const SID_N(2) builtin_admins_sid = { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS } };
|
||||
static const SID_N(2) builtin_users_sid = { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS } };
|
||||
@@ -95,6 +96,7 @@ const PSID security_builtin_admins_sid = (PSID)&builtin_admins_sid;
|
||||
@@ -93,6 +94,7 @@ const PSID security_builtin_admins_sid = (PSID)&builtin_admins_sid;
|
||||
const PSID security_builtin_users_sid = (PSID)&builtin_users_sid;
|
||||
const PSID security_domain_users_sid = (PSID)&domain_users_sid;
|
||||
const PSID security_high_label_sid = (PSID)&high_label_sid;
|
||||
@@ -121,7 +121,7 @@ index 381ae6871..fcab79955 100644
|
||||
|
||||
static luid_t prev_luid_value = { 1000, 0 };
|
||||
|
||||
@@ -917,6 +919,64 @@ struct token *token_create_admin( void )
|
||||
@@ -915,6 +917,64 @@ struct token *token_create_admin( void )
|
||||
return token;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ index 381ae6871..fcab79955 100644
|
||||
static struct privilege *token_find_privilege( struct token *token, const LUID *luid, int enabled_only )
|
||||
{
|
||||
struct privilege *privilege;
|
||||
@@ -1722,3 +1782,27 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
@@ -1720,3 +1780,27 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
release_object( token );
|
||||
}
|
||||
}
|
||||
@@ -215,5 +215,5 @@ index 381ae6871..fcab79955 100644
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.23.0
|
||||
2.26.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,149 @@
|
||||
From d0c4ac467f5e85e29ae407b29b6a93c85f375fd3 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 7 Jan 2020 14:22:49 -0600
|
||||
Subject: [PATCH] bcrypt: Implement BCRYPT_KDF_HASH.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47699
|
||||
Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
|
||||
---
|
||||
dlls/bcrypt/bcrypt_main.c | 110 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/bcrypt/tests/bcrypt.c | 2 +-
|
||||
2 files changed, 111 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 15b934247d..57d552a4c0 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1773,6 +1773,116 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE hSecret, LPCWSTR deriv_func
|
||||
return STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
+ if (flags)
|
||||
+ {
|
||||
+ FIXME("flags ignored: %08x\n", flags);
|
||||
+ }
|
||||
+
|
||||
+ if (!(strcmpW(deriv_func, BCRYPT_KDF_HASH)))
|
||||
+ {
|
||||
+ unsigned int i;
|
||||
+ BCryptBuffer *hash_algorithm = NULL;
|
||||
+ BCryptBuffer *secret_prepend = NULL;
|
||||
+ BCryptBuffer *secret_append = NULL;
|
||||
+ enum alg_id hash_alg_id;
|
||||
+ ULONG hash_length;
|
||||
+ struct hash_impl hash;
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
+ if (parameter)
|
||||
+ {
|
||||
+ for (i = 0; i < parameter->cBuffers; i++)
|
||||
+ {
|
||||
+ BCryptBuffer *cur_buffer = ¶meter->pBuffers[i];
|
||||
+ switch(cur_buffer->BufferType)
|
||||
+ {
|
||||
+ case KDF_HASH_ALGORITHM:
|
||||
+ if (hash_algorithm)
|
||||
+ FIXME("Duplicate KDF_HASH_ALGORITHM, untested\n");
|
||||
+ hash_algorithm = cur_buffer;
|
||||
+ break;
|
||||
+ case KDF_SECRET_PREPEND:
|
||||
+ if (secret_prepend)
|
||||
+ FIXME("Multiple prefixes unsupported\n");
|
||||
+ secret_prepend = cur_buffer;
|
||||
+ break;
|
||||
+ case KDF_SECRET_APPEND:
|
||||
+ if (secret_append)
|
||||
+ FIXME("Multiple suffixes unsupported\n");
|
||||
+ secret_append = cur_buffer;
|
||||
+ break;
|
||||
+ default:
|
||||
+ FIXME("Unsupported BCRYPT_KDF_HASH parameter type %x\n", cur_buffer->BufferType);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!(hash_algorithm))
|
||||
+ hash_alg_id = ALG_ID_SHA1;
|
||||
+ else
|
||||
+ {
|
||||
+ for (i = 0; i < ARRAY_SIZE( builtin_algorithms ); i++)
|
||||
+ {
|
||||
+ if (!strcmpW( hash_algorithm->pvBuffer, builtin_algorithms[i].name))
|
||||
+ {
|
||||
+ hash_alg_id = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (i == ARRAY_SIZE(builtin_algorithms))
|
||||
+ {
|
||||
+ WARN("Algorithm %s not found\n", debugstr_w(hash_algorithm->pvBuffer));
|
||||
+ return STATUS_NOT_SUPPORTED;
|
||||
+ }
|
||||
+ if (builtin_algorithms[hash_alg_id].class != BCRYPT_HASH_INTERFACE)
|
||||
+ {
|
||||
+ return STATUS_NOT_SUPPORTED;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ hash_length = builtin_algorithms[hash_alg_id].hash_length;
|
||||
+
|
||||
+ if (!derived)
|
||||
+ {
|
||||
+ *result = hash_length;
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+
|
||||
+ if ((status = hash_init(&hash, hash_alg_id)))
|
||||
+ {
|
||||
+ return status;
|
||||
+ }
|
||||
+
|
||||
+ if (secret_prepend)
|
||||
+ {
|
||||
+ hash_update(&hash, hash_alg_id, secret_prepend->pvBuffer, secret_prepend->cbBuffer);
|
||||
+ }
|
||||
+
|
||||
+ hash_update(&hash, hash_alg_id, secret->data, secret->len);
|
||||
+
|
||||
+ if (secret_append)
|
||||
+ {
|
||||
+ hash_update(&hash, hash_alg_id, secret_append->pvBuffer, secret_append->cbBuffer);
|
||||
+ }
|
||||
+
|
||||
+ if (derived_size >= hash_length)
|
||||
+ {
|
||||
+ hash_finish(&hash, hash_alg_id, derived, derived_size);
|
||||
+ *result = hash_length;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ UCHAR *output = heap_alloc(hash_length);
|
||||
+ hash_finish(&hash, hash_alg_id, output, hash_length);
|
||||
+ memcpy(derived, output, derived_size);
|
||||
+ heap_free(output);
|
||||
+ *result = derived_size;
|
||||
+ }
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+ else
|
||||
if (!(strcmpW(deriv_func, BCRYPT_KDF_RAW_SECRET)))
|
||||
{
|
||||
ULONG n;
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index d9509f2c49..edc59a8a97 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -2084,7 +2084,7 @@ static void test_ECDH(void)
|
||||
raw_secret_end:
|
||||
|
||||
status = pBCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
|
||||
- todo_wine ok (status == STATUS_SUCCESS, "got %08x\n", status);
|
||||
+ ok (status == STATUS_SUCCESS, "got %08x\n", status);
|
||||
|
||||
if (status != STATUS_SUCCESS)
|
||||
{
|
||||
--
|
||||
2.24.1
|
||||
|
2
patches/bcrypt-ECDHSecretAgreement/definition
Normal file
2
patches/bcrypt-ECDHSecretAgreement/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: [47699] Multiple games fail to connect to online services (missing BCryptSecretAgreement / BCryptDeriveKey implementation)
|
||||
|
@@ -1,2 +1 @@
|
||||
Fixes: [18154] cmd: Support for launching programs based on file association
|
||||
# Fixes: [36646]
|
||||
|
@@ -1,251 +0,0 @@
|
||||
From ebbaf56bdb75f853dafdbbffba81233784ecb618 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Sat, 4 May 2019 18:21:05 +0800
|
||||
Subject: [PATCH 1/2] comctl32: Switch to using a structure for extra storage.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
These patches aim to fix the bug 47018.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/static.c | 92 ++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 76 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
|
||||
index 5cc02ced97..d08710c06f 100644
|
||||
--- a/dlls/comctl32/static.c
|
||||
+++ b/dlls/comctl32/static.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "winuser.h"
|
||||
#include "commctrl.h"
|
||||
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "comctl32.h"
|
||||
@@ -50,10 +51,16 @@ static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
|
||||
-/* offsets for GetWindowLong for static private information */
|
||||
-#define HFONT_GWL_OFFSET 0
|
||||
-#define HICON_GWL_OFFSET (sizeof(HFONT))
|
||||
-#define STATIC_EXTRA_BYTES (HICON_GWL_OFFSET + sizeof(HICON))
|
||||
+struct static_extra_info
|
||||
+{
|
||||
+ HFONT hfont;
|
||||
+ union
|
||||
+ {
|
||||
+ HICON hicon;
|
||||
+ HBITMAP hbitmap;
|
||||
+ HENHMETAFILE hemf;
|
||||
+ } image;
|
||||
+};
|
||||
|
||||
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
|
||||
|
||||
@@ -80,6 +87,18 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] =
|
||||
STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */
|
||||
};
|
||||
|
||||
+static struct static_extra_info *get_extra_ptr( HWND hwnd, BOOL force )
|
||||
+{
|
||||
+ struct static_extra_info *extra = (struct static_extra_info *)GetWindowLongPtrW( hwnd, 0 );
|
||||
+ if (!extra && force)
|
||||
+ {
|
||||
+ extra = heap_alloc_zero( sizeof(*extra) );
|
||||
+ if (extra)
|
||||
+ SetWindowLongPtrW( hwnd, 0, (ULONG_PTR)extra );
|
||||
+ }
|
||||
+ return extra;
|
||||
+}
|
||||
+
|
||||
static BOOL get_icon_size( HICON handle, SIZE *size )
|
||||
{
|
||||
ICONINFO info;
|
||||
@@ -111,6 +130,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
{
|
||||
HICON prevIcon;
|
||||
SIZE size;
|
||||
+ struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_ICON) return 0;
|
||||
if (hicon && !get_icon_size( hicon, &size ))
|
||||
@@ -118,7 +138,12 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
WARN("hicon != 0, but invalid\n");
|
||||
return 0;
|
||||
}
|
||||
- prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ prevIcon = extra->image.hicon;
|
||||
+ extra->image.hicon = hicon;
|
||||
if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
/* Windows currently doesn't implement SS_RIGHTJUST */
|
||||
@@ -146,6 +171,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
{
|
||||
HBITMAP hOldBitmap;
|
||||
+ struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
|
||||
if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP)
|
||||
@@ -153,7 +179,12 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
WARN("hBitmap != 0, but it's not a bitmap\n");
|
||||
return 0;
|
||||
}
|
||||
- hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ hOldBitmap = extra->image.hbitmap;
|
||||
+ extra->image.hbitmap = hBitmap;
|
||||
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
BITMAP bm;
|
||||
@@ -183,13 +214,23 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
*/
|
||||
static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style )
|
||||
{
|
||||
+ HENHMETAFILE old_hemf;
|
||||
+ struct static_extra_info *extra;
|
||||
+
|
||||
if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0;
|
||||
if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE)
|
||||
{
|
||||
WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n");
|
||||
return 0;
|
||||
}
|
||||
- return (HENHMETAFILE)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hEnhMetaFile );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ old_hemf = extra->image.hemf;
|
||||
+ extra->image.hemf = hEnhMetaFile;
|
||||
+
|
||||
+ return old_hemf;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -200,6 +241,8 @@ static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile,
|
||||
*/
|
||||
static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
|
||||
{
|
||||
+ struct static_extra_info *extra;
|
||||
+
|
||||
switch (style & SS_TYPEMASK)
|
||||
{
|
||||
case SS_ICON:
|
||||
@@ -215,7 +258,22 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
- return (HANDLE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ return extra ? extra->image.hbitmap : 0;
|
||||
+}
|
||||
+
|
||||
+static void STATIC_SetFont( HWND hwnd, HFONT hfont )
|
||||
+{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (extra)
|
||||
+ extra->hfont = hfont;
|
||||
+}
|
||||
+
|
||||
+static HFONT STATIC_GetFont( HWND hwnd )
|
||||
+{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ return extra ? extra->hfont : 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -327,6 +385,8 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
case WM_NCDESTROY:
|
||||
if (style == SS_ICON)
|
||||
{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ heap_free( extra );
|
||||
/*
|
||||
* FIXME
|
||||
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
|
||||
@@ -423,14 +483,14 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
case WM_SETFONT:
|
||||
if (hasTextStyle( full_style ))
|
||||
{
|
||||
- SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
|
||||
+ STATIC_SetFont( hwnd, (HFONT)wParam );
|
||||
if (LOWORD(lParam))
|
||||
RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_GETFONT:
|
||||
- return GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
||||
+ return (LRESULT)STATIC_GetFont( hwnd );
|
||||
|
||||
case WM_NCHITTEST:
|
||||
if (full_style & SS_NOTIFY)
|
||||
@@ -508,7 +568,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
dis.itemData = 0;
|
||||
GetClientRect( hwnd, &dis.rcItem );
|
||||
|
||||
- font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
||||
+ font = STATIC_GetFont( hwnd );
|
||||
if (font) oldFont = SelectObject( hdc, font );
|
||||
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
|
||||
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
|
||||
@@ -572,7 +632,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
format |= DT_SINGLELINE | DT_WORD_ELLIPSIS;
|
||||
}
|
||||
|
||||
- if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET )))
|
||||
+ if ((hFont = STATIC_GetFont( hwnd )))
|
||||
hOldFont = SelectObject( hdc, hFont );
|
||||
|
||||
/* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned
|
||||
@@ -668,7 +728,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
|
||||
GetClientRect( hwnd, &rc );
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
- hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
|
||||
+ hIcon = STATIC_GetImage( hwnd, IMAGE_ICON, style );
|
||||
if (!hIcon || !get_icon_size( hIcon, &size ))
|
||||
{
|
||||
FillRect(hdc, &rc, hbrush);
|
||||
@@ -698,7 +758,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
||||
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
|
||||
- if ((hBitmap = (HBITMAP)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ))
|
||||
+ if ((hBitmap = STATIC_GetImage( hwnd, IMAGE_BITMAP, style ))
|
||||
&& (GetObjectType(hBitmap) == OBJ_BITMAP)
|
||||
&& (hMemDC = CreateCompatibleDC( hdc )))
|
||||
{
|
||||
@@ -742,7 +802,7 @@ static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style )
|
||||
GetClientRect(hwnd, &rc);
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
FillRect(hdc, &rc, hbrush);
|
||||
- if ((hEnhMetaFile = (HENHMETAFILE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )))
|
||||
+ if ((hEnhMetaFile = STATIC_GetImage( hwnd, IMAGE_ENHMETAFILE, style )))
|
||||
{
|
||||
/* The control's current font is not selected into the
|
||||
device context! */
|
||||
@@ -779,7 +839,7 @@ void STATIC_Register(void)
|
||||
wndClass.style = CS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS;
|
||||
wndClass.lpfnWndProc = STATIC_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
- wndClass.cbWndExtra = STATIC_EXTRA_BYTES;
|
||||
+ wndClass.cbWndExtra = sizeof(struct static_extra_info *);
|
||||
wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
|
||||
wndClass.hbrBackground = NULL;
|
||||
wndClass.lpszClassName = WC_STATICW;
|
||||
--
|
||||
2.20.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user