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
8b27b1d0
Commit
8b27b1d0
authored
Feb 25, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement more properties of Win32_CDROMDrive.
parent
a247c7cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
10 deletions
+55
-10
builtin.c
dlls/wbemprox/builtin.c
+55
-10
No files found.
dlls/wbemprox/builtin.c
View file @
8b27b1d0
...
@@ -107,6 +107,8 @@ static const WCHAR prop_directionW[] =
...
@@ -107,6 +107,8 @@ static const WCHAR prop_directionW[] =
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_displaynameW
[]
=
static
const
WCHAR
prop_displaynameW
[]
=
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
prop_driveW
[]
=
{
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
0
};
static
const
WCHAR
prop_domainW
[]
=
static
const
WCHAR
prop_domainW
[]
=
{
'D'
,
'o'
,
'm'
,
'a'
,
'i'
,
'n'
,
0
};
{
'D'
,
'o'
,
'm'
,
'a'
,
'i'
,
'n'
,
0
};
static
const
WCHAR
prop_domainroleW
[]
=
static
const
WCHAR
prop_domainroleW
[]
=
...
@@ -215,7 +217,10 @@ static const struct column col_bios[] =
...
@@ -215,7 +217,10 @@ static const struct column col_bios[] =
};
};
static
const
struct
column
col_cdromdrive
[]
=
static
const
struct
column
col_cdromdrive
[]
=
{
{
{
prop_nameW
,
CIM_STRING
}
{
prop_deviceidW
,
CIM_STRING
|
COL_FLAG_KEY
},
{
prop_driveW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_nameW
,
CIM_STRING
},
{
prop_pnpdeviceidW
,
CIM_STRING
}
};
};
static
const
struct
column
col_compsys
[]
=
static
const
struct
column
col_compsys
[]
=
{
{
...
@@ -364,6 +369,11 @@ static const WCHAR bios_versionW[] =
...
@@ -364,6 +369,11 @@ static const WCHAR bios_versionW[] =
{
'W'
,
'I'
,
'N'
,
'E'
,
' '
,
' '
,
' '
,
'-'
,
' '
,
'1'
,
0
};
{
'W'
,
'I'
,
'N'
,
'E'
,
' '
,
' '
,
' '
,
'-'
,
' '
,
'1'
,
0
};
static
const
WCHAR
cdromdrive_nameW
[]
=
static
const
WCHAR
cdromdrive_nameW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'C'
,
'D'
,
'-'
,
'R'
,
'O'
,
'M'
,
' '
,
'A'
,
'T'
,
'A'
,
' '
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
0
};
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'C'
,
'D'
,
'-'
,
'R'
,
'O'
,
'M'
,
' '
,
'A'
,
'T'
,
'A'
,
' '
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
cdromdrive_pnpdeviceidW
[]
=
{
'I'
,
'D'
,
'E'
,
'\\'
,
'C'
,
'D'
,
'R'
,
'O'
,
'M'
,
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'C'
,
'D'
,
'-'
,
'R'
,
'O'
,
'M'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'1'
,
'.'
,
'0'
,
'_'
,
'_'
,
'_'
,
'_'
,
'_'
,
'\\'
,
'5'
,
'&'
,
'3'
,
'A'
,
'2'
,
'A'
,
'5'
,
'8'
,
'5'
,
'4'
,
'&'
,
'0'
,
'&'
,
'1'
,
'.'
,
'0'
,
'.'
,
'0'
,
0
};
static
const
WCHAR
compsys_descriptionW
[]
=
static
const
WCHAR
compsys_descriptionW
[]
=
{
'A'
,
'T'
,
'/'
,
'A'
,
'T'
,
' '
,
'C'
,
'O'
,
'M'
,
'P'
,
'A'
,
'T'
,
'I'
,
'B'
,
'L'
,
'E'
,
0
};
{
'A'
,
'T'
,
'/'
,
'A'
,
'T'
,
' '
,
'C'
,
'O'
,
'M'
,
'P'
,
'A'
,
'T'
,
'I'
,
'B'
,
'L'
,
'E'
,
0
};
static
const
WCHAR
compsys_domainW
[]
=
static
const
WCHAR
compsys_domainW
[]
=
...
@@ -413,7 +423,10 @@ struct record_bios
...
@@ -413,7 +423,10 @@ struct record_bios
};
};
struct
record_cdromdrive
struct
record_cdromdrive
{
{
const
WCHAR
*
device_id
;
const
WCHAR
*
drive
;
const
WCHAR
*
name
;
const
WCHAR
*
name
;
const
WCHAR
*
pnpdevice_id
;
};
};
struct
record_computersystem
struct
record_computersystem
{
{
...
@@ -553,10 +566,6 @@ static const struct record_bios data_bios[] =
...
@@ -553,10 +566,6 @@ static const struct record_bios data_bios[] =
{
{
{
bios_descriptionW
,
bios_manufacturerW
,
bios_releasedateW
,
bios_serialnumberW
,
bios_versionW
}
{
bios_descriptionW
,
bios_manufacturerW
,
bios_releasedateW
,
bios_serialnumberW
,
bios_versionW
}
};
};
static
const
struct
record_cdromdrive
data_cdromdrive
[]
=
{
{
cdromdrive_nameW
}
};
static
const
struct
record_diskdrive
data_diskdrive
[]
=
static
const
struct
record_diskdrive
data_diskdrive
[]
=
{
{
{
diskdrive_deviceidW
,
diskdrive_manufacturerW
,
diskdrive_modelW
}
{
diskdrive_deviceidW
,
diskdrive_manufacturerW
,
diskdrive_modelW
}
...
@@ -603,6 +612,45 @@ static const struct record_stdregprov data_stdregprov[] =
...
@@ -603,6 +612,45 @@ static const struct record_stdregprov data_stdregprov[] =
{
reg_enum_key
,
reg_enum_values
,
reg_get_stringvalue
}
{
reg_enum_key
,
reg_enum_values
,
reg_get_stringvalue
}
};
};
static
void
fill_cdromdrive
(
struct
table
*
table
)
{
static
const
WCHAR
fmtW
[]
=
{
'%'
,
'c'
,
':'
,
0
};
WCHAR
drive
[
3
],
root
[]
=
{
'A'
,
':'
,
'\\'
,
0
};
struct
record_cdromdrive
*
rec
;
UINT
i
,
num_rows
=
0
,
offset
=
0
,
count
=
1
;
DWORD
drives
=
GetLogicalDrives
();
if
(
!
(
table
->
data
=
heap_alloc
(
count
*
sizeof
(
*
rec
)
)))
return
;
for
(
i
=
0
;
i
<
sizeof
(
drives
);
i
++
)
{
if
(
drives
&
(
1
<<
i
))
{
root
[
0
]
=
'A'
+
i
;
if
(
GetDriveTypeW
(
root
)
!=
DRIVE_CDROM
)
continue
;
if
(
num_rows
>
count
)
{
BYTE
*
data
;
count
*=
2
;
if
(
!
(
data
=
heap_realloc
(
table
->
data
,
count
*
sizeof
(
*
rec
)
)))
return
;
table
->
data
=
data
;
}
rec
=
(
struct
record_cdromdrive
*
)(
table
->
data
+
offset
);
rec
->
device_id
=
cdromdrive_pnpdeviceidW
;
sprintfW
(
drive
,
fmtW
,
'A'
+
i
);
rec
->
drive
=
heap_strdupW
(
drive
);
rec
->
name
=
cdromdrive_nameW
;
rec
->
pnpdevice_id
=
cdromdrive_pnpdeviceidW
;
offset
+=
sizeof
(
*
rec
);
num_rows
++
;
}
}
TRACE
(
"created %u rows
\n
"
,
num_rows
);
table
->
num_rows
=
num_rows
;
}
static
UINT
get_processor_count
(
void
)
static
UINT
get_processor_count
(
void
)
{
{
SYSTEM_BASIC_INFORMATION
info
;
SYSTEM_BASIC_INFORMATION
info
;
...
@@ -1263,7 +1311,7 @@ static struct table builtin_classes[] =
...
@@ -1263,7 +1311,7 @@ static struct table builtin_classes[] =
{
{
{
class_baseboardW
,
SIZEOF
(
col_baseboard
),
col_baseboard
,
SIZEOF
(
data_baseboard
),
(
BYTE
*
)
data_baseboard
},
{
class_baseboardW
,
SIZEOF
(
col_baseboard
),
col_baseboard
,
SIZEOF
(
data_baseboard
),
(
BYTE
*
)
data_baseboard
},
{
class_biosW
,
SIZEOF
(
col_bios
),
col_bios
,
SIZEOF
(
data_bios
),
(
BYTE
*
)
data_bios
},
{
class_biosW
,
SIZEOF
(
col_bios
),
col_bios
,
SIZEOF
(
data_bios
),
(
BYTE
*
)
data_bios
},
{
class_cdromdriveW
,
SIZEOF
(
col_cdromdrive
),
col_cdromdrive
,
SIZEOF
(
data_cdromdrive
),
(
BYTE
*
)
data
_cdromdrive
},
{
class_cdromdriveW
,
SIZEOF
(
col_cdromdrive
),
col_cdromdrive
,
0
,
NULL
,
fill
_cdromdrive
},
{
class_compsysW
,
SIZEOF
(
col_compsys
),
col_compsys
,
0
,
NULL
,
fill_compsys
},
{
class_compsysW
,
SIZEOF
(
col_compsys
),
col_compsys
,
0
,
NULL
,
fill_compsys
},
{
class_diskdriveW
,
SIZEOF
(
col_diskdrive
),
col_diskdrive
,
SIZEOF
(
data_diskdrive
),
(
BYTE
*
)
data_diskdrive
},
{
class_diskdriveW
,
SIZEOF
(
col_diskdrive
),
col_diskdrive
,
SIZEOF
(
data_diskdrive
),
(
BYTE
*
)
data_diskdrive
},
{
class_logicaldiskW
,
SIZEOF
(
col_logicaldisk
),
col_logicaldisk
,
0
,
NULL
,
fill_logicaldisk
},
{
class_logicaldiskW
,
SIZEOF
(
col_logicaldisk
),
col_logicaldisk
,
0
,
NULL
,
fill_logicaldisk
},
...
@@ -1284,9 +1332,6 @@ void init_table_list( void )
...
@@ -1284,9 +1332,6 @@ void init_table_list( void )
static
struct
list
tables
=
LIST_INIT
(
tables
);
static
struct
list
tables
=
LIST_INIT
(
tables
);
UINT
i
;
UINT
i
;
for
(
i
=
0
;
i
<
SIZEOF
(
builtin_classes
);
i
++
)
for
(
i
=
0
;
i
<
SIZEOF
(
builtin_classes
);
i
++
)
list_add_tail
(
&
tables
,
&
builtin_classes
[
i
].
entry
);
{
list_add_tail
(
&
tables
,
&
builtin_classes
[
i
].
entry
);
}
table_list
=
&
tables
;
table_list
=
&
tables
;
}
}
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