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
472a5e52
Commit
472a5e52
authored
Aug 16, 2002
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GetClassFile implementation.
parent
e23c96f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
compobj.c
dlls/ole32/compobj.c
+16
-13
filemoniker.c
dlls/ole32/filemoniker.c
+2
-0
ole32.spec
dlls/ole32/ole32.spec
+1
-1
No files found.
dlls/ole32/compobj.c
View file @
472a5e52
...
@@ -1211,12 +1211,14 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
...
@@ -1211,12 +1211,14 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
{
{
IStorage
*
pstg
=
0
;
IStorage
*
pstg
=
0
;
HRESULT
res
;
HRESULT
res
;
int
nbElm
=
0
,
length
=
0
,
i
=
0
;
int
nbElm
,
length
,
i
;
LONG
sizeProgId
=
20
;
LONG
sizeProgId
;
LPOLESTR
*
pathDec
=
0
,
absFile
=
0
,
progId
=
0
;
LPOLESTR
*
pathDec
=
0
,
absFile
=
0
,
progId
=
0
;
WCHAR
extention
[
100
]
=
{
0
};
LPWSTR
extension
;
static
const
WCHAR
bkslashW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
dotW
[]
=
{
'.'
,
0
};
TRACE
(
"
()
\n
"
);
TRACE
(
"
%s, %p
\n
"
,
debugstr_w
(
filePathName
),
pclsid
);
/* if the file contain a storage object the return the CLSID writen by IStorage_SetClass method*/
/* if the file contain a storage object the return the CLSID writen by IStorage_SetClass method*/
if
((
StgIsStorageFile
(
filePathName
))
==
S_OK
){
if
((
StgIsStorageFile
(
filePathName
))
==
S_OK
){
...
@@ -1260,23 +1262,24 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
...
@@ -1260,23 +1262,24 @@ HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid)
absFile
=
pathDec
[
nbElm
-
1
];
absFile
=
pathDec
[
nbElm
-
1
];
/* failed if the path represente a directory and not an absolute file name*/
/* failed if the path represente a directory and not an absolute file name*/
if
(
lstrcmpW
(
absFile
,(
LPOLESTR
)
"
\\
"
))
if
(
!
lstrcmpW
(
absFile
,
bkslashW
))
return
MK_E_INVALIDEXTENSION
;
return
MK_E_INVALIDEXTENSION
;
/* get the extension of the file */
/* get the extension of the file */
extension
=
NULL
;
length
=
lstrlenW
(
absFile
);
length
=
lstrlenW
(
absFile
);
for
(
i
=
length
-
1
;
(
(
i
>=
0
)
&&
(
extention
[
i
]
=
absFile
[
i
])
);
i
--
);
for
(
i
=
length
-
1
;
(
i
>=
0
)
&&
*
(
extension
=
&
absFile
[
i
])
!=
'.'
;
i
--
)
/* nothing */
;
/* get the progId associated to the extension */
if
(
!
extension
||
!
lstrcmpW
(
extension
,
dotW
))
progId
=
CoTaskMemAlloc
(
sizeProgId
)
;
return
MK_E_INVALIDEXTENSION
;
res
=
RegQueryValueW
(
HKEY_CLASSES_ROOT
,
extention
,
progId
,
&
sizeProgId
);
res
=
RegQueryValueW
(
HKEY_CLASSES_ROOT
,
extension
,
NULL
,
&
sizeProgId
);
if
(
res
==
ERROR_MORE_DATA
){
/* get the progId associated to the extension */
progId
=
CoTaskMemAlloc
(
sizeProgId
);
res
=
RegQueryValueW
(
HKEY_CLASSES_ROOT
,
extension
,
progId
,
&
sizeProgId
);
progId
=
CoTaskMemRealloc
(
progId
,
sizeProgId
);
res
=
RegQueryValueW
(
HKEY_CLASSES_ROOT
,
extention
,
progId
,
&
sizeProgId
);
}
if
(
res
==
ERROR_SUCCESS
)
if
(
res
==
ERROR_SUCCESS
)
/* return the clsid associated to the progId */
/* return the clsid associated to the progId */
res
=
CLSIDFromProgID
(
progId
,
pclsid
);
res
=
CLSIDFromProgID
(
progId
,
pclsid
);
...
...
dlls/ole32/filemoniker.c
View file @
472a5e52
...
@@ -1096,6 +1096,8 @@ int WINAPI FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable)
...
@@ -1096,6 +1096,8 @@ int WINAPI FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable)
int
len
=
lstrlenW
(
str
);
int
len
=
lstrlenW
(
str
);
TRACE
(
"%s, %p
\n
"
,
debugstr_w
(
str
),
*
stringTable
);
strgtable
=
CoTaskMemAlloc
(
len
*
sizeof
(
LPOLESTR
));
strgtable
=
CoTaskMemAlloc
(
len
*
sizeof
(
LPOLESTR
));
if
(
strgtable
==
NULL
)
if
(
strgtable
==
NULL
)
...
...
dlls/ole32/ole32.spec
View file @
472a5e52
...
@@ -66,7 +66,7 @@ init OLE32_DllEntryPoint
...
@@ -66,7 +66,7 @@ init OLE32_DllEntryPoint
64 stub DllGetClassObjectWOW
64 stub DllGetClassObjectWOW
65 stdcall DoDragDrop(ptr ptr long ptr) DoDragDrop
65 stdcall DoDragDrop(ptr ptr long ptr) DoDragDrop
66 stub EnableHookObject
66 stub EnableHookObject
67 stdcall GetClassFile(
p
tr ptr) GetClassFile
67 stdcall GetClassFile(
ws
tr ptr) GetClassFile
68 stdcall GetConvertStg(ptr) GetConvertStg
68 stdcall GetConvertStg(ptr) GetConvertStg
69 stub GetDocumentBitStg
69 stub GetDocumentBitStg
70 stdcall GetHGlobalFromILockBytes(ptr ptr) GetHGlobalFromILockBytes
70 stdcall GetHGlobalFromILockBytes(ptr ptr) GetHGlobalFromILockBytes
...
...
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