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
d75375ea
Commit
d75375ea
authored
Jun 15, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Add a partial Win32_BIOS class implementation.
parent
f6be2110
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
0 deletions
+118
-0
Makefile.in
dlls/wbemprox/Makefile.in
+1
-0
builtin.c
dlls/wbemprox/builtin.c
+98
-0
query.c
dlls/wbemprox/query.c
+1
-0
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+18
-0
No files found.
dlls/wbemprox/Makefile.in
View file @
d75375ea
...
...
@@ -2,6 +2,7 @@ MODULE = wbemprox.dll
IMPORTS
=
ole32 advapi32
C_SRCS
=
\
builtin.c
\
class.c
\
main.c
\
query.c
\
...
...
dlls/wbemprox/builtin.c
0 → 100644
View file @
d75375ea
/*
* Copyright 2012 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 "wbemcli.h"
#include "wine/debug.h"
#include "wbemprox_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wbemprox
);
static
const
WCHAR
class_biosW
[]
=
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'B'
,
'I'
,
'O'
,
'S'
,
0
};
static
const
WCHAR
prop_captionW
[]
=
{
'C'
,
'a'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_descriptionW
[]
=
{
'D'
,
'e'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_manufacturerW
[]
=
{
'M'
,
'a'
,
'n'
,
'u'
,
'f'
,
'a'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
prop_releasedateW
[]
=
{
'R'
,
'e'
,
'l'
,
'e'
,
'a'
,
's'
,
'e'
,
'D'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
prop_serialnumberW
[]
=
{
'S'
,
'e'
,
'r'
,
'i'
,
'a'
,
'l'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
static
const
struct
column
col_bios
[]
=
{
{
prop_descriptionW
,
CIM_STRING
},
{
prop_manufacturerW
,
CIM_STRING
},
{
prop_releasedateW
,
CIM_DATETIME
},
{
prop_serialnumberW
,
CIM_STRING
}
};
static
const
WCHAR
bios_descriptionW
[]
=
{
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
' '
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
' '
,
'B'
,
'I'
,
'O'
,
'S'
,
0
};
static
const
WCHAR
bios_manufacturerW
[]
=
{
'T'
,
'h'
,
'e'
,
' '
,
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'P'
,
'r'
,
'o'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
static
const
WCHAR
bios_releasedateW
[]
=
{
'2'
,
'0'
,
'1'
,
'2'
,
'0'
,
'6'
,
'0'
,
'8'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'.'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'+'
,
'0'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
bios_serialnumberW
[]
=
{
'0'
,
0
};
#include "pshpack1.h"
struct
record_bios
{
const
WCHAR
*
description
;
const
WCHAR
*
manufacturer
;
const
WCHAR
*
releasedate
;
const
WCHAR
*
serialnumber
;
};
#include "poppack.h"
static
const
struct
record_bios
data_bios
[]
=
{
{
bios_descriptionW
,
bios_manufacturerW
,
bios_releasedateW
,
bios_serialnumberW
}
};
static
struct
table
classtable
[]
=
{
{
class_biosW
,
SIZEOF
(
col_bios
),
col_bios
,
SIZEOF
(
data_bios
),
(
BYTE
*
)
data_bios
}
};
struct
table
*
get_table
(
const
WCHAR
*
name
)
{
UINT
i
;
struct
table
*
table
=
NULL
;
for
(
i
=
0
;
i
<
SIZEOF
(
classtable
);
i
++
)
{
if
(
!
strcmpiW
(
classtable
[
i
].
name
,
name
))
{
table
=
&
classtable
[
i
];
break
;
}
}
return
table
;
}
dlls/wbemprox/query.c
View file @
d75375ea
...
...
@@ -37,6 +37,7 @@ HRESULT create_view( const struct property *proplist, const WCHAR *class,
if
(
!
view
)
return
E_OUTOFMEMORY
;
view
->
proplist
=
proplist
;
view
->
table
=
get_table
(
class
);
view
->
cond
=
cond
;
*
ret
=
view
;
return
S_OK
;
...
...
dlls/wbemprox/wbemprox_private.h
View file @
d75375ea
...
...
@@ -17,9 +17,25 @@
*/
#include "wine/list.h"
#include "wine/unicode.h"
#define SIZEOF(array) (sizeof(array)/sizeof((array)[0]))
struct
column
{
const
WCHAR
*
name
;
CIMTYPE_ENUMERATION
type
;
};
struct
table
{
const
WCHAR
*
name
;
UINT
num_cols
;
const
struct
column
*
columns
;
UINT
num_rows
;
BYTE
*
data
;
};
struct
property
{
const
WCHAR
*
name
;
...
...
@@ -75,6 +91,7 @@ struct expr
struct
view
{
const
struct
property
*
proplist
;
struct
table
*
table
;
const
struct
expr
*
cond
;
};
...
...
@@ -90,6 +107,7 @@ HRESULT parse_query( const WCHAR *, struct view **, struct list * ) DECLSPEC_HID
HRESULT
create_view
(
const
struct
property
*
,
const
WCHAR
*
,
const
struct
expr
*
,
struct
view
**
)
DECLSPEC_HIDDEN
;
void
destroy_view
(
struct
view
*
)
DECLSPEC_HIDDEN
;
struct
table
*
get_table
(
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemLocator_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemServices_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
...
...
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