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
f8a215b0
Commit
f8a215b0
authored
Sep 07, 2011
by
Bernhard Loos
Committed by
Alexandre Julliard
Sep 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wuapi: Add the SystemInformation coclass and interface.
parent
f014487f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
199 additions
and
0 deletions
+199
-0
Makefile.in
dlls/wuapi/Makefile.in
+1
-0
main.c
dlls/wuapi/main.c
+5
-0
systeminfo.c
dlls/wuapi/systeminfo.c
+163
-0
wuapi_private.h
dlls/wuapi/wuapi_private.h
+1
-0
wuapi.idl
include/wuapi.idl
+29
-0
No files found.
dlls/wuapi/Makefile.in
View file @
f8a215b0
...
...
@@ -8,6 +8,7 @@ C_SRCS = \
main.c
\
searcher.c
\
session.c
\
systeminfo.c
\
updates.c
IDL_TLB_SRCS
=
wuapi_tlb.idl
...
...
dlls/wuapi/main.c
View file @
f8a215b0
...
...
@@ -114,6 +114,7 @@ static const struct IClassFactoryVtbl wucf_vtbl =
static
wucf
sessioncf
=
{
{
&
wucf_vtbl
},
UpdateSession_create
};
static
wucf
updatescf
=
{
{
&
wucf_vtbl
},
AutomaticUpdates_create
};
static
wucf
sysinfocf
=
{
{
&
wucf_vtbl
},
SystemInformation_create
};
static
HINSTANCE
instance
;
...
...
@@ -147,6 +148,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv )
{
cf
=
&
updatescf
.
IClassFactory_iface
;
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_SystemInformation
))
{
cf
=
&
sysinfocf
.
IClassFactory_iface
;
}
if
(
!
cf
)
return
CLASS_E_CLASSNOTAVAILABLE
;
return
IClassFactory_QueryInterface
(
cf
,
iid
,
ppv
);
}
...
...
dlls/wuapi/systeminfo.c
0 → 100644
View file @
f8a215b0
/*
* IAutomaticUpdates implementation
*
* Copyright 2008 Hans Leidekker
* Copyright 2011 Bernhard Loos
*
* 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
*/
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "wuapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wuapi
);
typedef
struct
_systeminfo
{
ISystemInformation
ISystemInformation_iface
;
LONG
refs
;
}
systeminfo
;
static
inline
systeminfo
*
impl_from_ISystemInformation
(
ISystemInformation
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
systeminfo
,
ISystemInformation_iface
);
}
static
ULONG
WINAPI
systeminfo_AddRef
(
ISystemInformation
*
iface
)
{
systeminfo
*
This
=
impl_from_ISystemInformation
(
iface
);
return
InterlockedIncrement
(
&
This
->
refs
);
}
static
ULONG
WINAPI
systeminfo_Release
(
ISystemInformation
*
iface
)
{
systeminfo
*
This
=
impl_from_ISystemInformation
(
iface
);
LONG
refs
=
InterlockedDecrement
(
&
This
->
refs
);
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
refs
;
}
static
HRESULT
WINAPI
systeminfo_QueryInterface
(
ISystemInformation
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
systeminfo
*
This
=
impl_from_ISystemInformation
(
iface
);
TRACE
(
"%p %s %p
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_ISystemInformation
)
||
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
*
ppvObject
=
iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
ISystemInformation_AddRef
(
iface
);
return
S_OK
;
}
static
HRESULT
WINAPI
systeminfo_GetTypeInfoCount
(
ISystemInformation
*
iface
,
UINT
*
pctinfo
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
systeminfo_GetTypeInfo
(
ISystemInformation
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
systeminfo_GetIDsOfNames
(
ISystemInformation
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
systeminfo_Invoke
(
ISystemInformation
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
systeminfo_get_OemHardwareSupportLink
(
ISystemInformation
*
iface
,
BSTR
*
retval
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
systeminfo_get_RebootRequired
(
ISystemInformation
*
iface
,
VARIANT_BOOL
*
retval
)
{
*
retval
=
VARIANT_FALSE
;
return
S_OK
;
}
static
const
struct
ISystemInformationVtbl
systeminfo_vtbl
=
{
systeminfo_QueryInterface
,
systeminfo_AddRef
,
systeminfo_Release
,
systeminfo_GetTypeInfoCount
,
systeminfo_GetTypeInfo
,
systeminfo_GetIDsOfNames
,
systeminfo_Invoke
,
systeminfo_get_OemHardwareSupportLink
,
systeminfo_get_RebootRequired
};
HRESULT
SystemInformation_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
systeminfo
*
info
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
ppObj
);
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
info
));
if
(
!
info
)
return
E_OUTOFMEMORY
;
info
->
ISystemInformation_iface
.
lpVtbl
=
&
systeminfo_vtbl
;
info
->
refs
=
1
;
*
ppObj
=
&
info
->
ISystemInformation_iface
;
TRACE
(
"returning iface %p
\n
"
,
*
ppObj
);
return
S_OK
;
}
dlls/wuapi/wuapi_private.h
View file @
f8a215b0
...
...
@@ -21,3 +21,4 @@ extern HRESULT UpdateSession_create( IUnknown *pUnkOuter, LPVOID *ppObj ) DECLSP
extern
HRESULT
UpdateSearcher_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
extern
HRESULT
UpdateDownloader_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
extern
HRESULT
UpdateInstaller_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
extern
HRESULT
SystemInformation_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
include/wuapi.idl
View file @
f8a215b0
...
...
@@ -1301,6 +1301,26 @@ interface IUpdateInstaller : IDispatch
}
[
object
,
uuid
(
ADE87BF7
-
7B56
-
4275
-
8
FAB
-
B9B0E591844B
),
oleautomation
,
hidden
,
dual
,
nonextensible
,
pointer_default
(
unique
),
]
interface
ISystemInformation
:
IDispatch
{
[
propget
]
HRESULT
OemHardwareSupportLink
(
[
out
,
retval
]
BSTR
*
retval
)
;
[
propget
]
HRESULT
RebootRequired
(
[
out
,
retval
]
VARIANT_BOOL
*
retval
)
;
}
[
helpstring
(
"AutomaticUpdates Class"
),
threading
(
both
),
progid
(
"Microsoft.Update.AutoUpdate.1"
),
...
...
@@ -1318,4 +1338,13 @@ coclass AutomaticUpdates { interface IAutomaticUpdates; }
]
coclass
UpdateSession
{
interface
IUpdateSession
; }
[
helpstring
(
"SystemInformation Class"
),
threading
(
both
),
progid
(
"Microsoft.Update.SystemInfo.1"
),
vi_progid
(
"Microsoft.Update.SystemInfo"
),
uuid
(
C01B9BA0
-
BEA7
-
41B
A
-
B604
-
D0A36F469133
)
]
coclass
SystemInformation
{
interface
ISystemInformation
; }
}
/*
WUApiLib
*/
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