login about faq

For the Chilkat .NET assembly, is there a way to target Any CPU? Or would I need to build two windows clients 32bit & 64bit?

asked Mar 22 at 20:51

chilkat's gravatar image

chilkat ♦♦

edited Mar 22 at 20:52

You can target AnyCPU, but you'll get a warning message when building the app. All it means is that you must provide the matching memory-model DLL at runtime (i.e. 32-bit on a 32-bit system and 64-bit on a 64-bit system).

If the "Prefer 32-bit" checkbox is checked in your project settings, then your app will always run 32-bit, even on 64-bit systems. In my opinion, this is the best and least troublesome option. If your app isn't using more than 4GB of memory and is not computationally intensive such that it really benefits from 64-bit, then there's no real gain from a 64-bit address space w/ potential 64-bit CPU instructions.

Or.. if you'll never encounter a 32-bit Windows computer (which are getting harder to come by these days), then just produce a 64-bit build and forget about 32-bit. (But even still, 32-bit may be a better choice.)

Finally, there are ways of dynamically loading the assembly at runtime based on what is required. Therefore, an AnyCPU managed app can ship with both 32-bit and 64-bit Chilkat assemblies and then load the required one at runtime.

See http://cknotes.com/dynamically-loading-a-32-bit-or-64-bit-net-assembly-at-runtime/


answered Mar 22 at 20:59

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 22 at 20:51

Seen: 337 times

Last updated: Mar 22 at 20:59

powered by OSQA