FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DLL Loader + Invalid DLLs

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
dsimcha



Joined: 24 Oct 2008
Posts: 16

PostPosted: Tue Jul 20, 2010 9:08 am    Post subject: DLL Loader + Invalid DLLs Reply with quote

How do I make gtkD's DLL loader automatically ignore unsuccessful DLL loads? When I run a program I created in gtkD and compiled using (32-bit) DMD2 from a Win64 console and try to load a file dialog, I get:

"The image file C:\Program Files (x86)\Symantec\Symantec Endpoint Protection\SnacNp64.dll is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load."

When I select cancel everything works fine. When I select ok, I get an access violation, presumably because gtkD tries to load a 64-bit DLL into a 32-bit program.

However, when I run from a Cygwin terminal instead of a native Win64 one, it seems that the Cygwin console catches the error and forces the DLL to be loaded, thus crashing my application.

This error does not seem to happen for other 32-bit GTK-based apps, such as GIMP, on the same machine.
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Tue Jul 20, 2010 2:54 pm    Post subject: Reply with quote

The loaded dll's are defined in src/gtkc/paths.d but SnacNp64.dll isn't one of them, windows might be trying to load the dll as a dependency. But i cant imagine why.
Back to top
View user's profile Send private message
dsimcha



Joined: 24 Oct 2008
Posts: 16

PostPosted: Tue Jul 20, 2010 3:43 pm    Post subject: Reply with quote

Mike Wey wrote:
The loaded dll's are defined in src/gtkc/paths.d but SnacNp64.dll isn't one of them, windows might be trying to load the dll as a dependency. But i cant imagine why.


It has to do with network drives apparently. It only happens when I have a network drive connected. When I don't everything works fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group