Microsoft
Software
Hardware
Network
Question : VB.net 32bit&64bit COM Refereces?
Ok so I just wanna say I am a complete newb when it comes to 64bit programming topics, and not exactly an expert in VB.net either.
I've built a program that uses an AutoCAD 2011 COM Interop DLL that gets copied to the \bin dir on build. This works perfectly on my 32bit XP dev machine. However when switching to a 64bit XP workstations the app throws "Unable to cast" / "E_NOINTERFACE" errors.
From what i've read the problem is that when on a x64 OS the app will run as an x64 process and then try to call a x86 DLL which wont work. So i have tried changing the project settings to target x86 (manually inside .vsproj since i am using VB08 Express) but that doesnt seem to work either. I have changed the .vsproj to x86, rebuilt the app, verified that i have the x86 version of the DLLs in the folder and it still fails on x64 machines... i did verify in Task Manager that it was indeed running as x86 with the * next to it.
I have located the 64bit version of the DLL on the 64bit machines, if i just simply copy/paste to overwrite the DLL in the \bin dir it works perfectly on x64 machines, even without the app being rebuilt. However that naturally breaks the 32bit machines...
How can i have one app that will work for both platforms and reference the correct DLL?
Answer : VB.net 32bit&64bit COM Refereces?
COM only works for 32 bit operative systems or 64 bit in compatible mode. It can not run in 64-bit native mode.
You need to use two setup projects (one for 32 bit and the other one for 64 bits) and compile your rpogram for anyCpu.
Random Solutions
phase difference of trig functions
div height worls in everything else but IE? WHY?
is it possible to connect a mobile phone (of any type) to my PC and have any incoming sms messages received and processed by the pc.
DNS Zones not AXFR'ing from primary
Centering text in header of collapsible panel
The multi-part identifier could not be bound and Ambiguous column name in SQL Server 2008
What is the probability that the mean of a sample is within a certain range (z scores)?
How do I uninstall Symantec Backup Exec 11d in Windows Server 2003??
servername
ASP.NET: URLs with apostrophes throwing error on server but not in dev environment