Question

Please read question, it will not be duplicate.

I have a dll of intel perceptual computing. They have provided demo console application which is using the dll and working fine.

I tried to use same dll in a windows application. As soon as I create object of class it is throwing error :

Could not load file or assembly 'libpxcclr, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Whats issue here I could not figure out. I am running this on x64 bit machine.

Thanks for help.

Was it helpful?

Solution

Not an answer but will not fit in comments...

  • you need to verify bitness of all DLL involved. You only specified bitness of your machine and it have nearly zero impact on bitness of the process and DLL. You need to check each DLL if it requires particular bitness (x86/x64) of the process.
  • you need to obtain list of DLL that are required and locations where they must be places (GAC, relative to process, in some special folder...). Normally whoever provides libraries/samples will have list of DLLs with location OR have setup program that configures all DLLs in correct places.
  • you need to make sure all files are in places they supposed to be (i.e. DLLs may need to be marked as "copy local", native binaries explicitly copied during build to approapriate places...). Often rebuild will clear up files places by hand - try to make all copy operation part of the build.

In worst case use tools like "depends" and "process explorer" to dig into dependencies...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top