Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8333eaa9
Commit
8333eaa9
authored
Dec 05, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
itss: Standardize the COM usage in itss.c.
parent
dcef7c3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
+31
-21
itss.c
dlls/itss/itss.c
+31
-21
No files found.
dlls/itss/itss.c
View file @
8333eaa9
...
...
@@ -67,14 +67,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
* ITSS ClassFactory
*/
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
IClassFactory
IClassFactory_iface
;
HRESULT
(
*
pfnCreateInstance
)(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
}
IClassFactoryImpl
;
static
inline
IClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IClassFactoryImpl
,
IClassFactory_iface
);
}
static
HRESULT
WINAPI
ITSSCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IClassFactory
))
...
...
@@ -104,7 +109,7 @@ static ULONG WINAPI ITSSCF_Release(LPCLASSFACTORY iface)
static
HRESULT
WINAPI
ITSSCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
HRESULT
hres
;
LPUNKNOWN
punk
;
...
...
@@ -140,9 +145,9 @@ static const IClassFactoryVtbl ITSSCF_Vtbl =
ITSSCF_LockServer
};
static
const
IClassFactoryImpl
ITStorage_factory
=
{
&
ITSSCF_Vtbl
,
ITSS_create
};
static
const
IClassFactoryImpl
MSITStore_factory
=
{
&
ITSSCF_Vtbl
,
ITS_IParseDisplayName_create
};
static
const
IClassFactoryImpl
ITSProtocol_factory
=
{
&
ITSSCF_Vtbl
,
ITSProtocol_create
};
static
const
IClassFactoryImpl
ITStorage_factory
=
{
{
&
ITSSCF_Vtbl
}
,
ITSS_create
};
static
const
IClassFactoryImpl
MSITStore_factory
=
{
{
&
ITSSCF_Vtbl
}
,
ITS_IParseDisplayName_create
};
static
const
IClassFactoryImpl
ITSProtocol_factory
=
{
{
&
ITSSCF_Vtbl
}
,
ITSProtocol_create
};
/***********************************************************************
* DllGetClassObject (ITSS.@)
...
...
@@ -171,17 +176,22 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
/*****************************************************************************/
typedef
struct
{
const
IITStorageVtbl
*
vtbl_IITStorag
e
;
IITStorage
IITStorage_ifac
e
;
LONG
ref
;
}
ITStorageImpl
;
static
inline
ITStorageImpl
*
impl_from_IITStorage
(
IITStorage
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ITStorageImpl
,
IITStorage_iface
);
}
static
HRESULT
WINAPI
ITStorageImpl_QueryInterface
(
IITStorage
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IITStorage
))
{
...
...
@@ -197,7 +207,7 @@ static HRESULT WINAPI ITStorageImpl_QueryInterface(
static
ULONG
WINAPI
ITStorageImpl_AddRef
(
IITStorage
*
iface
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
TRACE
(
"%p
\n
"
,
This
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
...
...
@@ -205,7 +215,7 @@ static ULONG WINAPI ITStorageImpl_AddRef(
static
ULONG
WINAPI
ITStorageImpl_Release
(
IITStorage
*
iface
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
...
...
@@ -223,7 +233,7 @@ static HRESULT WINAPI ITStorageImpl_StgCreateDocfile(
DWORD
reserved
,
IStorage
**
ppstgOpen
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
TRACE
(
"%p %s %u %u %p
\n
"
,
This
,
debugstr_w
(
pwcsName
),
grfMode
,
reserved
,
ppstgOpen
);
...
...
@@ -239,7 +249,7 @@ static HRESULT WINAPI ITStorageImpl_StgCreateDocfileOnILockBytes(
DWORD
reserved
,
IStorage
**
ppstgOpen
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -248,7 +258,7 @@ static HRESULT WINAPI ITStorageImpl_StgIsStorageFile(
IITStorage
*
iface
,
const
WCHAR
*
pwcsName
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -257,7 +267,7 @@ static HRESULT WINAPI ITStorageImpl_StgIsStorageILockBytes(
IITStorage
*
iface
,
ILockBytes
*
plkbyt
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -271,7 +281,7 @@ static HRESULT WINAPI ITStorageImpl_StgOpenStorage(
DWORD
reserved
,
IStorage
**
ppstgOpen
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
TRACE
(
"%p %s %p %d %p
\n
"
,
This
,
debugstr_w
(
pwcsName
),
pstgPriority
,
grfMode
,
snbExclude
);
...
...
@@ -289,7 +299,7 @@ static HRESULT WINAPI ITStorageImpl_StgOpenStorageOnILockBytes(
DWORD
reserved
,
IStorage
**
ppstgOpen
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -301,7 +311,7 @@ static HRESULT WINAPI ITStorageImpl_StgSetTimes(
const
FILETIME
*
patime
,
const
FILETIME
*
pmtime
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -310,7 +320,7 @@ static HRESULT WINAPI ITStorageImpl_SetControlData(
IITStorage
*
iface
,
PITS_Control_Data
pControlData
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -319,7 +329,7 @@ static HRESULT WINAPI ITStorageImpl_DefaultControlData(
IITStorage
*
iface
,
PITS_Control_Data
*
ppControlData
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -329,7 +339,7 @@ static HRESULT WINAPI ITStorageImpl_Compact(
const
WCHAR
*
pwcsName
,
ECompactionLev
iLev
)
{
ITStorageImpl
*
This
=
(
ITStorageImpl
*
)
iface
;
ITStorageImpl
*
This
=
impl_from_IITStorage
(
iface
)
;
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
}
...
...
@@ -359,7 +369,7 @@ static HRESULT ITSS_create(IUnknown *pUnkOuter, LPVOID *ppObj)
return
CLASS_E_NOAGGREGATION
;
its
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ITStorageImpl
)
);
its
->
vtbl_IITStorage
=
&
ITStorageImpl_Vtbl
;
its
->
IITStorage_iface
.
lpVtbl
=
&
ITStorageImpl_Vtbl
;
its
->
ref
=
1
;
TRACE
(
"-> %p
\n
"
,
its
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment