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
2182dd1f
Commit
2182dd1f
authored
Jul 14, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Add a stub implementation of IWbemLocator.
parent
b4da7ebd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
151 additions
and
1 deletion
+151
-1
Makefile.in
dlls/wbemprox/Makefile.in
+2
-1
wbemlocator.c
dlls/wbemprox/wbemlocator.c
+130
-0
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+19
-0
No files found.
dlls/wbemprox/Makefile.in
View file @
2182dd1f
...
...
@@ -6,7 +6,8 @@ MODULE = wbemprox.dll
IMPORTS
=
kernel32
C_SRCS
=
\
main.c
main.c
\
wbemlocator.c
@MAKE_DLL_RULES@
...
...
dlls/wbemprox/wbemlocator.c
0 → 100644
View file @
2182dd1f
/*
* Copyright 2009 Hans Leidekker for CodeWeavers
*
* 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 "initguid.h"
#include "objbase.h"
#include "wbemcli.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wbemprox_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wbemprox
);
typedef
struct
{
const
IWbemLocatorVtbl
*
vtbl
;
LONG
refs
;
}
wbem_locator
;
static
inline
wbem_locator
*
impl_from_IWbemLocator
(
IWbemLocator
*
iface
)
{
return
(
wbem_locator
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
wbem_locator
,
vtbl
));
}
static
ULONG
WINAPI
wbem_locator_AddRef
(
IWbemLocator
*
iface
)
{
wbem_locator
*
wl
=
impl_from_IWbemLocator
(
iface
);
return
InterlockedIncrement
(
&
wl
->
refs
);
}
static
ULONG
WINAPI
wbem_locator_Release
(
IWbemLocator
*
iface
)
{
wbem_locator
*
wl
=
impl_from_IWbemLocator
(
iface
);
LONG
refs
=
InterlockedDecrement
(
&
wl
->
refs
);
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
wl
);
HeapFree
(
GetProcessHeap
(),
0
,
wl
);
}
return
refs
;
}
static
HRESULT
WINAPI
wbem_locator_QueryInterface
(
IWbemLocator
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
wbem_locator
*
This
=
impl_from_IWbemLocator
(
iface
);
TRACE
(
"%p %s %p
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IWbemLocator
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
)
{
*
ppvObject
=
iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IWbemLocator_AddRef
(
iface
);
return
S_OK
;
}
static
HRESULT
WINAPI
wbem_locator_ConnectServer
(
IWbemLocator
*
iface
,
const
BSTR
NetworkResource
,
const
BSTR
User
,
const
BSTR
Password
,
const
BSTR
Locale
,
LONG
SecurityFlags
,
const
BSTR
Authority
,
IWbemContext
*
pCtx
,
IWbemServices
**
ppNamespace
)
{
FIXME
(
"%p, %s, %s, %s, %s, 0x%08x, %s, %p, %p)
\n
"
,
iface
,
debugstr_w
(
NetworkResource
),
debugstr_w
(
User
),
debugstr_w
(
Password
),
debugstr_w
(
Locale
),
SecurityFlags
,
debugstr_w
(
Authority
),
pCtx
,
ppNamespace
);
return
WBEM_E_FAILED
;
}
static
const
IWbemLocatorVtbl
wbem_locator_vtbl
=
{
wbem_locator_QueryInterface
,
wbem_locator_AddRef
,
wbem_locator_Release
,
wbem_locator_ConnectServer
};
HRESULT
WbemLocator_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
wbem_locator
*
wl
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
ppObj
);
wl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
wl
)
);
if
(
!
wl
)
return
E_OUTOFMEMORY
;
wl
->
vtbl
=
&
wbem_locator_vtbl
;
wl
->
refs
=
1
;
*
ppObj
=
&
wl
->
vtbl
;
TRACE
(
"returning iface %p
\n
"
,
*
ppObj
);
return
S_OK
;
}
dlls/wbemprox/wbemprox_private.h
0 → 100644
View file @
2182dd1f
/*
* Copyright 2009 Hans Leidekker for CodeWeavers
*
* 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
*/
HRESULT
WbemLocator_create
(
IUnknown
*
,
LPVOID
*
);
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