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
dba0dd41
Commit
dba0dd41
authored
Jul 04, 2019
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Build with msvcrt.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4f8dfdba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
69 additions
and
84 deletions
+69
-84
Makefile.in
dlls/wbemprox/Makefile.in
+2
-0
builtin.c
dlls/wbemprox/builtin.c
+0
-0
class.c
dlls/wbemprox/class.c
+9
-10
main.c
dlls/wbemprox/main.c
+0
-2
process.c
dlls/wbemprox/process.c
+0
-1
qualifier.c
dlls/wbemprox/qualifier.c
+4
-5
query.c
dlls/wbemprox/query.c
+30
-31
reg.c
dlls/wbemprox/reg.c
+0
-1
security.c
dlls/wbemprox/security.c
+0
-1
service.c
dlls/wbemprox/service.c
+0
-1
services.c
dlls/wbemprox/services.c
+5
-7
table.c
dlls/wbemprox/table.c
+8
-9
wbemlocator.c
dlls/wbemprox/wbemlocator.c
+5
-7
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+1
-2
wql.y
dlls/wbemprox/wql.y
+5
-7
No files found.
dlls/wbemprox/Makefile.in
View file @
dba0dd41
MODULE
=
wbemprox.dll
IMPORTS
=
winspool version iphlpapi dxgi oleaut32 ole32 advapi32 user32 gdi32 ws2_32 rpcrt4 setupapi
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
builtin.c
\
class.c
\
...
...
dlls/wbemprox/builtin.c
View file @
dba0dd41
This diff is collapsed.
Click to expand it.
dlls/wbemprox/class.c
View file @
dba0dd41
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -586,7 +585,7 @@ static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
if
((
value
=
get_value_bstr
(
table
,
row
,
i
)))
{
*
len
+=
ARRAY_SIZE
(
fmtW
);
*
len
+=
strlenW
(
table
->
columns
[
i
].
name
);
*
len
+=
l
strlenW
(
table
->
columns
[
i
].
name
);
*
len
+=
SysStringLen
(
value
);
SysFreeString
(
value
);
}
...
...
@@ -597,7 +596,7 @@ static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
{
if
((
value
=
get_value_bstr
(
table
,
row
,
i
)))
{
p
+=
s
printfW
(
p
,
fmtW
,
table
->
columns
[
i
].
name
,
value
);
p
+=
s
wprintf
(
p
,
*
len
-
(
p
-
ret
)
,
fmtW
,
table
->
columns
[
i
].
name
,
value
);
SysFreeString
(
value
);
}
}
...
...
@@ -612,12 +611,12 @@ static BSTR get_object_text( const struct view *view, UINT index )
BSTR
ret
,
body
;
len
=
ARRAY_SIZE
(
fmtW
);
len
+=
strlenW
(
view
->
table
->
name
);
len
+=
l
strlenW
(
view
->
table
->
name
);
if
(
!
(
body
=
get_body_text
(
view
->
table
,
row
,
&
len_body
)))
return
NULL
;
len
+=
len_body
;
if
(
!
(
ret
=
SysAllocStringLen
(
NULL
,
len
)))
return
NULL
;
s
printfW
(
ret
,
fmtW
,
view
->
table
->
name
,
body
);
s
wprintf
(
ret
,
len
,
fmtW
,
view
->
table
->
name
,
body
);
SysFreeString
(
body
);
return
ret
;
}
...
...
@@ -807,12 +806,12 @@ static WCHAR *build_signature_table_name( const WCHAR *class, const WCHAR *metho
static
const
WCHAR
fmtW
[]
=
{
'_'
,
'_'
,
'%'
,
's'
,
'_'
,
'%'
,
's'
,
'_'
,
'%'
,
's'
,
0
};
static
const
WCHAR
outW
[]
=
{
'O'
,
'U'
,
'T'
,
0
};
static
const
WCHAR
inW
[]
=
{
'I'
,
'N'
,
0
};
UINT
len
=
ARRAY_SIZE
(
fmtW
)
+
ARRAY_SIZE
(
outW
)
+
strlenW
(
class
)
+
strlenW
(
method
);
UINT
len
=
ARRAY_SIZE
(
fmtW
)
+
ARRAY_SIZE
(
outW
)
+
lstrlenW
(
class
)
+
l
strlenW
(
method
);
WCHAR
*
ret
;
if
(
!
(
ret
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
)))
return
NULL
;
s
printfW
(
ret
,
fmtW
,
class
,
method
,
dir
==
PARAM_IN
?
inW
:
outW
);
return
struprW
(
ret
);
s
wprintf
(
ret
,
len
,
fmtW
,
class
,
method
,
dir
==
PARAM_IN
?
inW
:
outW
);
return
wcsupr
(
ret
);
}
HRESULT
create_signature
(
const
WCHAR
*
class
,
const
WCHAR
*
method
,
enum
param_direction
dir
,
...
...
@@ -831,9 +830,9 @@ HRESULT create_signature( const WCHAR *class, const WCHAR *method, enum param_di
WCHAR
*
query
,
*
name
;
HRESULT
hr
;
len
+=
strlenW
(
class
)
+
strlenW
(
method
);
len
+=
lstrlenW
(
class
)
+
l
strlenW
(
method
);
if
(
!
(
query
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
s
printfW
(
query
,
selectW
,
class
,
method
,
dir
>=
0
?
geW
:
leW
);
s
wprintf
(
query
,
len
,
selectW
,
class
,
method
,
dir
>=
0
?
geW
:
leW
);
hr
=
exec_query
(
query
,
&
iter
);
heap_free
(
query
);
...
...
dlls/wbemprox/main.c
View file @
dba0dd41
...
...
@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
...
...
dlls/wbemprox/process.c
View file @
dba0dd41
...
...
@@ -20,7 +20,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
dlls/wbemprox/qualifier.c
View file @
dba0dd41
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -108,13 +107,13 @@ static HRESULT create_qualifier_enum( const WCHAR *class, const WCHAR *member, c
int
len
;
if
(
!
member
)
member
=
noneW
;
len
=
strlenW
(
class
)
+
strlenW
(
member
);
if
(
name
)
len
+=
strlenW
(
name
)
+
ARRAY_SIZE
(
fmtW
);
len
=
lstrlenW
(
class
)
+
l
strlenW
(
member
);
if
(
name
)
len
+=
l
strlenW
(
name
)
+
ARRAY_SIZE
(
fmtW
);
else
len
+=
ARRAY_SIZE
(
fmt2W
);
if
(
!
(
query
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
if
(
name
)
s
printfW
(
query
,
fmtW
,
class
,
member
,
name
);
else
s
printfW
(
query
,
fmt2W
,
class
,
member
);
if
(
name
)
s
wprintf
(
query
,
len
,
fmtW
,
class
,
member
,
name
);
else
s
wprintf
(
query
,
len
,
fmt2W
,
class
,
member
);
hr
=
exec_query
(
query
,
iter
);
heap_free
(
query
);
...
...
dlls/wbemprox/query.c
View file @
dba0dd41
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -63,10 +62,10 @@ static BOOL eval_like( const WCHAR *lstr, const WCHAR *rstr )
{
while
(
*
q
==
'%'
)
q
++
;
if
(
!*
q
)
return
TRUE
;
while
(
*
p
&&
*
q
&&
to
upperW
(
*
p
)
==
toupperW
(
*
q
))
{
p
++
;
q
++
;
};
while
(
*
p
&&
*
q
&&
to
wupper
(
*
p
)
==
towupper
(
*
q
))
{
p
++
;
q
++
;
};
if
(
!*
p
&&
!*
q
)
return
TRUE
;
}
if
(
*
q
!=
'%'
&&
to
upperW
(
*
p
++
)
!=
toupperW
(
*
q
++
))
return
FALSE
;
if
(
*
q
!=
'%'
&&
to
wupper
(
*
p
++
)
!=
towupper
(
*
q
++
))
return
FALSE
;
}
return
TRUE
;
}
...
...
@@ -81,22 +80,22 @@ static HRESULT eval_strcmp( UINT op, const WCHAR *lstr, const WCHAR *rstr, LONGL
switch
(
op
)
{
case
OP_EQ
:
*
val
=
!
strcmpW
(
lstr
,
rstr
);
*
val
=
!
wcscmp
(
lstr
,
rstr
);
break
;
case
OP_GT
:
*
val
=
strcmpW
(
lstr
,
rstr
)
>
0
;
*
val
=
wcscmp
(
lstr
,
rstr
)
>
0
;
break
;
case
OP_LT
:
*
val
=
strcmpW
(
lstr
,
rstr
)
<
0
;
*
val
=
wcscmp
(
lstr
,
rstr
)
<
0
;
break
;
case
OP_LE
:
*
val
=
strcmpW
(
lstr
,
rstr
)
<=
0
;
*
val
=
wcscmp
(
lstr
,
rstr
)
<=
0
;
break
;
case
OP_GE
:
*
val
=
strcmpW
(
lstr
,
rstr
)
>=
0
;
*
val
=
wcscmp
(
lstr
,
rstr
)
>=
0
;
break
;
case
OP_NE
:
*
val
=
strcmpW
(
lstr
,
rstr
);
*
val
=
wcscmp
(
lstr
,
rstr
);
break
;
case
OP_LIKE
:
*
val
=
eval_like
(
lstr
,
rstr
);
...
...
@@ -148,8 +147,8 @@ static HRESULT eval_boolcmp( UINT op, LONGLONG lval, LONGLONG rval, UINT ltype,
{
static
const
WCHAR
trueW
[]
=
{
'T'
,
'r'
,
'u'
,
'e'
,
0
};
if
(
ltype
==
CIM_STRING
)
lval
=
!
strcmpiW
(
(
const
WCHAR
*
)(
INT_PTR
)
lval
,
trueW
)
?
-
1
:
0
;
else
if
(
rtype
==
CIM_STRING
)
rval
=
!
strcmpiW
(
(
const
WCHAR
*
)(
INT_PTR
)
rval
,
trueW
)
?
-
1
:
0
;
if
(
ltype
==
CIM_STRING
)
lval
=
!
wcsicmp
(
(
const
WCHAR
*
)(
INT_PTR
)
lval
,
trueW
)
?
-
1
:
0
;
else
if
(
rtype
==
CIM_STRING
)
rval
=
!
wcsicmp
(
(
const
WCHAR
*
)(
INT_PTR
)
rval
,
trueW
)
?
-
1
:
0
;
switch
(
op
)
{
...
...
@@ -207,7 +206,7 @@ static UINT resolve_type( UINT left, UINT right )
return
CIM_ILLEGAL
;
}
static
const
WCHAR
*
format_int
(
WCHAR
*
buf
,
CIMTYPE
type
,
LONGLONG
val
)
static
const
WCHAR
*
format_int
(
WCHAR
*
buf
,
UINT
len
,
CIMTYPE
type
,
LONGLONG
val
)
{
static
const
WCHAR
fmt_signedW
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
fmt_unsignedW
[]
=
{
'%'
,
'u'
,
0
};
...
...
@@ -219,13 +218,13 @@ static const WCHAR *format_int( WCHAR *buf, CIMTYPE type, LONGLONG val )
case
CIM_SINT8
:
case
CIM_SINT16
:
case
CIM_SINT32
:
s
printfW
(
buf
,
fmt_signedW
,
val
);
s
wprintf
(
buf
,
len
,
fmt_signedW
,
val
);
return
buf
;
case
CIM_UINT8
:
case
CIM_UINT16
:
case
CIM_UINT32
:
s
printfW
(
buf
,
fmt_unsignedW
,
val
);
s
wprintf
(
buf
,
len
,
fmt_unsignedW
,
val
);
return
buf
;
case
CIM_SINT64
:
...
...
@@ -263,10 +262,10 @@ static HRESULT eval_binary( const struct table *table, UINT row, const struct co
const
WCHAR
*
lstr
,
*
rstr
;
WCHAR
lbuf
[
21
],
rbuf
[
21
];
if
(
is_int
(
ltype
))
lstr
=
format_int
(
lbuf
,
ltype
,
lval
);
if
(
is_int
(
ltype
))
lstr
=
format_int
(
lbuf
,
ARRAY_SIZE
(
lbuf
),
ltype
,
lval
);
else
lstr
=
(
const
WCHAR
*
)(
INT_PTR
)
lval
;
if
(
is_int
(
rtype
))
rstr
=
format_int
(
rbuf
,
rtype
,
rval
);
if
(
is_int
(
rtype
))
rstr
=
format_int
(
rbuf
,
ARRAY_SIZE
(
rbuf
),
rtype
,
rval
);
else
rstr
=
(
const
WCHAR
*
)(
INT_PTR
)
rval
;
return
eval_strcmp
(
expr
->
op
,
lstr
,
rstr
,
val
);
...
...
@@ -493,7 +492,7 @@ BOOL is_selected_prop( const struct view *view, const WCHAR *name )
if
(
!
prop
)
return
TRUE
;
while
(
prop
)
{
if
(
!
strcmpiW
(
prop
->
name
,
name
))
return
TRUE
;
if
(
!
wcsicmp
(
prop
->
name
,
name
))
return
TRUE
;
prop
=
prop
->
next
;
}
return
FALSE
;
...
...
@@ -512,7 +511,7 @@ static BSTR build_servername( const struct view *view )
if
(
view
->
proplist
)
return
NULL
;
if
(
!
(
GetComputerNameW
(
server
,
&
len
)))
return
NULL
;
for
(
p
=
server
;
*
p
;
p
++
)
*
p
=
to
upperW
(
*
p
);
for
(
p
=
server
;
*
p
;
p
++
)
*
p
=
to
wupper
(
*
p
);
return
SysAllocString
(
server
);
}
...
...
@@ -545,7 +544,7 @@ static BSTR build_proplist( const struct view *view, UINT index, UINT count, UIN
const
WCHAR
*
name
=
view
->
table
->
columns
[
i
].
name
;
values
[
j
]
=
get_value_bstr
(
view
->
table
,
row
,
i
);
*
len
+=
strlenW
(
fmtW
)
+
strlenW
(
name
)
+
strlenW
(
values
[
j
]
);
*
len
+=
lstrlenW
(
fmtW
)
+
lstrlenW
(
name
)
+
l
strlenW
(
values
[
j
]
);
j
++
;
}
}
...
...
@@ -558,7 +557,7 @@ static BSTR build_proplist( const struct view *view, UINT index, UINT count, UIN
{
const
WCHAR
*
name
=
view
->
table
->
columns
[
i
].
name
;
offset
+=
s
printfW
(
ret
+
offset
,
fmtW
,
name
,
values
[
j
]
);
offset
+=
s
wprintf
(
ret
+
offset
,
*
len
-
offset
,
fmtW
,
name
,
values
[
j
]
);
if
(
j
<
count
-
1
)
ret
[
offset
++
]
=
','
;
j
++
;
}
...
...
@@ -592,9 +591,9 @@ static BSTR build_relpath( const struct view *view, UINT index, const WCHAR *nam
if
(
!
(
num_keys
=
count_key_columns
(
view
)))
return
class
;
if
(
!
(
proplist
=
build_proplist
(
view
,
index
,
num_keys
,
&
len
)))
goto
done
;
len
+=
strlenW
(
fmtW
)
+
SysStringLen
(
class
);
len
+=
l
strlenW
(
fmtW
)
+
SysStringLen
(
class
);
if
(
!
(
ret
=
SysAllocStringLen
(
NULL
,
len
)))
goto
done
;
s
printfW
(
ret
,
fmtW
,
class
,
proplist
);
s
wprintf
(
ret
,
len
,
fmtW
,
class
,
proplist
);
done:
SysFreeString
(
class
);
...
...
@@ -614,9 +613,9 @@ static BSTR build_path( const struct view *view, UINT index, const WCHAR *name )
if
(
!
(
namespace
=
build_namespace
(
view
)))
goto
done
;
if
(
!
(
relpath
=
build_relpath
(
view
,
index
,
name
)))
goto
done
;
len
=
strlenW
(
fmtW
)
+
SysStringLen
(
server
)
+
SysStringLen
(
namespace
)
+
SysStringLen
(
relpath
);
len
=
l
strlenW
(
fmtW
)
+
SysStringLen
(
server
)
+
SysStringLen
(
namespace
)
+
SysStringLen
(
relpath
);
if
(
!
(
ret
=
SysAllocStringLen
(
NULL
,
len
)))
goto
done
;
s
printfW
(
ret
,
fmtW
,
server
,
namespace
,
relpath
);
s
wprintf
(
ret
,
len
,
fmtW
,
server
,
namespace
,
relpath
);
done:
SysFreeString
(
server
);
...
...
@@ -666,7 +665,7 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
flavor
)
*
flavor
=
WBEM_FLAVOR_ORIGIN_SYSTEM
;
if
(
!
strcmpiW
(
name
,
classW
))
if
(
!
wcsicmp
(
name
,
classW
))
{
if
(
ret
)
{
...
...
@@ -676,7 +675,7 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
if
(
!
strcmpiW
(
name
,
genusW
))
if
(
!
wcsicmp
(
name
,
genusW
))
{
if
(
ret
)
{
...
...
@@ -686,7 +685,7 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
type
)
*
type
=
CIM_SINT32
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
namespaceW
))
else
if
(
!
wcsicmp
(
name
,
namespaceW
))
{
if
(
ret
)
{
...
...
@@ -696,7 +695,7 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
pathW
))
else
if
(
!
wcsicmp
(
name
,
pathW
))
{
if
(
ret
)
{
...
...
@@ -706,7 +705,7 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
if
(
!
strcmpiW
(
name
,
propcountW
))
if
(
!
wcsicmp
(
name
,
propcountW
))
{
if
(
ret
)
{
...
...
@@ -716,7 +715,7 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
type
)
*
type
=
CIM_SINT32
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
relpathW
))
else
if
(
!
wcsicmp
(
name
,
relpathW
))
{
if
(
ret
)
{
...
...
@@ -726,7 +725,7 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
serverW
))
else
if
(
!
wcsicmp
(
name
,
serverW
))
{
if
(
ret
)
{
...
...
dlls/wbemprox/reg.c
View file @
dba0dd41
...
...
@@ -20,7 +20,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
dlls/wbemprox/security.c
View file @
dba0dd41
...
...
@@ -20,7 +20,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
dlls/wbemprox/service.c
View file @
dba0dd41
...
...
@@ -20,7 +20,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
dlls/wbemprox/services.c
View file @
dba0dd41
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -27,7 +26,6 @@
#include "wbemcli.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wbemprox_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wbemprox
);
...
...
@@ -279,7 +277,7 @@ static HRESULT WINAPI wbem_services_OpenNamespace(
TRACE
(
"%p, %s, 0x%08x, %p, %p, %p
\n
"
,
iface
,
debugstr_w
(
strNamespace
),
lFlags
,
pCtx
,
ppWorkingNamespace
,
ppResult
);
if
((
strcmpiW
(
strNamespace
,
cimv2W
)
&&
strcmpiW
(
strNamespace
,
defaultW
))
||
ws
->
namespace
)
if
((
wcsicmp
(
strNamespace
,
cimv2W
)
&&
wcsicmp
(
strNamespace
,
defaultW
))
||
ws
->
namespace
)
return
WBEM_E_INVALID_NAMESPACE
;
return
WbemServices_create
(
cimv2W
,
(
void
**
)
ppWorkingNamespace
);
...
...
@@ -422,14 +420,14 @@ static WCHAR *query_from_path( const struct path *path )
{
len
=
path
->
class_len
+
path
->
filter_len
+
ARRAY_SIZE
(
selectW
);
if
(
!
(
query
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
)))
return
NULL
;
s
printfW
(
query
,
selectW
,
path
->
class
,
path
->
filter
);
s
wprintf
(
query
,
len
,
selectW
,
path
->
class
,
path
->
filter
);
}
else
{
len
=
path
->
class_len
+
ARRAY_SIZE
(
select_allW
);
if
(
!
(
query
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
)))
return
NULL
;
strcpyW
(
query
,
select_allW
);
strcatW
(
query
,
path
->
class
);
l
strcpyW
(
query
,
select_allW
);
l
strcatW
(
query
,
path
->
class
);
}
return
query
;
}
...
...
@@ -653,7 +651,7 @@ static HRESULT WINAPI wbem_services_ExecQuery(
debugstr_w
(
strQuery
),
lFlags
,
pCtx
,
ppEnum
);
if
(
!
strQueryLanguage
||
!
strQuery
||
!
strQuery
[
0
])
return
WBEM_E_INVALID_PARAMETER
;
if
(
strcmpiW
(
strQueryLanguage
,
wqlW
))
return
WBEM_E_INVALID_QUERY_TYPE
;
if
(
wcsicmp
(
strQueryLanguage
,
wqlW
))
return
WBEM_E_INVALID_QUERY_TYPE
;
return
exec_query
(
strQuery
,
ppEnum
);
}
...
...
dlls/wbemprox/table.c
View file @
dba0dd41
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -35,7 +34,7 @@ HRESULT get_column_index( const struct table *table, const WCHAR *name, UINT *co
UINT
i
;
for
(
i
=
0
;
i
<
table
->
num_cols
;
i
++
)
{
if
(
!
strcmpiW
(
table
->
columns
[
i
].
name
,
name
))
if
(
!
wcsicmp
(
table
->
columns
[
i
].
name
,
name
))
{
*
column
=
i
;
return
S_OK
;
...
...
@@ -176,19 +175,19 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
case
CIM_DATETIME
:
case
CIM_STRING
:
if
(
!
val
)
return
NULL
;
len
=
strlenW
(
(
const
WCHAR
*
)(
INT_PTR
)
val
)
+
2
;
len
=
l
strlenW
(
(
const
WCHAR
*
)(
INT_PTR
)
val
)
+
2
;
if
(
!
(
ret
=
SysAllocStringLen
(
NULL
,
len
)))
return
NULL
;
s
printfW
(
ret
,
fmt_strW
,
(
const
WCHAR
*
)(
INT_PTR
)
val
);
s
wprintf
(
ret
,
len
,
fmt_strW
,
(
const
WCHAR
*
)(
INT_PTR
)
val
);
return
ret
;
case
CIM_SINT16
:
case
CIM_SINT32
:
s
printfW
(
number
,
fmt_signedW
,
val
);
s
wprintf
(
number
,
ARRAY_SIZE
(
number
)
,
fmt_signedW
,
val
);
return
SysAllocString
(
number
);
case
CIM_UINT16
:
case
CIM_UINT32
:
s
printfW
(
number
,
fmt_unsignedW
,
val
);
s
wprintf
(
number
,
ARRAY_SIZE
(
number
)
,
fmt_unsignedW
,
val
);
return
SysAllocString
(
number
);
case
CIM_SINT64
:
...
...
@@ -263,7 +262,7 @@ HRESULT get_method( const struct table *table, const WCHAR *name, class_method *
{
for
(
j
=
0
;
j
<
table
->
num_cols
;
j
++
)
{
if
(
table
->
columns
[
j
].
type
&
COL_FLAG_METHOD
&&
!
strcmpW
(
table
->
columns
[
j
].
name
,
name
))
if
(
table
->
columns
[
j
].
type
&
COL_FLAG_METHOD
&&
!
wcscmp
(
table
->
columns
[
j
].
name
,
name
))
{
HRESULT
hr
;
LONGLONG
val
;
...
...
@@ -357,7 +356,7 @@ struct table *grab_table( const WCHAR *name )
LIST_FOR_EACH_ENTRY
(
table
,
table_list
,
struct
table
,
entry
)
{
if
(
name
&&
!
strcmpiW
(
table
->
name
,
name
))
if
(
name
&&
!
wcsicmp
(
table
->
name
,
name
))
{
TRACE
(
"returning %p
\n
"
,
table
);
return
addref_table
(
table
);
...
...
@@ -392,7 +391,7 @@ BOOL add_table( struct table *table )
LIST_FOR_EACH_ENTRY
(
iter
,
table_list
,
struct
table
,
entry
)
{
if
(
!
strcmpiW
(
iter
->
name
,
table
->
name
))
if
(
!
wcsicmp
(
iter
->
name
,
table
->
name
))
{
TRACE
(
"table %s already exists
\n
"
,
debugstr_w
(
table
->
name
));
return
FALSE
;
...
...
dlls/wbemprox/wbemlocator.c
View file @
dba0dd41
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -27,7 +26,6 @@
#include "wbemcli.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wbemprox_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wbemprox
);
...
...
@@ -93,8 +91,8 @@ static BOOL is_local_machine( const WCHAR *server )
WCHAR
buffer
[
MAX_COMPUTERNAME_LENGTH
+
1
];
DWORD
len
=
ARRAY_SIZE
(
buffer
);
if
(
!
server
||
!
strcmpW
(
server
,
dotW
)
||
!
strcmpiW
(
server
,
localhostW
))
return
TRUE
;
if
(
GetComputerNameW
(
buffer
,
&
len
)
&&
!
strcmpiW
(
server
,
buffer
))
return
TRUE
;
if
(
!
server
||
!
wcscmp
(
server
,
dotW
)
||
!
wcsicmp
(
server
,
localhostW
))
return
TRUE
;
if
(
GetComputerNameW
(
buffer
,
&
len
)
&&
!
wcsicmp
(
server
,
buffer
))
return
TRUE
;
return
FALSE
;
}
...
...
@@ -133,15 +131,15 @@ static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **na
p
=
q
;
while
(
*
q
&&
*
q
!=
'\\'
&&
*
q
!=
'/'
)
q
++
;
len
=
q
-
p
;
if
(
len
>=
ARRAY_SIZE
(
rootW
)
&&
strncmpiW
(
rootW
,
p
,
len
))
goto
done
;
if
(
len
>=
ARRAY_SIZE
(
rootW
)
&&
wcsnicmp
(
rootW
,
p
,
len
))
goto
done
;
if
(
!*
q
)
{
hr
=
S_OK
;
goto
done
;
}
q
++
;
len
=
strlenW
(
q
);
if
(
strcmpiW
(
q
,
cimv2W
)
&&
strcmpiW
(
q
,
defaultW
))
len
=
l
strlenW
(
q
);
if
(
wcsicmp
(
q
,
cimv2W
)
&&
wcsicmp
(
q
,
defaultW
))
goto
done
;
if
(
!
(
*
namespace
=
heap_alloc
(
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
hr
=
E_OUTOFMEMORY
;
else
...
...
dlls/wbemprox/wbemprox_private.h
View file @
dba0dd41
...
...
@@ -19,7 +19,6 @@
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/unicode.h"
IClientSecurity
client_security
DECLSPEC_HIDDEN
;
struct
list
*
table_list
DECLSPEC_HIDDEN
;
...
...
@@ -240,7 +239,7 @@ static inline WCHAR *heap_strdupW( const WCHAR *src )
{
WCHAR
*
dst
;
if
(
!
src
)
return
NULL
;
if
((
dst
=
heap_alloc
(
(
strlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
)
)))
strcpyW
(
dst
,
src
);
if
((
dst
=
heap_alloc
(
(
lstrlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
)
)))
l
strcpyW
(
dst
,
src
);
return
dst
;
}
...
...
dlls/wbemprox/wql.y
View file @
dba0dd41
...
...
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -28,7 +27,6 @@
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
...
...
@@ -666,13 +664,13 @@ static const struct wql_keyword keyword_table[] =
{ whereW, ARRAY_SIZE(whereW), TK_WHERE }
};
static int cmp_keyword( const void *arg1, const void *arg2 )
static int
__cdecl
cmp_keyword( const void *arg1, const void *arg2 )
{
const struct wql_keyword *key1 = arg1, *key2 = arg2;
int len = min( key1->len, key2->len );
int ret;
if ((ret =
strncmpiW
( key1->name, key2->name, len ))) return ret;
if ((ret =
wcsnicmp
( key1->name, key2->name, len ))) return ret;
if (key1->len < key2->len) return -1;
else if (key1->len > key2->len) return 1;
return 0;
...
...
@@ -702,7 +700,7 @@ static int get_token( const WCHAR *s, int *token )
case '\t':
case '\r':
case '\n':
for (i = 1; is
spaceW
( s[i] ); i++) {}
for (i = 1; is
wspace
( s[i] ); i++) {}
*token = TK_SPACE;
return i;
case '-':
...
...
@@ -781,7 +779,7 @@ static int get_token( const WCHAR *s, int *token )
*token = TK_STRING;
return i;
case '.':
if (!is
digitW
( s[1] ))
if (!is
wdigit
( s[1] ))
{
*token = TK_DOT;
return 1;
...
...
@@ -790,7 +788,7 @@ static int get_token( const WCHAR *s, int *token )
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
*token = TK_INTEGER;
for (i = 1; is
digitW
( s[i] ); i++) {}
for (i = 1; is
wdigit
( s[i] ); i++) {}
return i;
default:
if (!id_char[*s]) break;
...
...
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