dansh
dansh

Reputation: 51

Know whether assembly is 64 bit or 32 bit

I want to programmatically know whether a com assembly is either a 32 bit or 64 bit. I checked on this forum and I came across corflags command.

Am getting this error:

C:>corflags Interop.FiscPrnSys.dll 'corflags' is not recognized as an internal or external command, operable program or batch file. I have located my assembly in C Where am I going wrong?My machine is 32 bit.Does this command only work in 64 bit?

Upvotes: 1

Views: 1365

Answers (2)

Steve
Steve

Reputation: 216333

Simply its location is not included in your path environment variable.

You could find it, after installing Microsoft SDK in the following paths

-32 bit version (Net 3.5)
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

-64 bit version (Net 3.5)
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64

Also, with Visual Studio installed I have found it in the following paths (Net 4.0)

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64

Upvotes: 1

Andreas Reiff
Andreas Reiff

Reputation: 8404

Use the Visual Studio Tools -> Visual Studio Command Prompt, that sets all path variables for using VS Tools. (You can also look for the path manually via cd or change your path variable like Steve said.)

Upvotes: 0

Related Questions