Help - Search - Members - Calendar
Full Version: dll won't load in 0.7.2
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
danZ
OK< here's a strange one.

I upgraded to the latest beta of foobar, grabbed the corresponsing SDK, and installed both. I then completely rebuilt my component, foo_looks, including all SDK libraries, etc. When I launch foobar I get.

INFO (CORE) : startup time: 440 ms
ERROR (CORE) : Failed to load DLL: foo_looks_d.dll, reason: Unable to load dll.

My current release dll (foo_looks 1.06 compiled agains the 0.7 SDK) loads fine in 0.7.2 and I haven't changed anything in the code since I compiled that, I just upgraded my SDK.

Just to be sure I went back to the 0.7 SDK and rebuilt everything again and that .dll will load fine in 0.7.2.

What did I miss?
Peter
Make sure that your DLL doesn't somehow link to older version of utf8api.dll
Post your "bad" dll if nothing helps.
danZ
QUOTE(zZzZzZz @ Nov 5 2003, 03:09 PM)
Make sure that your DLL doesn't somehow link to older version of utf8api.dll
Post your "bad" dll if nothing helps.

As far as I can tell no linking problems.

Here's the version that won't load. Thanks for your help.

foo_looks_test.zip
Peter
QUOTE(danZ @ Nov 6 2003, 03:24 AM)
QUOTE(zZzZzZz @ Nov 5 2003, 03:09 PM)
Make sure that your DLL doesn't somehow link to older version of utf8api.dll
Post your "bad" dll if nothing helps.

As far as I can tell no linking problems.

Here's the version that won't load. Thanks for your help.

foo_looks_test.zip

uh....
CODE
         00AF34D8 89 1D 24 D3 B2 00    mov         dword ptr ds:[0B2D324h],ebx
         00AF34DE C7 43 0C 00 00 00 00 mov         dword ptr [ebx+0Ch],0
crash => 00AF34E5 8A 0E                mov         cl,byte ptr [esi]
         00AF34E7 84 C9                test        cl,cl
         00AF34E9 74 0E                je          00AF34F9
Check your static object initialization code etc.
danZ
QUOTE(zZzZzZz @ Nov 5 2003, 03:09 PM)
uh....
CODE
         00AF34D8 89 1D 24 D3 B2 00    mov         dword ptr ds:[0B2D324h],ebx
         00AF34DE C7 43 0C 00 00 00 00 mov         dword ptr [ebx+0Ch],0
crash => 00AF34E5 8A 0E                mov         cl,byte ptr [esi]
         00AF34E7 84 C9                test        cl,cl
         00AF34E9 74 0E                je          00AF34F9
Check your static object initialization code etc.

OK, I'll check but any idea why the same code works with one version of the SDK and not the other?

Edit

Nevermind, I found the problem - it was in my static initialization, thanks.

#include "SDK/config.h"
static cfg_string cfg_primary_look("primary", 0); // Full path of loaded look
static cfg_string cfg_secondary_look("secondary", 0); // Full path of hot swap look

Apparently in previous versions it was OK to pass a NULL. I changed the above to

static cfg_string cfg_primary_look("primary", ""); // Full path of loaded look
static cfg_string cfg_secondary_look("secondary", ""); // Full path of hot swap look

and all is well again.
/Edit
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.