[PATCH 1/5] ole32: Get rid of typedef'ed type for apartment structure.

Nikolay Sivov nsivov at codeweavers.com
Tue Aug 25 10:18:13 CDT 2020


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/ole32/compobj.c         | 56 ++++++++++++++++++------------------
 dlls/ole32/compobj_private.h | 24 ++++++++--------
 dlls/ole32/marshal.c         | 19 ++++++------
 dlls/ole32/rpc.c             | 10 +++----
 dlls/ole32/stubmanager.c     | 26 ++++++++---------
 5 files changed, 67 insertions(+), 68 deletions(-)

diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index d45cbcc1734..4bd8c2474b6 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -71,8 +71,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
  * This section defines variables internal to the COM module.
  */
 
-static APARTMENT *MTA; /* protected by csApartment */
-static APARTMENT *MainApartment; /* the first STA apartment */
+static struct apartment *MTA; /* protected by csApartment */
+static struct apartment *MainApartment; /* the first STA apartment */
 static struct list apts = LIST_INIT( apts ); /* protected by csApartment */
 
 static CRITICAL_SECTION csApartment;
@@ -174,7 +174,7 @@ struct LocalServer
 {
     IServiceProvider IServiceProvider_iface;
     LONG ref;
-    APARTMENT *apt;
+    struct apartment *apt;
     IStream *marshal_stream;
 };
 
@@ -608,9 +608,9 @@ static DWORD apartment_addref(struct apartment *apt)
 
 /* allocates memory and fills in the necessary fields for a new apartment
  * object. must be called inside apartment cs */
-static APARTMENT *apartment_construct(DWORD model)
+static struct apartment *apartment_construct(DWORD model)
 {
-    APARTMENT *apt;
+    struct apartment *apt;
 
     TRACE("creating new apartment, model=%d\n", model);
 
@@ -651,9 +651,9 @@ static APARTMENT *apartment_construct(DWORD model)
 /* gets and existing apartment if one exists or otherwise creates an apartment
  * structure which stores OLE apartment-local information and stores a pointer
  * to it in the thread-local storage */
-static APARTMENT *apartment_get_or_create(DWORD model)
+static struct apartment *apartment_get_or_create(DWORD model)
 {
-    APARTMENT *apt = COM_CurrentApt();
+    struct apartment *apt = COM_CurrentApt();
 
     if (!apt)
     {
@@ -699,7 +699,7 @@ static APARTMENT *apartment_get_or_create(DWORD model)
     return apt;
 }
 
-static inline BOOL apartment_is_model(const APARTMENT *apt, DWORD model)
+static inline BOOL apartment_is_model(const struct apartment *apt, DWORD model)
 {
     return (apt->multi_threaded == !(model & COINIT_APARTMENTTHREADED));
 }
@@ -707,9 +707,9 @@ static inline BOOL apartment_is_model(const APARTMENT *apt, DWORD model)
 /* gets the multi-threaded apartment if it exists. The caller must
  * release the reference from the apartment as soon as the apartment pointer
  * is no longer required. */
-static APARTMENT *apartment_find_mta(void)
+static struct apartment *apartment_find_mta(void)
 {
-    APARTMENT *apt;
+    struct apartment *apt;
 
     EnterCriticalSection(&csApartment);
 
@@ -723,9 +723,9 @@ static APARTMENT *apartment_find_mta(void)
 
 /* Return the current apartment if it exists, or, failing that, the MTA. Caller
  * must free the returned apartment in either case. */
-APARTMENT *apartment_get_current_or_mta(void)
+struct apartment *apartment_get_current_or_mta(void)
 {
-    APARTMENT *apt = COM_CurrentApt();
+    struct apartment *apt = COM_CurrentApt();
     if (apt)
     {
         apartment_addref(apt);
@@ -959,7 +959,7 @@ static ULONG WINAPI LocalServer_Release(IServiceProvider *iface)
 static HRESULT WINAPI LocalServer_QueryService(IServiceProvider *iface, REFGUID guid, REFIID riid, void **ppv)
 {
     LocalServer *This = impl_from_IServiceProvider(iface);
-    APARTMENT *apt = COM_CurrentApt();
+    struct apartment *apt = COM_CurrentApt();
     RegisteredClass *iter;
     HRESULT hres = E_FAIL;
 
@@ -991,7 +991,7 @@ static const IServiceProviderVtbl LocalServerVtbl = {
     LocalServer_QueryService
 };
 
-static HRESULT get_local_server_stream(APARTMENT *apt, IStream **ret)
+static HRESULT get_local_server_stream(struct apartment *apt, IStream **ret)
 {
     HRESULT hres = S_OK;
 
@@ -1057,7 +1057,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(
 {
   HRESULT hr = E_INVALIDARG;
   RegisteredClass *curClass;
-  APARTMENT *apt;
+  struct apartment *apt;
 
   TRACE("(%08x)\n",dwRegister);
 
@@ -1242,9 +1242,9 @@ DWORD apartment_release(struct apartment *apt)
  * The ref parameter is here mostly to ensure people remember that
  * they get one, you should normally take a ref for thread safety.
  */
-APARTMENT *apartment_findfromoxid(OXID oxid, BOOL ref)
+struct apartment *apartment_findfromoxid(OXID oxid, BOOL ref)
 {
-    APARTMENT *result = NULL;
+    struct apartment *result = NULL;
     struct list *cursor;
 
     EnterCriticalSection(&csApartment);
@@ -1266,9 +1266,9 @@ APARTMENT *apartment_findfromoxid(OXID oxid, BOOL ref)
 /* gets the apartment which has a given creator thread ID. The caller must
  * release the reference from the apartment as soon as the apartment pointer
  * is no longer required. */
-APARTMENT *apartment_findfromtid(DWORD tid)
+struct apartment *apartment_findfromtid(DWORD tid)
 {
-    APARTMENT *result = NULL;
+    struct apartment *result = NULL;
     struct list *cursor;
 
     EnterCriticalSection(&csApartment);
@@ -1290,9 +1290,9 @@ APARTMENT *apartment_findfromtid(DWORD tid)
 /* gets the main apartment if it exists. The caller must
  * release the reference from the apartment as soon as the apartment pointer
  * is no longer required. */
-static APARTMENT *apartment_findmain(void)
+static struct apartment *apartment_findmain(void)
 {
-    APARTMENT *result;
+    struct apartment *result;
 
     EnterCriticalSection(&csApartment);
 
@@ -1548,7 +1548,7 @@ static HRESULT apartment_hostobject_in_hostapt(
 
     if (!multi_threaded && main_apartment)
     {
-        APARTMENT *host_apt = apartment_findmain();
+        struct apartment *host_apt = apartment_findmain();
         if (host_apt)
         {
             apartment_hwnd = apartment_getwindow(host_apt);
@@ -1601,7 +1601,7 @@ static HRESULT apartment_hostobject_in_hostapt(
      * us to create the thread for the host apartment */
     if (!apartment_hwnd && !multi_threaded && main_apartment)
     {
-        APARTMENT *host_apt = apartment_findmain();
+        struct apartment *host_apt = apartment_findmain();
         if (host_apt)
         {
             apartment_hwnd = apartment_getwindow(host_apt);
@@ -2008,7 +2008,7 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
     struct stub_manager *manager;
     HRESULT hr;
     IMarshal *marshal;
-    APARTMENT *apt;
+    struct apartment *apt;
 
     TRACE("(%p, 0x%08x)\n", lpUnk, reserved);
 
@@ -2203,7 +2203,7 @@ HRESULT WINAPI CoRegisterClassObject(
   RegisteredClass* newClass;
   LPUNKNOWN        foundObject;
   HRESULT          hr;
-  APARTMENT *apt;
+  struct apartment *apt;
 
   TRACE("(%s,%p,0x%08x,0x%08x,%p)\n",
 	debugstr_guid(rclsid),pUnk,dwClsContext,flags,lpdwRegister);
@@ -2321,7 +2321,7 @@ static enum comclass_threadingmodel get_threading_model(const struct class_reg_d
         return data->u.actctx.threading_model;
 }
 
-static HRESULT get_inproc_class_object(APARTMENT *apt, const struct class_reg_data *regdata,
+static HRESULT get_inproc_class_object(struct apartment *apt, const struct class_reg_data *regdata,
                                        REFCLSID rclsid, REFIID riid,
                                        BOOL hostifnecessary, void **ppv)
 {
@@ -2405,7 +2405,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(
     struct class_reg_data clsreg = { 0 };
     IUnknown *regClassObject;
     HRESULT	hres = E_UNEXPECTED;
-    APARTMENT  *apt;
+    struct apartment *apt;
 
     TRACE("CLSID: %s,IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid));
 
@@ -3150,7 +3150,7 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier)
 {
     struct oletls *info = COM_CurrentInfo();
-    APARTMENT *apt;
+    struct apartment *apt;
 
     TRACE("(%p, %p)\n", type, qualifier);
 
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h
index 003cf767cb4..7958b119bc2 100644
--- a/dlls/ole32/compobj_private.h
+++ b/dlls/ole32/compobj_private.h
@@ -40,7 +40,6 @@
 #include "winternl.h"
 
 struct apartment;
-typedef struct apartment APARTMENT;
 typedef struct LocalServer LocalServer;
 
 DEFINE_OLEGUID( CLSID_DfMarshal, 0x0000030b, 0, 0 );
@@ -89,7 +88,7 @@ struct stub_manager
     struct list       entry;      /* entry in apartment stubmgr list (CS apt->cs) */
     struct list       ifstubs;    /* list of active ifstubs for the object (CS lock) */
     CRITICAL_SECTION  lock;
-    APARTMENT        *apt;        /* owning apt (RO) */
+    struct apartment *apt;        /* owning apt (RO) */
 
     ULONG             extrefs;    /* number of 'external' references (CS lock) */
     ULONG             refs;       /* internal reference count (CS apt->cs) */
@@ -203,17 +202,18 @@ ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL tablewea
 struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *sb, REFIID iid,
      DWORD dest_context, void *dest_context_data, MSHLFLAGS flags) DECLSPEC_HIDDEN;
 struct ifstub *stub_manager_find_ifstub(struct stub_manager *m, REFIID iid, MSHLFLAGS flags) DECLSPEC_HIDDEN;
-struct stub_manager *get_stub_manager(APARTMENT *apt, OID oid) DECLSPEC_HIDDEN;
-struct stub_manager *get_stub_manager_from_object(APARTMENT *apt, IUnknown *object, BOOL alloc) DECLSPEC_HIDDEN;
+struct stub_manager *get_stub_manager(struct apartment *apt, OID oid) DECLSPEC_HIDDEN;
+struct stub_manager *get_stub_manager_from_object(struct apartment *apt, IUnknown *object, BOOL alloc) DECLSPEC_HIDDEN;
 BOOL stub_manager_notify_unmarshal(struct stub_manager *m, const IPID *ipid) DECLSPEC_HIDDEN;
 BOOL stub_manager_is_table_marshaled(struct stub_manager *m, const IPID *ipid) DECLSPEC_HIDDEN;
 void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const IPID *ipid, BOOL tableweak) DECLSPEC_HIDDEN;
 void stub_manager_disconnect(struct stub_manager *m) DECLSPEC_HIDDEN;
-HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt, struct stub_manager **manager, IRpcStubBuffer **stub,
+HRESULT ipid_get_dispatch_params(const IPID *ipid, struct apartment **stub_apt, struct stub_manager **manager, IRpcStubBuffer **stub,
                                  IRpcChannelBuffer **chan, IID *iid, IUnknown **iface) DECLSPEC_HIDDEN;
-HRESULT start_apartment_remote_unknown(APARTMENT *apt) DECLSPEC_HIDDEN;
+HRESULT start_apartment_remote_unknown(struct apartment *apt) DECLSPEC_HIDDEN;
 
-HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *obj, DWORD dest_context, void *dest_context_data, MSHLFLAGS mshlflags) DECLSPEC_HIDDEN;
+HRESULT marshal_object(struct apartment *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *obj, DWORD dest_context,
+        void *dest_context_data, MSHLFLAGS mshlflags) DECLSPEC_HIDDEN;
 
 /* RPC Backend */
 
@@ -223,7 +223,7 @@ void    RPC_StartRemoting(struct apartment *apt) DECLSPEC_HIDDEN;
 HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
                                 const OXID_INFO *oxid_info, const IID *iid,
                                 DWORD dest_context, void *dest_context_data,
-                                IRpcChannelBuffer **chan, APARTMENT *apt) DECLSPEC_HIDDEN;
+                                IRpcChannelBuffer **chan, struct apartment *apt) DECLSPEC_HIDDEN;
 HRESULT RPC_CreateServerChannel(DWORD dest_context, void *dest_context_data, IRpcChannelBuffer **chan) DECLSPEC_HIDDEN;
 void    RPC_ExecuteCall(struct dispatch_params *params) DECLSPEC_HIDDEN;
 HRESULT RPC_RegisterInterface(REFIID riid) DECLSPEC_HIDDEN;
@@ -246,8 +246,8 @@ void OLEDD_UnInitialize(void) DECLSPEC_HIDDEN;
 
 /* Apartment Functions */
 
-APARTMENT *apartment_findfromoxid(OXID oxid, BOOL ref) DECLSPEC_HIDDEN;
-APARTMENT *apartment_findfromtid(DWORD tid) DECLSPEC_HIDDEN;
+struct apartment *apartment_findfromoxid(OXID oxid, BOOL ref) DECLSPEC_HIDDEN;
+struct apartment *apartment_findfromtid(DWORD tid) DECLSPEC_HIDDEN;
 DWORD apartment_release(struct apartment *apt) DECLSPEC_HIDDEN;
 HRESULT apartment_disconnectproxies(struct apartment *apt) DECLSPEC_HIDDEN;
 static inline HRESULT apartment_getoxid(const struct apartment *apt, OXID *oxid)
@@ -259,7 +259,7 @@ HRESULT apartment_createwindowifneeded(struct apartment *apt) DECLSPEC_HIDDEN;
 HWND apartment_getwindow(const struct apartment *apt) DECLSPEC_HIDDEN;
 HRESULT enter_apartment(struct oletls *info, DWORD model) DECLSPEC_HIDDEN;
 void leave_apartment(struct oletls *info) DECLSPEC_HIDDEN;
-APARTMENT *apartment_get_current_or_mta(void) DECLSPEC_HIDDEN;
+struct apartment *apartment_get_current_or_mta(void) DECLSPEC_HIDDEN;
 
 /* DCOM messages used by the apartment window (not compatible with native) */
 #define DM_EXECUTERPC   (WM_USER + 0) /* WPARAM = 0, LPARAM = (struct dispatch_params *) */
@@ -282,7 +282,7 @@ static inline struct oletls *COM_CurrentInfo(void)
     return NtCurrentTeb()->ReservedForOle;
 }
 
-static inline APARTMENT* COM_CurrentApt(void)
+static inline struct apartment * COM_CurrentApt(void)
 {  
     return COM_CurrentInfo()->apt;
 }
diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c
index 343d1c834f7..9fb68e66f07 100644
--- a/dlls/ole32/marshal.c
+++ b/dlls/ole32/marshal.c
@@ -85,7 +85,7 @@ static inline struct proxy_manager *impl_from_IClientSecurity( IClientSecurity *
     return CONTAINING_RECORD(iface, struct proxy_manager, IClientSecurity_iface);
 }
 
-static HRESULT unmarshal_object(const STDOBJREF *stdobjref, APARTMENT *apt,
+static HRESULT unmarshal_object(const STDOBJREF *stdobjref, struct apartment *apt,
                                 MSHCTX dest_context, void *dest_context_data,
                                 REFIID riid, const OXID_INFO *oxid_info,
                                 void **object);
@@ -118,7 +118,7 @@ static inline HRESULT get_facbuf_for_iid(REFIID riid, IPSFactoryBuffer **facbuf)
 }
 
 /* marshals an object into a STDOBJREF structure */
-HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *object,
+HRESULT marshal_object(struct apartment *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *object,
     DWORD dest_context, void *dest_context_data, MSHLFLAGS mshlflags)
 {
     struct stub_manager *manager;
@@ -310,7 +310,7 @@ static HRESULT WINAPI ClientIdentity_QueryMultipleInterfaces(IMultiQI *iface, UL
          * the interfaces were returned */
         if (SUCCEEDED(hr))
         {
-            APARTMENT *apt = apartment_get_current_or_mta();
+            struct apartment *apt = apartment_get_current_or_mta();
 
             /* try to unmarshal each object returned to us */
             for (i = 0; i < nonlocal_mqis; i++)
@@ -791,7 +791,7 @@ static void ifproxy_destroy(struct ifproxy * This)
 }
 
 static HRESULT proxy_manager_construct(
-    APARTMENT * apt, ULONG sorflags, OXID oxid, OID oid,
+    struct apartment * apt, ULONG sorflags, OXID oxid, OID oid,
     const OXID_INFO *oxid_info, struct proxy_manager ** proxy_manager)
 {
     struct proxy_manager * This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
@@ -1197,7 +1197,7 @@ static void proxy_manager_destroy(struct proxy_manager * This)
 /* finds the proxy manager corresponding to a given OXID and OID that has
  * been unmarshaled in the specified apartment. The caller must release the
  * reference to the proxy_manager when the object is no longer used. */
-static BOOL find_proxy_manager(APARTMENT * apt, OXID oxid, OID oid, struct proxy_manager ** proxy_found)
+static BOOL find_proxy_manager(struct apartment * apt, OXID oxid, OID oid, struct proxy_manager ** proxy_found)
 {
     BOOL found = FALSE;
     struct list * cursor;
@@ -1306,7 +1306,7 @@ StdMarshalImpl_MarshalInterface(
 {
     ULONG                 res;
     HRESULT               hres;
-    APARTMENT *apt;
+    struct apartment *apt;
     OBJREF objref;
 
     TRACE("(...,%s,...)\n", debugstr_guid(riid));
@@ -1337,7 +1337,7 @@ StdMarshalImpl_MarshalInterface(
 /* helper for StdMarshalImpl_UnmarshalInterface - does the unmarshaling with
  * no questions asked about the rules surrounding same-apartment unmarshals
  * and table marshaling */
-static HRESULT unmarshal_object(const STDOBJREF *stdobjref, APARTMENT *apt,
+static HRESULT unmarshal_object(const STDOBJREF *stdobjref, struct apartment *apt,
                                 MSHCTX dest_context, void *dest_context_data,
                                 REFIID riid, const OXID_INFO *oxid_info,
                                 void **object)
@@ -1413,8 +1413,7 @@ static HRESULT std_unmarshal_interface(MSHCTX dest_context, void *dest_context_d
     struct OR_STANDARD obj;
     ULONG res;
     HRESULT hres;
-    APARTMENT *apt;
-    APARTMENT *stub_apt;
+    struct apartment *apt, *stub_apt;
     OXID oxid;
 
     TRACE("(...,%s,....)\n", debugstr_guid(riid));
@@ -1540,7 +1539,7 @@ static HRESULT std_release_marshal_data(IStream *pStm)
     ULONG                res;
     HRESULT              hres;
     struct stub_manager *stubmgr;
-    APARTMENT           *apt;
+    struct apartment    *apt;
 
     hres = IStream_Read(pStm, &obj, FIELD_OFFSET(struct OR_STANDARD, saResAddr.aStringArray), &res);
     if (hres != S_OK) return STG_E_READFAULT;
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index bd825fd6c10..d0b0f49319d 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -630,7 +630,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
     ULONG extension_count;
     IPID ipid;
     HRESULT hr;
-    APARTMENT *apt = NULL;
+    struct apartment *apt = NULL;
 
     TRACE("(%p)->(%p,%s)\n", This, olemsg, debugstr_guid(riid));
 
@@ -803,7 +803,7 @@ static DWORD WINAPI rpc_sendreceive_thread(LPVOID param)
     return 0;
 }
 
-static inline HRESULT ClientRpcChannelBuffer_IsCorrectApartment(ClientRpcChannelBuffer *This, APARTMENT *apt)
+static inline HRESULT ClientRpcChannelBuffer_IsCorrectApartment(ClientRpcChannelBuffer *This, struct apartment *apt)
 {
     OXID oxid;
     if (!apt)
@@ -827,7 +827,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
     ORPC_EXTENT_ARRAY orpc_ext_array;
     WIRE_ORPC_EXTENT *first_wire_orpc_extent = NULL;
     HRESULT hrFault = S_OK;
-    APARTMENT *apt = apartment_get_current_or_mta();
+    struct apartment *apt = apartment_get_current_or_mta();
 
     TRACE("(%p) iMethod=%d\n", olemsg, olemsg->iMethod);
 
@@ -1095,7 +1095,7 @@ static const IRpcChannelBufferVtbl ServerRpcChannelBufferVtbl =
 HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
                                 const OXID_INFO *oxid_info, const IID *iid,
                                 DWORD dest_context, void *dest_context_data,
-                                IRpcChannelBuffer **chan, APARTMENT *apt)
+                                IRpcChannelBuffer **chan, struct apartment *apt)
 {
     ClientRpcChannelBuffer *This;
     WCHAR                   endpoint[200];
@@ -1444,7 +1444,7 @@ static void __RPC_STUB dispatch_rpc(RPC_MESSAGE *msg)
 {
     struct dispatch_params *params;
     struct stub_manager *stub_manager;
-    APARTMENT *apt;
+    struct apartment *apt;
     IPID ipid;
     HRESULT hr;
 
diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c
index 5f604d42910..16f9c3dc52c 100644
--- a/dlls/ole32/stubmanager.c
+++ b/dlls/ole32/stubmanager.c
@@ -177,7 +177,7 @@ struct ifstub *stub_manager_find_ifstub(struct stub_manager *m, REFIID iid, MSHL
 /* creates a new stub manager and adds it into the apartment. caller must
  * release stub manager when it is no longer required. the apartment and
  * external refs together take one implicit ref */
-static struct stub_manager *new_stub_manager(APARTMENT *apt, IUnknown *object)
+static struct stub_manager *new_stub_manager(struct apartment *apt, IUnknown *object)
 {
     struct stub_manager *sm;
     HRESULT hres;
@@ -311,7 +311,7 @@ static ULONG stub_manager_int_addref(struct stub_manager *This)
 ULONG stub_manager_int_release(struct stub_manager *This)
 {
     ULONG refs;
-    APARTMENT *apt = This->apt;
+    struct apartment *apt = This->apt;
 
     EnterCriticalSection(&apt->cs);
     refs = --This->refs;
@@ -334,7 +334,7 @@ ULONG stub_manager_int_release(struct stub_manager *This)
 /* gets the stub manager associated with an object - caller must have
  * a reference to the apartment while a reference to the stub manager is held.
  * it must also call release on the stub manager when it is no longer needed */
-struct stub_manager *get_stub_manager_from_object(APARTMENT *apt, IUnknown *obj, BOOL alloc)
+struct stub_manager *get_stub_manager_from_object(struct apartment *apt, IUnknown *obj, BOOL alloc)
 {
     struct stub_manager *result = NULL;
     struct list         *cursor;
@@ -377,7 +377,7 @@ struct stub_manager *get_stub_manager_from_object(APARTMENT *apt, IUnknown *obj,
 /* gets the stub manager associated with an object id - caller must have
  * a reference to the apartment while a reference to the stub manager is held.
  * it must also call release on the stub manager when it is no longer needed */
-struct stub_manager *get_stub_manager(APARTMENT *apt, OID oid)
+struct stub_manager *get_stub_manager(struct apartment *apt, OID oid)
 {
     struct stub_manager *result = NULL;
     struct list         *cursor;
@@ -471,7 +471,7 @@ ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL tablewea
 /* gets the stub manager associated with an ipid - caller must have
  * a reference to the apartment while a reference to the stub manager is held.
  * it must also call release on the stub manager when it is no longer needed */
-static struct stub_manager *get_stub_manager_from_ipid(APARTMENT *apt, const IPID *ipid, struct ifstub **ifstub)
+static struct stub_manager *get_stub_manager_from_ipid(struct apartment *apt, const IPID *ipid, struct ifstub **ifstub)
 {
     struct stub_manager *result = NULL;
     struct list         *cursor;
@@ -498,7 +498,7 @@ static struct stub_manager *get_stub_manager_from_ipid(APARTMENT *apt, const IPI
     return result;
 }
 
-static HRESULT ipid_to_ifstub(const IPID *ipid, APARTMENT **stub_apt,
+static HRESULT ipid_to_ifstub(const IPID *ipid, struct apartment **stub_apt,
                               struct stub_manager **stubmgr_ret, struct ifstub **ifstub)
 {
     /* FIXME: hack for IRemUnknown */
@@ -521,7 +521,7 @@ static HRESULT ipid_to_ifstub(const IPID *ipid, APARTMENT **stub_apt,
     return S_OK;
 }
 
-static HRESULT ipid_to_stub_manager(const IPID *ipid, APARTMENT **stub_apt, struct stub_manager **stub)
+static HRESULT ipid_to_stub_manager(const IPID *ipid, struct apartment **stub_apt, struct stub_manager **stub)
 {
     struct ifstub *ifstub;
     return ipid_to_ifstub(ipid, stub_apt, stub, &ifstub);
@@ -530,14 +530,14 @@ static HRESULT ipid_to_stub_manager(const IPID *ipid, APARTMENT **stub_apt, stru
 /* gets the apartment, stub and channel of an object. the caller must
  * release the references to all objects (except iface) if the function
  * returned success, otherwise no references are returned. */
-HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt,
+HRESULT ipid_get_dispatch_params(const IPID *ipid, struct apartment **stub_apt,
                                  struct stub_manager **manager,
                                  IRpcStubBuffer **stub, IRpcChannelBuffer **chan,
                                  IID *iid, IUnknown **iface)
 {
     struct stub_manager *stubmgr;
     struct ifstub *ifstub;
-    APARTMENT *apt;
+    struct apartment *apt;
     HRESULT hr;
 
     hr = ipid_to_ifstub(ipid, &apt, &stubmgr, &ifstub);
@@ -703,7 +703,7 @@ static HRESULT WINAPI RemUnknown_RemQueryInterface(IRemUnknown *iface,
     HRESULT hr;
     USHORT i;
     USHORT successful_qis = 0;
-    APARTMENT *apt;
+    struct apartment *apt;
     struct stub_manager *stubmgr;
     struct ifstub *ifstub;
     DWORD dest_context;
@@ -750,7 +750,7 @@ static HRESULT WINAPI RemUnknown_RemAddRef(IRemUnknown *iface,
 
     for (i = 0; i < cInterfaceRefs; i++)
     {
-        APARTMENT *apt;
+        struct apartment *apt;
         struct stub_manager *stubmgr;
 
         pResults[i] = ipid_to_stub_manager(&InterfaceRefs[i].ipid, &apt, &stubmgr);
@@ -782,7 +782,7 @@ static HRESULT WINAPI RemUnknown_RemRelease(IRemUnknown *iface,
 
     for (i = 0; i < cInterfaceRefs; i++)
     {
-        APARTMENT *apt;
+        struct apartment *apt;
         struct stub_manager *stubmgr;
 
         hr = ipid_to_stub_manager(&InterfaceRefs[i].ipid, &apt, &stubmgr);
@@ -815,7 +815,7 @@ static const IRemUnknownVtbl RemUnknown_Vtbl =
 };
 
 /* starts the IRemUnknown listener for the current apartment */
-HRESULT start_apartment_remote_unknown(APARTMENT *apt)
+HRESULT start_apartment_remote_unknown(struct apartment *apt)
 {
     IRemUnknown *pRemUnknown;
     HRESULT hr = S_OK;
-- 
2.28.0




More information about the wine-devel mailing list