Commit Graph

75 Commits

Author SHA1 Message Date
Eric Pouech 33041701dc dmloader: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:39:02 +01:00
Michael Stefaniuc 5e42498e63 dmloader: Drop ifdef'ed out dead code.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 21:32:42 +01:00
Alexandre Julliard 8d12efecc9 dmloader: Check for invalid class in EnableCache().
Fixes a test failure with sone Mingw versions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 21:56:46 +02:00
Michael Stefaniuc 4915c51ea6 dmloader: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-22 10:20:46 +01:00
Alistair Leslie-Hughes 6e986bbd81 dmloader: Release objects on error paths (Coverity).
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 21:26:34 +01:00
Michael Stefaniuc 8320b40077 dmloader: Get rid of single use debugstr_dmreturn().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:52:41 +01:00
Francois Gouget 1ee1f3d6e1 dmloader: Fix the spelling of a TRACE() message and a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 21:06:59 +01:00
Alistair Leslie-Hughes 4df9039f75 dmloader: Support DMUS_OBJ_MEMORY cache lookups.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 08:22:47 +01:00
Alistair Leslie-Hughes 8388ea840f dmloader: Rewrite IDirectMusicLoader8 ReleaseObject using find_cache_object.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 21:31:59 +01:00
Alistair Leslie-Hughes cc67ea6dfa dmloader: Rewrite IDirectMusicLoader8 CacheObject using find_cache_object.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 21:31:56 +01:00
Alistair Leslie-Hughes d66b3ae922 dmloader: Rewrite cache object lookup.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 21:31:53 +01:00
Alistair Leslie-Hughes 4aee9ba5ad dmloader: Stop after find first matching object.
This stops a crash in Legoland on startup when finding cached objects.
Placing a break in each of the if's causes the wrong object to be loaded.

The help states it looks at each type in order. So, we might have to loop
the cache multiple times to ensure that when an object has flag DMUS_OBJ_OBJECT,
it's preferred over a DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH match.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 22:59:34 +01:00
Alistair Leslie-Hughes 9da70c0758 dmloader: ScanDirectory doesn't specify the full path.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Alexandre Julliard a420853848 dmloader: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 10:29:43 +02:00
Michael Stefaniuc 47e57c58b6 dmloader: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 22:25:53 +02:00
Nikolay Sivov 96fd03b269 dmloader: Use safe list iterator when clearing the cache (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:13:56 +09:00
Michael Stefaniuc cfb1f130fd dmloader: Remove a now redundant helper function.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 22:14:00 +02:00
Michael Stefaniuc 4a70f67ffc dmloader: Get rid of two gratuitous typedefs.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:43 +02:00
Michael Stefaniuc ad0dbe3e02 dmloader: Don't leak memory in the cache.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:39 +02:00
Michael Stefaniuc 3531e50c93 dmloader: Simplify the cache list handling.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:36 +02:00
Michael Stefaniuc c2aa725356 dmloader: Remove some commented out debugging code.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:31 +02:00
Michael Stefaniuc fd4cdf5df4 dmloader: Simplify the search path handling.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:27 +02:00
Michael Stefaniuc a8900c9bbb dmloader: Move struct definitions to the files they are used in.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:22 +02:00
Michael Stefaniuc 8b98126666 dmloader: Use a bitfield to store the per class cache enable info.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:13 +02:00
Michael Stefaniuc 2e3a8a6fb8 dmloader: Handle NULL and empty path strings in SetSearchDirectory().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:03:21 +02:00
Michael Stefaniuc 0f202ac84b dmloader: Initialize a stack variable to avoid erratic test behavior.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 10:36:32 +02:00
Michael Stefaniuc a69dbd41be dmloader: Return an error for an invalid directory.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:23:18 +02:00
Michael Stefaniuc 879c428200 dmloader: Cleanup IDirectMusicLoaderImpl_SetSearchDirectory().
and emit a FIXME only if the clear flag is set.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:23:15 +02:00
Michael Stefaniuc ed6ee0f815 dmloader: Avoid a crash on a NULL string pointer.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:23:11 +02:00
Fabian Maurer ca0f6c0d51 dmloader: Better error reporting in IDirectMusicLoaderImpl_SetObject.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-21 20:57:06 +01:00
Michael Stefaniuc 917d5eabe6 dmloader: None of the COM classes support aggregation. 2014-03-13 11:21:40 +01:00
Marcus Meissner b27027ef09 dmloader: Check return of CoCreateInstance (Coverity). 2013-01-08 16:35:34 +01:00
Christian Costa cdf727ebd1 dmloader: Use dump_DMUS_OBJECTDESC to dump data to avoid truncation in TRACE. 2012-12-20 18:29:46 +01:00
Christian Costa b47facb4af dmloader: COM cleanup of IDirectMusicLoader object. 2012-12-18 19:26:26 +01:00
André Hentschel 295ffdfa96 dmloader: Fix sizeof statement (coverity). 2012-11-05 11:14:40 +01:00
Francois Gouget fac36c55e9 Assorted typo, spelling, wording and case fixes. 2012-05-15 16:26:43 +02:00
Andrew Eikum 5e522a1d1c dmloader: Don't claim partial success when loading fails. 2012-03-26 12:41:27 +02:00
Francois Gouget 2b54a7ee72 dmloader: Remove an unused critical section. 2011-11-14 15:25:27 +01:00
Michael Stefaniuc 989f39ef32 dmloader: Simplify the module refcount handling. 2011-08-02 11:51:06 +02:00
David Adam 5e39af2683 dmloader: Fix a possible null dereference. 2010-01-06 10:47:42 +01:00
Marcus Meissner 6891b96364 dmloader: pObject NULL checks are not necessary (Coverity). 2009-12-11 12:16:26 +01:00
Francois Gouget 96848a0605 Remove spaces before '\n's. 2009-03-09 12:05:58 +01:00
Francois Gouget 2166afceb7 Assorted spelling fixes. 2008-12-29 11:36:49 +01:00
Francois Gouget fae2edb91e dmloader: Add a trailing '\n' to a Wine trace. 2008-12-17 15:27:24 +01:00
Alexandre Julliard 02bfacff5a dmloader: Make some functions static. 2008-12-03 12:12:34 +01:00
Francois Gouget b362db0327 dmloader: Remove WINAPI on static functions where not needed. 2008-12-01 12:44:46 +01:00
Michael Stefaniuc b609a5c037 dmloader: Do not cast NULL. 2008-11-03 13:41:49 +01:00
Andrew Talbot 4cd6ef739d dmloader: Assign to structs instead of using memcpy. 2008-02-25 13:27:27 +01:00
Alexandre Julliard 7718d2bd7c dmusic: Fix license headers that mistakenly use GPL instead of LGPL.
Confirmed by the original author and the major contributors.
2007-05-30 12:54:07 +02:00
Jan Zerebecki 70f6afdc9c dmloader: Add DebugInfo to critical sections. 2007-03-12 13:41:16 +01:00