#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wbemcli.h"
#include "wine/debug.h"
#include "wbemprox_private.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (wbemprox) |
|
static wbem_locator * | impl_from_IWbemLocator (IWbemLocator *iface) |
|
static ULONG WINAPI | wbem_locator_AddRef (IWbemLocator *iface) |
|
static ULONG WINAPI | wbem_locator_Release (IWbemLocator *iface) |
|
static HRESULT WINAPI | wbem_locator_QueryInterface (IWbemLocator *iface, REFIID riid, void **ppvObject) |
|
static BOOL | is_local_machine (const WCHAR *server) |
|
static HRESULT | parse_resource (const WCHAR *resource, WCHAR **server, WCHAR **namespace) |
|
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) |
|
HRESULT | WbemLocator_create (LPVOID *ppObj) |
|
◆ COBJMACROS
◆ impl_from_IWbemLocator()
◆ is_local_machine()
Definition at line 87 of file wbemlocator.c.
88{
90 static const WCHAR localhostW[] = {
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',0};
93
97}
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
static const WCHAR dotW[]
static const WCHAR localhostW[]
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static rfbScreenInfoPtr server
#define MAX_COMPUTERNAME_LENGTH
Referenced by wbem_locator_ConnectServer().
◆ parse_resource()
Definition at line 99 of file wbemlocator.c.
100{
101 static const WCHAR rootW[] = {
'R',
'O',
'O',
'T'};
102 static const WCHAR cimv2W[] = {
'C',
'I',
'M',
'V',
'2',0};
103 static const WCHAR defaultW[] = {
'D',
'E',
'F',
'A',
'U',
'L',
'T',0};
107
111 if (*
p ==
'\\' || *
p ==
'/')
112 {
114 if (*
p ==
'\\' || *
p ==
'/')
p++;
118 while (*
q && *
q !=
'\\' && *
q !=
'/')
q++;
122 {
124 goto done;
125 }
129 }
132 while (*
q && *
q !=
'\\' && *
q !=
'/')
q++;
136 {
138 goto done;
139 }
143 goto done;
145 else
146 {
148 (*namespace)[
len] = 0;
150 }
151
152done:
154 {
157 }
159}
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static const WCHAR rootW[]
GLdouble GLdouble GLdouble GLdouble q
#define memcpy(s1, s2, n)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
static const WCHAR defaultW[]
@ WBEM_E_INVALID_NAMESPACE
@ WBEM_E_INVALID_PARAMETER
Referenced by wbem_locator_ConnectServer().
◆ wbem_locator_AddRef()
Definition at line 44 of file wbemlocator.c.
46{
49}
#define InterlockedIncrement
static wbem_locator * impl_from_IWbemLocator(IWbemLocator *iface)
◆ wbem_locator_ConnectServer()
Definition at line 161 of file wbemlocator.c.
171{
174
175 TRACE(
"%p, %s, %s, %s, %s, 0x%08x, %s, %p, %p)\n", iface,
debugstr_w(NetworkResource),
debugstr_w(User),
177
180
182 {
183 FIXME(
"remote computer not supported\n");
187 }
189 FIXME(
"authentication not supported\n");
190 if (Locale)
191 FIXME(
"specific locale not supported\n");
192 if (SecurityFlags)
193 FIXME(
"unsupported flags\n");
194
200
202}
HRESULT WbemServices_create(const WCHAR *namespace, LPVOID *ppObj)
@ WBEM_E_TRANSPORT_FAILURE
static BOOL is_local_machine(const WCHAR *server)
static HRESULT parse_resource(const WCHAR *resource, WCHAR **server, WCHAR **namespace)
◆ wbem_locator_QueryInterface()
Definition at line 64 of file wbemlocator.c.
68{
70
72
75 {
77 }
78 else
79 {
82 }
83 IWbemLocator_AddRef( iface );
85}
#define IsEqualGUID(rguid1, rguid2)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
◆ wbem_locator_Release()
Definition at line 51 of file wbemlocator.c.
53{
56 if (!refs)
57 {
58 TRACE(
"destroying %p\n", wl);
60 }
61 return refs;
62}
#define InterlockedDecrement
◆ WbemLocator_create()
Definition at line 212 of file wbemlocator.c.
213{
215
216 TRACE(
"(%p)\n", ppObj);
217
220
223
225
226 TRACE(
"returning iface %p\n", *ppObj);
228}
IWbemLocator IWbemLocator_iface
static const IWbemLocatorVtbl wbem_locator_vtbl
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
wbemprox |
| ) |
|
◆ wbem_locator_vtbl
const IWbemLocatorVtbl wbem_locator_vtbl |
|
static |
Initial value:=
{
}
static ULONG WINAPI wbem_locator_AddRef(IWbemLocator *iface)
static ULONG WINAPI wbem_locator_Release(IWbemLocator *iface)
static HRESULT WINAPI wbem_locator_QueryInterface(IWbemLocator *iface, REFIID riid, void **ppvObject)
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)
Definition at line 204 of file wbemlocator.c.
Referenced by WbemLocator_create().