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
7c625772
Commit
7c625772
authored
Jun 27, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmiutils: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7efeed69
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
32 deletions
+29
-32
Makefile.in
dlls/wmiutils/Makefile.in
+2
-0
main.c
dlls/wmiutils/main.c
+0
-1
path.c
dlls/wmiutils/path.c
+24
-25
statuscode.c
dlls/wmiutils/statuscode.c
+2
-4
wmiutils_private.h
dlls/wmiutils/wmiutils_private.h
+1
-2
No files found.
dlls/wmiutils/Makefile.in
View file @
7c625772
MODULE
=
wmiutils.dll
IMPORTS
=
oleaut32 ole32 advapi32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
main.c
\
path.c
\
...
...
dlls/wmiutils/main.c
View file @
7c625772
...
...
@@ -16,7 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
...
...
dlls/wmiutils/path.c
View file @
7c625772
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -379,7 +378,7 @@ static HRESULT parse_key( struct key *key, const WCHAR *str, unsigned int *ret_l
p
=
q
=
str
;
while
(
*
q
&&
*
q
!=
'='
)
{
if
(
*
q
==
','
||
is
spaceW
(
*
q
))
return
WBEM_E_INVALID_PARAMETER
;
if
(
*
q
==
','
||
is
wspace
(
*
q
))
return
WBEM_E_INVALID_PARAMETER
;
q
++
;
}
len
=
q
-
p
;
...
...
@@ -389,7 +388,7 @@ static HRESULT parse_key( struct key *key, const WCHAR *str, unsigned int *ret_l
key
->
len_name
=
len
;
p
=
++
q
;
if
(
!*
p
||
*
p
==
','
||
is
spaceW
(
*
p
))
return
WBEM_E_INVALID_PARAMETER
;
if
(
!*
p
||
*
p
==
','
||
is
wspace
(
*
p
))
return
WBEM_E_INVALID_PARAMETER
;
while
(
*
q
&&
*
q
!=
','
)
q
++
;
len
=
q
-
p
;
...
...
@@ -423,7 +422,7 @@ static HRESULT parse_text( struct path *path, ULONG mode, const WCHAR *text )
path
->
flags
|=
WBEMPATH_INFO_PATH_HAD_SERVER
;
}
p
=
q
;
if
(
strchrW
(
p
,
'\\'
)
||
strchrW
(
p
,
'/'
))
if
(
wcschr
(
p
,
'\\'
)
||
wcschr
(
p
,
'/'
))
{
if
(
*
q
!=
'\\'
&&
*
q
!=
'/'
&&
*
q
!=
':'
)
{
...
...
@@ -528,14 +527,14 @@ static HRESULT WINAPI path_SetText(
if
(
!
pszPath
[
0
])
goto
done
;
if
((
hr
=
parse_text
(
path
,
uMode
,
pszPath
))
!=
S_OK
)
goto
done
;
len
=
strlenW
(
pszPath
);
len
=
l
strlenW
(
pszPath
);
if
(
!
(
path
->
text
=
heap_alloc
(
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
{
clear_path
(
path
);
hr
=
E_OUTOFMEMORY
;
goto
done
;
}
strcpyW
(
path
->
text
,
pszPath
);
l
strcpyW
(
path
->
text
,
pszPath
);
path
->
len_text
=
len
;
done:
...
...
@@ -576,7 +575,7 @@ static WCHAR *build_server( struct path *path, int *len )
if
(
path
->
len_server
)
{
p
[
0
]
=
p
[
1
]
=
'\\'
;
strcpyW
(
p
+
2
,
path
->
server
);
l
strcpyW
(
p
+
2
,
path
->
server
);
}
else
{
...
...
@@ -641,15 +640,15 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len )
heap_free
(
keylist
);
return
NULL
;
}
strcpyW
(
ret
,
namespace
);
l
strcpyW
(
ret
,
namespace
);
if
(
path
->
len_class
)
{
ret
[
len_namespace
]
=
':'
;
strcpyW
(
ret
+
len_namespace
+
1
,
path
->
class
);
l
strcpyW
(
ret
+
len_namespace
+
1
,
path
->
class
);
if
(
path
->
num_keys
)
{
ret
[
len_namespace
+
path
->
len_class
+
1
]
=
'.'
;
strcpyW
(
ret
+
len_namespace
+
path
->
len_class
+
2
,
keylist
);
l
strcpyW
(
ret
+
len_namespace
+
path
->
len_class
+
2
,
keylist
);
}
}
heap_free
(
namespace
);
...
...
@@ -672,11 +671,11 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len )
heap_free
(
keylist
);
return
NULL
;
}
strcpyW
(
ret
,
path
->
class
);
l
strcpyW
(
ret
,
path
->
class
);
if
(
path
->
num_keys
)
{
ret
[
path
->
len_class
]
=
'.'
;
strcpyW
(
ret
+
path
->
len_class
+
1
,
keylist
);
l
strcpyW
(
ret
+
path
->
len_class
+
1
,
keylist
);
}
heap_free
(
keylist
);
return
ret
;
...
...
@@ -708,18 +707,18 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len )
heap_free
(
keylist
);
return
NULL
;
}
strcpyW
(
p
,
server
);
l
strcpyW
(
p
,
server
);
p
+=
len_server
;
strcpyW
(
p
,
namespace
);
l
strcpyW
(
p
,
namespace
);
p
+=
len_namespace
;
if
(
path
->
len_class
)
{
*
p
++
=
':'
;
strcpyW
(
p
,
path
->
class
);
l
strcpyW
(
p
,
path
->
class
);
if
(
path
->
num_keys
)
{
p
[
path
->
len_class
]
=
'.'
;
strcpyW
(
p
+
path
->
len_class
+
1
,
keylist
);
l
strcpyW
(
p
+
path
->
len_class
+
1
,
keylist
);
}
}
heap_free
(
namespace
);
...
...
@@ -746,9 +745,9 @@ static WCHAR *build_path( struct path *path, LONG flags, int *len )
heap_free
(
server
);
return
NULL
;
}
strcpyW
(
p
,
server
);
l
strcpyW
(
p
,
server
);
p
+=
len_server
;
strcpyW
(
p
,
namespace
);
l
strcpyW
(
p
,
namespace
);
heap_free
(
namespace
);
heap_free
(
server
);
return
ret
;
...
...
@@ -795,7 +794,7 @@ static HRESULT WINAPI path_GetText(
hr
=
WBEM_E_INVALID_PARAMETER
;
goto
done
;
}
if
(
str
)
strcpyW
(
pszText
,
str
);
if
(
str
)
l
strcpyW
(
pszText
,
str
);
else
pszText
[
0
]
=
0
;
*
puBufferLength
=
len
+
1
;
...
...
@@ -866,7 +865,7 @@ static HRESULT WINAPI path_SetServer(
}
heap_free
(
path
->
server
);
path
->
server
=
server
;
path
->
len_server
=
strlenW
(
path
->
server
);
path
->
len_server
=
l
strlenW
(
path
->
server
);
path
->
flags
|=
flags
;
}
else
...
...
@@ -899,7 +898,7 @@ static HRESULT WINAPI path_GetServer(
LeaveCriticalSection
(
&
path
->
cs
);
return
WBEM_E_NOT_AVAILABLE
;
}
if
(
*
len
>
path
->
len_server
)
strcpyW
(
name
,
path
->
server
);
if
(
*
len
>
path
->
len_server
)
l
strcpyW
(
name
,
path
->
server
);
*
len
=
path
->
len_server
+
1
;
LeaveCriticalSection
(
&
path
->
cs
);
...
...
@@ -975,7 +974,7 @@ static HRESULT WINAPI path_SetNamespaceAt(
path
->
len_namespaces
[
i
+
1
]
=
path
->
len_namespaces
[
i
];
}
path
->
namespaces
[
idx
]
=
new
;
path
->
len_namespaces
[
idx
]
=
strlenW
(
new
);
path
->
len_namespaces
[
idx
]
=
l
strlenW
(
new
);
path
->
num_namespaces
++
;
path
->
flags
|=
flags
;
...
...
@@ -1000,7 +999,7 @@ static HRESULT WINAPI path_GetNamespaceAt(
LeaveCriticalSection
(
&
path
->
cs
);
return
WBEM_E_INVALID_PARAMETER
;
}
if
(
*
len
>
path
->
len_namespaces
[
idx
])
strcpyW
(
name
,
path
->
namespaces
[
idx
]
);
if
(
*
len
>
path
->
len_namespaces
[
idx
])
l
strcpyW
(
name
,
path
->
namespaces
[
idx
]
);
*
len
=
path
->
len_namespaces
[
idx
]
+
1
;
LeaveCriticalSection
(
&
path
->
cs
);
...
...
@@ -1134,7 +1133,7 @@ static HRESULT WINAPI path_SetClassName(
heap_free
(
path
->
class
);
path
->
class
=
class
;
path
->
len_class
=
strlenW
(
path
->
class
);
path
->
len_class
=
l
strlenW
(
path
->
class
);
path
->
flags
|=
WBEMPATH_INFO_V2_COMPLIANT
|
WBEMPATH_INFO_CIM_COMPLIANT
;
LeaveCriticalSection
(
&
path
->
cs
);
...
...
@@ -1159,7 +1158,7 @@ static HRESULT WINAPI path_GetClassName(
LeaveCriticalSection
(
&
path
->
cs
);
return
WBEM_E_INVALID_OBJECT_PATH
;
}
if
(
*
len
>
path
->
len_class
)
strcpyW
(
name
,
path
->
class
);
if
(
*
len
>
path
->
len_class
)
l
strcpyW
(
name
,
path
->
class
);
*
len
=
path
->
len_class
+
1
;
LeaveCriticalSection
(
&
path
->
cs
);
...
...
dlls/wmiutils/statuscode.c
View file @
7c625772
...
...
@@ -18,7 +18,6 @@
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -28,7 +27,6 @@
#include "wbemcli.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wmiutils_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wmiutils
);
...
...
@@ -100,7 +98,7 @@ static HRESULT WINAPI status_code_GetErrorCodeText(
FIXME
(
"%p, 0x%08x, 0x%04x, 0x%08x, %p
\n
"
,
iface
,
res
,
lcid
,
flags
,
text
);
s
printfW
(
msg
,
fmt
,
res
);
s
wprintf
(
msg
,
ARRAY_SIZE
(
msg
)
,
fmt
,
res
);
*
text
=
SysAllocString
(
msg
);
return
WBEM_S_NO_ERROR
;
}
...
...
@@ -118,7 +116,7 @@ static HRESULT WINAPI status_code_GetFacilityCodeText(
FIXME
(
"%p, 0x%08x, 0x%04x, 0x%08x, %p
\n
"
,
iface
,
res
,
lcid
,
flags
,
text
);
s
printfW
(
msg
,
fmt
,
res
);
s
wprintf
(
msg
,
ARRAY_SIZE
(
msg
)
,
fmt
,
res
);
*
text
=
SysAllocString
(
msg
);
return
WBEM_S_NO_ERROR
;
}
...
...
dlls/wmiutils/wmiutils_private.h
View file @
7c625772
...
...
@@ -17,7 +17,6 @@
*/
#include "wine/heap.h"
#include "wine/unicode.h"
HRESULT
WbemPath_create
(
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemStatusCodeText_create
(
LPVOID
*
)
DECLSPEC_HIDDEN
;
...
...
@@ -26,6 +25,6 @@ static inline WCHAR *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
;
}
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