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
f1598b97
Commit
f1598b97
authored
Oct 28, 2003
by
Rok Mandeljc
Committed by
Alexandre Julliard
Oct 28, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dmloader's behavior to be more MS compliant.
parent
d9b1bb71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
loader.c
dlls/dmloader/loader.c
+20
-2
No files found.
dlls/dmloader/loader.c
View file @
f1598b97
...
...
@@ -318,8 +318,25 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
ObjDesc
.
dwSize
=
sizeof
(
DMUS_OBJECTDESC
);
ObjDesc
.
dwValidData
=
DMUS_OBJ_FILENAME
|
DMUS_OBJ_FULLPATH
|
DMUS_OBJ_CLASS
;
/* I believe I've read somewhere in MSDN that this function requires either full path or relative path */
ObjDesc
.
guidClass
=
*
rguidClassID
;
strncpyW
(
ObjDesc
.
wszFileName
,
pwzFilePath
,
MAX_PATH
);
/* OK, MSDN says that search order is the following:
- current directory (DONE)
- windows search path (FIXME: how do I get that?)
- loader's search path (DONE)
*/
/* search in current directory */
if
(
!
SearchPathW
(
NULL
,
pwzFilePath
,
NULL
,
sizeof
(
ObjDesc
.
wszFileName
)
/
sizeof
(
WCHAR
),
ObjDesc
.
wszFileName
,
NULL
)
&&
/* search in loader's search path */
!
SearchPathW
(
This
->
wzSearchPath
,
pwzFilePath
,
NULL
,
sizeof
(
ObjDesc
.
wszFileName
)
/
sizeof
(
WCHAR
),
ObjDesc
.
wszFileName
,
NULL
))
{
/* cannot find file */
TRACE
(
"cannot find file
\n
"
);
return
DMUS_E_LOADER_FAILEDOPEN
;
}
TRACE
(
"full file path = %s
\n
"
,
debugstr_w
(
ObjDesc
.
wszFileName
));
return
IDirectMusicLoader8Impl_GetObject
(
iface
,
&
ObjDesc
,
iidInterfaceID
,
ppObject
);
}
...
...
@@ -358,6 +375,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoader (LPCGUID lpcGUID, LPDIRECTMUSICLOA
}
dmloader
->
lpVtbl
=
&
DirectMusicLoader8_Vtbl
;
dmloader
->
ref
=
1
;
MultiByteToWideChar
(
CP_ACP
,
0
,
".
\\
"
,
-
1
,
dmloader
->
wzSearchPath
,
MAX_PATH
);
list_init
(
&
dmloader
->
CacheList
);
*
ppDMLoad
=
(
LPDIRECTMUSICLOADER8
)
dmloader
;
return
S_OK
;
...
...
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