DLL, Import = "invalid machine type" for one exe only
Posted: Mon Oct 24, 2011 5:00 pm
I have a project that consists of a few exe's and one dll.
All the exe's use the dll.
All exe's build fine, except one.
When I build it; I'm told that the dll has an invalid machine type.
Just "Import mydll.dll/endimport" will trigger the error. Including one or 20 definitions in the import block doesn't matter -- always gets the "Invalid machine type".
I have rebooted, moved the project (one post said it was a rights issue), created another admin user (I am admin on my machine) -- still happens.
Is there any way to figure out why this one exe doesn't like the dll?
The dll works fine: I have this code (to easily switch back and forth):
So I can use the dll w/o issue. (the exe runs fine & works as expected)
Even if I comment out the call to the dll function, and include no functions, ie:
Will generate the error. Other exe's that include the import build fine.
All the exe's use the dll.
All exe's build fine, except one.
When I build it; I'm told that the dll has an invalid machine type.
Just "Import mydll.dll/endimport" will trigger the error. Including one or 20 definitions in the import block doesn't matter -- always gets the "Invalid machine type".
I have rebooted, moved the project (one post said it was a rights issue), created another admin user (I am admin on my machine) -- still happens.
Is there any way to figure out why this one exe doesn't like the dll?
The dll works fine: I have this code (to easily switch back and forth):
Code: Select all
CompilerIf #False
Import "InstTK.dll"
GetMSSQLServers(nIndex = -1)
EndImport
CompilerElse
Prototype ptGetMSSQLServers(nIndex=-1)
hDLL = OpenLibrary(#PB_Any,"Insttk.dll")
Global GetMSSQLServers.ptGetMSSQLServers = GetFunction(hDLL,"GetMSSQLServers")
CompilerEndIf
Even if I comment out the call to the dll function, and include no functions, ie:
Code: Select all
Import "InstTK.dll"
EndImport