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
2e7353dc
Commit
2e7353dc
authored
Jul 08, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jul 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Implement ConvertStringToGuidW().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8f12e295
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
iphlpapi.spec
dlls/iphlpapi/iphlpapi.spec
+1
-1
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+8
-0
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+9
-1
No files found.
dlls/iphlpapi/iphlpapi.spec
View file @
2e7353dc
...
...
@@ -32,7 +32,7 @@
#@ stub ConvertRemoteInterfaceLuidToGuid
#@ stub ConvertRemoteInterfaceLuidToIndex
#@ stub ConvertStringToGuidA
#@ stub ConvertStringToGuidW
@ stdcall ConvertStringToGuidW( ptr ptr )
#@ stub ConvertStringToInterfacePhysicalAddress
#@ stub CPNatfwtCreateProviderInstance
#@ stub CPNatfwtDeregisterProviderInstance
...
...
dlls/iphlpapi/iphlpapi_main.c
View file @
2e7353dc
...
...
@@ -97,6 +97,14 @@ DWORD WINAPI ConvertGuidToStringW( const GUID *guid, WCHAR *str, DWORD len )
return
ERROR_SUCCESS
;
}
DWORD
WINAPI
ConvertStringToGuidW
(
const
WCHAR
*
str
,
GUID
*
guid
)
{
UNICODE_STRING
ustr
;
RtlInitUnicodeString
(
&
ustr
,
str
);
return
RtlNtStatusToDosError
(
RtlGUIDFromString
(
&
ustr
,
guid
)
);
}
/******************************************************************
* AddIPAddress (IPHLPAPI.@)
*
...
...
dlls/iphlpapi/tests/iphlpapi.c
View file @
2e7353dc
...
...
@@ -69,6 +69,7 @@ static DWORD (WINAPI *pCancelMibChangeNotify2)(HANDLE);
DWORD
WINAPI
ConvertGuidToStringA
(
const
GUID
*
,
char
*
,
DWORD
);
DWORD
WINAPI
ConvertGuidToStringW
(
const
GUID
*
,
WCHAR
*
,
DWORD
);
DWORD
WINAPI
ConvertStringToGuidW
(
const
WCHAR
*
,
GUID
*
);
static
void
loadIPHlpApi
(
void
)
{
...
...
@@ -2339,7 +2340,7 @@ static void test_ConvertGuidToString( void )
DWORD
err
;
char
bufA
[
39
];
WCHAR
bufW
[
39
];
GUID
guid
=
{
0xa
,
0xb
,
0xc
,
{
0xd
,
0
,
0xe
,
0xf
}
};
GUID
guid
=
{
0xa
,
0xb
,
0xc
,
{
0xd
,
0
,
0xe
,
0xf
}
}
,
guid2
;
err
=
ConvertGuidToStringA
(
&
guid
,
bufA
,
38
);
ok
(
err
,
"got %d
\n
"
,
err
);
...
...
@@ -2352,6 +2353,13 @@ static void test_ConvertGuidToString( void )
err
=
ConvertGuidToStringW
(
&
guid
,
bufW
,
39
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
!
wcscmp
(
bufW
,
L"{0000000A-000B-000C-0D00-0E0F00000000}"
),
"got %s
\n
"
,
debugstr_w
(
bufW
)
);
err
=
ConvertStringToGuidW
(
bufW
,
&
guid2
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
IsEqualGUID
(
&
guid
,
&
guid2
),
"guid mismatch
\n
"
);
err
=
ConvertStringToGuidW
(
L"foo"
,
&
guid2
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
err
);
}
START_TEST
(
iphlpapi
)
...
...
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