combase: Use public symbol for special PS context flag.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-09-14 17:30:24 +03:00 committed by Alexandre Julliard
parent 666c5b6e20
commit 5466a3dccf
4 changed files with 7 additions and 10 deletions

View File

@ -1017,12 +1017,12 @@ static enum comclass_threadingmodel get_threading_model(const struct class_reg_d
}
HRESULT apartment_get_inproc_class_object(struct apartment *apt, const struct class_reg_data *regdata,
REFCLSID rclsid, REFIID riid, BOOL hostifnecessary, void **ppv)
REFCLSID rclsid, REFIID riid, DWORD class_context, void **ppv)
{
WCHAR dllpath[MAX_PATH+1];
BOOL apartment_threaded;
if (hostifnecessary)
if (!(class_context & CLSCTX_PS_DLL))
{
enum comclass_threadingmodel model = get_threading_model(regdata);

View File

@ -1589,8 +1589,7 @@ static HRESULT com_get_class_object(REFCLSID rclsid, DWORD clscontext,
clsreg.u.actctx.threading_model = comclass->model;
clsreg.origin = CLASS_REG_ACTCTX;
hr = apartment_get_inproc_class_object(apt, &clsreg, &comclass->clsid, riid,
!(clscontext & WINE_CLSCTX_DONT_HOST), obj);
hr = apartment_get_inproc_class_object(apt, &clsreg, &comclass->clsid, riid, clscontext, obj);
ReleaseActCtx(data.hActCtx);
apartment_release(apt);
return hr;
@ -1631,7 +1630,7 @@ static HRESULT com_get_class_object(REFCLSID rclsid, DWORD clscontext,
clsreg.u.hkey = hkey;
clsreg.origin = CLASS_REG_REGISTRY;
hr = apartment_get_inproc_class_object(apt, &clsreg, rclsid, riid, !(clscontext & WINE_CLSCTX_DONT_HOST), obj);
hr = apartment_get_inproc_class_object(apt, &clsreg, rclsid, riid, clscontext, obj);
RegCloseKey(hkey);
}
@ -1666,7 +1665,7 @@ static HRESULT com_get_class_object(REFCLSID rclsid, DWORD clscontext,
clsreg.u.hkey = hkey;
clsreg.origin = CLASS_REG_REGISTRY;
hr = apartment_get_inproc_class_object(apt, &clsreg, rclsid, riid, !(clscontext & WINE_CLSCTX_DONT_HOST), obj);
hr = apartment_get_inproc_class_object(apt, &clsreg, rclsid, riid, clscontext, obj);
RegCloseKey(hkey);
}

View File

@ -61,7 +61,6 @@ HRESULT open_appidkey_from_clsid(REFCLSID clsid, REGSAM access, HKEY *subkey) DE
#define DM_EXECUTERPC (WM_USER + 0) /* WPARAM = 0, LPARAM = (struct dispatch_params *) */
#define DM_HOSTOBJECT (WM_USER + 1) /* WPARAM = 0, LPARAM = (struct host_object_params *) */
#define WINE_CLSCTX_DONT_HOST 0x80000000
#define CHARS_IN_GUID 39
/* this is what is stored in TEB->ReservedForOle */
@ -156,7 +155,7 @@ HRESULT apartment_increment_mta_usage(CO_MTA_USAGE_COOKIE *cookie) DECLSPEC_HIDD
void apartment_decrement_mta_usage(CO_MTA_USAGE_COOKIE cookie) DECLSPEC_HIDDEN;
struct apartment * apartment_get_mta(void) DECLSPEC_HIDDEN;
HRESULT apartment_get_inproc_class_object(struct apartment *apt, const struct class_reg_data *regdata,
REFCLSID rclsid, REFIID riid, BOOL hostifnecessary, void **ppv) DECLSPEC_HIDDEN;
REFCLSID rclsid, REFIID riid, DWORD class_context, void **ppv) DECLSPEC_HIDDEN;
HRESULT apartment_get_local_server_stream(struct apartment *apt, IStream **ret) DECLSPEC_HIDDEN;
IUnknown *com_get_registered_class_object(const struct apartment *apartment, REFCLSID rclsid,
DWORD clscontext) DECLSPEC_HIDDEN;

View File

@ -881,8 +881,7 @@ static inline HRESULT get_facbuf_for_iid(REFIID riid, IPSFactoryBuffer **facbuf)
hr = CoGetPSClsid(riid, &clsid);
if (hr != S_OK)
return hr;
return CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER | WINE_CLSCTX_DONT_HOST,
NULL, &IID_IPSFactoryBuffer, (LPVOID*)facbuf);
return CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER | CLSCTX_PS_DLL, NULL, &IID_IPSFactoryBuffer, (void **)facbuf);
}
/* marshals an object into a STDOBJREF structure */