views:

51

answers:

0

Apparently when I run some 32-bit apps I created using gtkD on Win64 systems with Symantec Endpoint Protection installed and network drives mapped, and try to bring up a file dialog, something in the runtime attempts to load SnacNp64.dll, a 64-bit DLL, into 32-bit address space. This DLL is a component of Symantec Endpoint Protection that's used for networking stuff, hence this error only happening under such a narrow set of circumstances.

When I run a program from a Win64 native 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, and the program seems to suffer no ill effects from the DLL failing to load. 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 machines.

Basically, how do I make absolutely sure that my 32-bit app never tries to load a 64-bit DLL under any circumstances?