Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
b347a392
Commit
b347a392
authored
14 years ago
by
Michael Stefaniuc
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sti: COM cleanup for sti.c.
parent
0406b5d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/sti/sti.c
+40
-34
40 additions, 34 deletions
dlls/sti/sti.c
dlls/sti/sti_private.h
+0
-32
0 additions, 32 deletions
dlls/sti/sti_private.h
with
40 additions
and
66 deletions
dlls/sti/sti.c
+
40
−
34
View file @
b347a392
...
...
@@ -28,8 +28,6 @@
#include
"objbase.h"
#include
"sti.h"
#include
"sti_private.h"
#include
"wine/debug.h"
#include
"wine/unicode.h"
...
...
@@ -44,33 +42,41 @@ static const WCHAR registeredAppsLaunchPath[] = {
'R'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'e'
,
'r'
,
'e'
,
'd'
,
' '
,
'A'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
's'
,
0
};
static
inline
stillimage
*
impl_from_StillImageW
(
IStillImageW
*
iface
)
typedef
struct
_stillimage
{
IStillImageW
IStillImageW_iface
;
IUnknown
IUnknown_iface
;
IUnknown
*
pUnkOuter
;
LONG
ref
;
}
stillimage
;
static
inline
stillimage
*
impl_from_IStillImageW
(
IStillImageW
*
iface
)
{
return
(
stillimage
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
s
till
i
mage
,
lpVtbl
)
);
return
CONTAINING_RECORD
(
iface
,
stillimage
,
IS
till
I
mage
W_iface
);
}
static
HRESULT
WINAPI
stillimagew_QueryInterface
(
IStillImageW
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
TRACE
(
"(%p %s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
return
IUnknown_QueryInterface
(
This
->
pUnkOuter
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
stillimagew_AddRef
(
IStillImageW
*
iface
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
return
IUnknown_AddRef
(
This
->
pUnkOuter
);
}
static
ULONG
WINAPI
stillimagew_Release
(
IStillImageW
*
iface
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
return
IUnknown_Release
(
This
->
pUnkOuter
);
}
static
HRESULT
WINAPI
stillimagew_Initialize
(
IStillImageW
*
iface
,
HINSTANCE
hinst
,
DWORD
dwVersion
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
TRACE
(
"(%p, %p, 0x%X)
\n
"
,
This
,
hinst
,
dwVersion
);
return
S_OK
;
}
...
...
@@ -78,7 +84,7 @@ static HRESULT WINAPI stillimagew_Initialize(IStillImageW *iface, HINSTANCE hins
static
HRESULT
WINAPI
stillimagew_GetDeviceList
(
IStillImageW
*
iface
,
DWORD
dwType
,
DWORD
dwFlags
,
DWORD
*
pdwItemsReturned
,
LPVOID
*
ppBuffer
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %u, 0x%X, %p, %p): stub
\n
"
,
This
,
dwType
,
dwFlags
,
pdwItemsReturned
,
ppBuffer
);
return
E_NOTIMPL
;
}
...
...
@@ -86,7 +92,7 @@ static HRESULT WINAPI stillimagew_GetDeviceList(IStillImageW *iface, DWORD dwTyp
static
HRESULT
WINAPI
stillimagew_GetDeviceInfo
(
IStillImageW
*
iface
,
LPWSTR
pwszDeviceName
,
LPVOID
*
ppBuffer
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
),
ppBuffer
);
return
E_NOTIMPL
;
}
...
...
@@ -94,7 +100,7 @@ static HRESULT WINAPI stillimagew_GetDeviceInfo(IStillImageW *iface, LPWSTR pwsz
static
HRESULT
WINAPI
stillimagew_CreateDevice
(
IStillImageW
*
iface
,
LPWSTR
pwszDeviceName
,
DWORD
dwMode
,
PSTIDEVICEW
*
pDevice
,
LPUNKNOWN
pUnkOuter
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s, %u, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
),
dwMode
,
pDevice
,
pUnkOuter
);
return
E_NOTIMPL
;
}
...
...
@@ -102,7 +108,7 @@ static HRESULT WINAPI stillimagew_CreateDevice(IStillImageW *iface, LPWSTR pwszD
static
HRESULT
WINAPI
stillimagew_GetDeviceValue
(
IStillImageW
*
iface
,
LPWSTR
pwszDeviceName
,
LPWSTR
pValueName
,
LPDWORD
pType
,
LPBYTE
pData
,
LPDWORD
cbData
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s, %s, %p, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
),
debugstr_w
(
pValueName
),
pType
,
pData
,
cbData
);
return
E_NOTIMPL
;
...
...
@@ -111,7 +117,7 @@ static HRESULT WINAPI stillimagew_GetDeviceValue(IStillImageW *iface, LPWSTR pws
static
HRESULT
WINAPI
stillimagew_SetDeviceValue
(
IStillImageW
*
iface
,
LPWSTR
pwszDeviceName
,
LPWSTR
pValueName
,
DWORD
type
,
LPBYTE
pData
,
DWORD
cbData
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s, %s, %u, %p, %u): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
),
debugstr_w
(
pValueName
),
type
,
pData
,
cbData
);
return
E_NOTIMPL
;
...
...
@@ -120,7 +126,7 @@ static HRESULT WINAPI stillimagew_SetDeviceValue(IStillImageW *iface, LPWSTR pws
static
HRESULT
WINAPI
stillimagew_GetSTILaunchInformation
(
IStillImageW
*
iface
,
LPWSTR
pwszDeviceName
,
DWORD
*
pdwEventCode
,
LPWSTR
pwszEventName
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %p, %p, %p): stub
\n
"
,
This
,
pwszDeviceName
,
pdwEventCode
,
pwszEventName
);
return
E_NOTIMPL
;
...
...
@@ -136,7 +142,7 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface,
HKEY
registeredAppsKey
=
NULL
;
DWORD
ret
;
HRESULT
hr
=
S_OK
;
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
TRACE
(
"(%p, %s, %s)
\n
"
,
This
,
debugstr_w
(
pwszAppName
),
debugstr_w
(
pwszCommandLine
));
...
...
@@ -165,7 +171,7 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface,
static
HRESULT
WINAPI
stillimagew_UnregisterLaunchApplication
(
IStillImageW
*
iface
,
LPWSTR
pwszAppName
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
HKEY
registeredAppsKey
=
NULL
;
DWORD
ret
;
HRESULT
hr
=
S_OK
;
...
...
@@ -188,7 +194,7 @@ static HRESULT WINAPI stillimagew_UnregisterLaunchApplication(IStillImageW *ifac
static
HRESULT
WINAPI
stillimagew_EnableHwNotifications
(
IStillImageW
*
iface
,
LPCWSTR
pwszDeviceName
,
BOOL
bNewState
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s, %u): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
),
bNewState
);
return
E_NOTIMPL
;
}
...
...
@@ -196,14 +202,14 @@ static HRESULT WINAPI stillimagew_EnableHwNotifications(IStillImageW *iface, LPC
static
HRESULT
WINAPI
stillimagew_GetHwNotificationState
(
IStillImageW
*
iface
,
LPCWSTR
pwszDeviceName
,
BOOL
*
pbCurrentState
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
),
pbCurrentState
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stillimagew_RefreshDeviceBus
(
IStillImageW
*
iface
,
LPCWSTR
pwszDeviceName
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
));
return
E_NOTIMPL
;
}
...
...
@@ -211,7 +217,7 @@ static HRESULT WINAPI stillimagew_RefreshDeviceBus(IStillImageW *iface, LPCWSTR
static
HRESULT
WINAPI
stillimagew_LaunchApplicationForDevice
(
IStillImageW
*
iface
,
LPWSTR
pwszDeviceName
,
LPWSTR
pwszAppName
,
LPSTINOTIFY
pStiNotify
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %s, %s, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszDeviceName
),
debugstr_w
(
pwszAppName
),
pStiNotify
);
return
E_NOTIMPL
;
...
...
@@ -219,14 +225,14 @@ static HRESULT WINAPI stillimagew_LaunchApplicationForDevice(IStillImageW *iface
static
HRESULT
WINAPI
stillimagew_SetupDeviceParameters
(
IStillImageW
*
iface
,
PSTI_DEVICE_INFORMATIONW
pDevInfo
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pDevInfo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stillimagew_WriteToErrorLog
(
IStillImageW
*
iface
,
DWORD
dwMessageType
,
LPCWSTR
pszMessage
)
{
stillimage
*
This
=
impl_from_StillImageW
(
iface
);
stillimage
*
This
=
impl_from_
I
StillImageW
(
iface
);
FIXME
(
"(%p, %u, %s): stub
\n
"
,
This
,
dwMessageType
,
debugstr_w
(
pszMessage
));
return
E_NOTIMPL
;
}
...
...
@@ -253,21 +259,21 @@ static const struct IStillImageWVtbl stillimagew_vtbl =
stillimagew_WriteToErrorLog
};
static
inline
stillimage
*
impl_from_I
nternal
Unknown
(
IUnknown
*
iface
)
static
inline
stillimage
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
(
stillimage
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
stillimage
,
lpInternalUnkVtbl
)
);
return
CONTAINING_RECORD
(
iface
,
stillimage
,
IUnknown_iface
);
}
static
HRESULT
WINAPI
Internal_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
stillimage
*
This
=
impl_from_I
nternal
Unknown
(
iface
);
stillimage
*
This
=
impl_from_IUnknown
(
iface
);
TRACE
(
"(%p %s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
*
ppvObject
=
iface
;
else
if
(
IsEqualGUID
(
riid
,
&
IID_IStillImageW
))
*
ppvObject
=
&
This
->
lpVtbl
;
*
ppvObject
=
&
This
->
IStillImageW_iface
;
else
{
if
(
IsEqualGUID
(
riid
,
&
IID_IStillImageA
))
...
...
@@ -284,14 +290,14 @@ static HRESULT WINAPI Internal_QueryInterface(IUnknown *iface, REFIID riid, void
static
ULONG
WINAPI
Internal_AddRef
(
IUnknown
*
iface
)
{
stillimage
*
This
=
impl_from_I
nternal
Unknown
(
iface
);
stillimage
*
This
=
impl_from_IUnknown
(
iface
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
Internal_Release
(
IUnknown
*
iface
)
{
ULONG
ref
;
stillimage
*
This
=
impl_from_I
nternal
Unknown
(
iface
);
stillimage
*
This
=
impl_from_IUnknown
(
iface
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
...
...
@@ -328,21 +334,21 @@ HRESULT WINAPI StiCreateInstanceW(HINSTANCE hinst, DWORD dwVer, PSTIW *ppSti, LP
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
stillimage
));
if
(
This
)
{
This
->
lpVtbl
=
&
stillimagew_vtbl
;
This
->
lpInternalUnk
Vtbl
=
&
internal_unk_vtbl
;
This
->
IStillImageW_iface
.
lpVtbl
=
&
stillimagew_vtbl
;
This
->
IUnknown_iface
.
lp
Vtbl
=
&
internal_unk_vtbl
;
if
(
pUnkOuter
)
This
->
pUnkOuter
=
pUnkOuter
;
else
This
->
pUnkOuter
=
(
IUnknown
*
)
&
This
->
lpInternalUnkVtbl
;
This
->
pUnkOuter
=
&
This
->
IUnknown_iface
;
This
->
ref
=
1
;
hr
=
IStillImage_Initialize
(
(
IStillImageW
*
)
&
This
->
lpVtbl
,
hinst
,
dwVer
);
hr
=
IStillImage_Initialize
(
&
This
->
IStillImageW
_iface
,
hinst
,
dwVer
);
if
(
SUCCEEDED
(
hr
))
{
if
(
pUnkOuter
)
*
ppSti
=
(
IStillImageW
*
)
&
This
->
lpInternalUnkVtbl
;
*
ppSti
=
(
IStillImageW
*
)
&
This
->
IUnknown_iface
;
else
*
ppSti
=
(
IStillImageW
*
)
&
This
->
lpVtbl
;
*
ppSti
=
&
This
->
IStillImageW
_iface
;
}
}
else
...
...
This diff is collapsed.
Click to expand it.
dlls/sti/sti_private.h
deleted
100644 → 0
+
0
−
32
View file @
0406b5d5
/*
* STI private definitions
*
* Copyright 2009 Damjan Jovanovic
*
* 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 __STI_PRIVATE__
#define __STI_PRIVATE__
typedef
struct
_stillimage
{
const
struct
IStillImageWVtbl
*
lpVtbl
;
const
struct
IUnknownVtbl
*
lpInternalUnkVtbl
;
IUnknown
*
pUnkOuter
;
LONG
ref
;
}
stillimage
;
#endif
/* __STI_PRIVATE__ */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment