Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
aaf7a974
Commit
aaf7a974
authored
Jan 20, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Jan 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole: ProgIDFromCLSID sets progid to NULL on failure.
parent
6bc59056
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
compobj.c
dlls/ole32/compobj.c
+1
-0
compobj.c
dlls/ole32/tests/compobj.c
+6
-0
No files found.
dlls/ole32/compobj.c
View file @
aaf7a974
...
@@ -1049,6 +1049,7 @@ HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *lplpszProgID)
...
@@ -1049,6 +1049,7 @@ HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *lplpszProgID)
HRESULT
ret
;
HRESULT
ret
;
LONG
progidlen
=
0
;
LONG
progidlen
=
0
;
*
lplpszProgID
=
NULL
;
ret
=
COM_OpenKeyForCLSID
(
clsid
,
wszProgID
,
KEY_READ
,
&
hkey
);
ret
=
COM_OpenKeyForCLSID
(
clsid
,
wszProgID
,
KEY_READ
,
&
hkey
);
if
(
FAILED
(
ret
))
if
(
FAILED
(
ret
))
return
ret
;
return
ret
;
...
...
dlls/ole32/tests/compobj.c
View file @
aaf7a974
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08lx\n", hr)
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08lx\n", hr)
static
const
CLSID
CLSID_non_existent
=
{
0x12345678
,
0x1234
,
0x1234
,
{
0x12
,
0x34
,
0x56
,
0x78
,
0x9a
,
0xbc
,
0xde
,
0xf0
}
};
static
const
CLSID
CLSID_CDeviceMoniker
=
{
0x4315d437
,
0x5b8c
,
0x11d0
,
{
0xbd
,
0x3b
,
0x00
,
0xa0
,
0xc9
,
0x11
,
0xce
,
0x86
}
};
static
const
CLSID
CLSID_CDeviceMoniker
=
{
0x4315d437
,
0x5b8c
,
0x11d0
,
{
0xbd
,
0x3b
,
0x00
,
0xa0
,
0xc9
,
0x11
,
0xce
,
0x86
}
};
static
const
WCHAR
devicedotone
[]
=
{
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'.'
,
'1'
,
0
};
static
const
WCHAR
devicedotone
[]
=
{
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'.'
,
'1'
,
0
};
static
const
WCHAR
wszCLSID_CDeviceMoniker
[]
=
static
const
WCHAR
wszCLSID_CDeviceMoniker
[]
=
...
@@ -53,6 +54,11 @@ static void test_ProgIDFromCLSID(void)
...
@@ -53,6 +54,11 @@ static void test_ProgIDFromCLSID(void)
ok
(
!
lstrcmpiW
(
progid
,
devicedotone
),
"Didn't get expected prog ID
\n
"
);
ok
(
!
lstrcmpiW
(
progid
,
devicedotone
),
"Didn't get expected prog ID
\n
"
);
CoTaskMemFree
(
progid
);
CoTaskMemFree
(
progid
);
}
}
progid
=
(
LPWSTR
)
0xdeadbeef
;
hr
=
ProgIDFromCLSID
(
&
CLSID_non_existent
,
&
progid
);
ok
(
hr
==
REGDB_E_CLASSNOTREG
,
"ProgIDFromCLSID returned %08lx
\n
"
,
hr
);
ok
(
progid
==
NULL
,
"ProgIDFromCLSID returns with progid %p
\n
"
,
progid
);
}
}
static
void
test_CLSIDFromProgID
(
void
)
static
void
test_CLSIDFromProgID
(
void
)
...
...
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