.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Executable DLL both 32 and 64 bit programs

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF

Hi all,

I'd like making a DLL that I have to use in different programs, in different PCs. One of this programs is Excel (that is 32 bit on 32 bit PCs and it is 64 bit on 64 bit PCs), and oneother is an application that is everywere 32 bit.

How can I make this DLL able to run in all environment?

The developer PC has .NET 2010 and W7/32 bit.

I try to compile the DLL in AnyCPU configuration, I can register the DLL with the 32bit into a 64bit machine, but Excel doesn't run it.
I try to compile the DLL in 64bit configuration (thinking to make two different DLL), but the compiler returns the following error:
The file "[...].dll" is not a valid assembly
And into the Release folder I found the dll and the xml files, but not the tlb file.

View Complete Post

More Related Resource Links

Inside Windows: An In-Depth Look into the Win32 Portable Executable File Format, Part 2


The Win32 Portable Executable File Format (PE) was designed to be a standard executable format for use on all versions of the operating systems on all supported processors. Since its introduction, the PE format has undergone incremental changes, and the introduction of 64-bit Windows has required a few more. Part 1 of this series presented an overview and covered RVAs, the data directory, and the headers. This month in Part 2 the various sections of the executable are explored. The discussion includes the exports section, export forwarding, binding, and delayloading. The debug directory, thread local storage, and the resources sections are also covered.

Matt Pietrek

MSDN Magazine March 2002

Inside Windows: An In-Depth Look into the Win32 Portable Executable File Format


A good understanding of the Portable Executable (PE) file format leads to a good understanding of the operating system. If you know what's in your DLLs and EXEs, you'll be a more knowledgeable programmer. This article, the first of a two-part series, looks at the changes to the PE format that have occurred over the last few years, along with an overview of the format itself. After this update, the author discusses how the PE format fits into applications written for .NET, PE file sections, RVAs, the DataDirectory, and the importing of functions. An appendix includes lists of the relevant image header structures and their descriptions.

Matt Pietrek

MSDN Magazine February 2002

New Graphical Interface: Enhance Your Programs with New Windows XP Shell Features


The Windows XP shell introduces many new features that both users and developers are sure to welcome. The interface supports a number of styles that will be new to users, and it also supports customization of those styles through a new concept called themes. There are more shell registry settings available to the user and developer, a facility for customizing infotips, and infotip shell extensions. In addition, folder views can be customized. This article covers these shell changes and includes a discussion of a number of other Windows XP additions. These include fast user switching, which lets users log on and off quickly, and AutoPlay support for a variety of devices and file types not previously supported.

Dino Esposito

MSDN Magazine November 2001

B2B Frontiers in E-Commerce: Implement Affiliate Programs to Create New Partnerships and Generate Bu


Like the Internet itself, e-commerce is evolving. Today's e-commerce companies are allowing their customers to plug into existing catalogs and ordering systems, creating new synergistic relationships. Some companies are even adding real-time chat with customer service personnel. This article gives you an overview of some of the new e-commerce concepts and implementations that are helping forge those new relationships with customers, vendors, and shipping companies. The importance of these relationships, as well as the specific technologies used to encourage communication and collaboration are discussed and illustrated with representative code samples.

Ted Coombs

MSDN Magazine May 2000

Serialized objects not consistant between programs

I am experiencing a baffling problem regarding object serialization.  My project consists of two executables, a data editor and the main program, both of which use a common set of DLL object libraries.  The editor is used to create and manipulate a set of custom objects, which it then serializes to a data file.  The main program loads this data file on startup.  The objects are stored in an ObservableCollection, and the serialization routine simply serializes this collection to a data file using a binary formatter.  This routine is in the DLL, and the only data regarding serialization created in the EXEs is the stream, which is passed as a parameter to the function in the DLL. What I'm finding is that the data editor behaves as expected.  If I make changes to the data with the editor, it is writen to the file and the changes will reflect correctly when I run the program again.  However, the main program exhibits a strange behavior where it "remembers" the orginal values of the data objects when they were first persisted.  For instance, if I go into the editor and edit the name of one of the objects, the main program will still pull up the original name of the object when it deserializes the objects.  However, the change will persist in the data editor.  If I add new objects to the collection via the editor, t

Microsoft.Net Frameworks 2.0 SP2; 3.0 SP2; 3.5 SP1 Do I need all of these programs?

Thank you for the help. My computer has little disk space left and these programs are taking up a lot of space. Do I need all of them or only the latest version/sp?

Send Email from C# Executable

I know how to send an email message from a C# web program but how do you send an email message from a C# executable? Thanks for any help you can provide. Mike

i have two programs , how to send parameters from one to another ?

Hello ,  i have two programs , how to send parameters from one to another ? Thanks in advance :)Kareem Naguib

Suite Integration Toolkit executable has stopped working On Windows 2008 R2

I am not sure what else I can say about this except I seem to run into this error each time I attempt to install any .NET Related tool above 1.1. I have tried clean out all .NET installs to reinstall but I run up against this and at this point, I have a machine that is clean of .NET 2.0 through 4.0. I am unable to reinstall because I keep running up against this problem. I am not certain where to go from here Problem signature:   Problem Event Name: APPCRASH   Application Name: setup.exe_Microsoft® Visual Studio® 2008   Application Version: 9.0.30729.1   Application Timestamp: 488f1f5c   Fault Module Name: urlmon.dll   Fault Module Version: 8.0.7600.16385   Fault Module Timestamp: 4a5bdf64   Exception Code: 80000003   Exception Offset: 0008b5df   OS Version: 6.1.7600.   Locale ID: 1033   Additional Information 1: 3da0   Additional Information 2: 3da0da3513034f247aa571ff6433c6a8   Additional Information 3: efee   Additional Information 4: efee7faa0523fea9d1582687f878296e Read our privacy statement online:   http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline:   C:\Windows\system32\en-US\erofflps.txtN

Framework 4.0 dll loaded by a 2.0 executable cannot find "xxxx.resources.dll"

 Hello, I have an interesting situation here that I was hoping someone may be able to give some pointers on.  First my application is all provided within a class library assembly so that it can be loaded by multiple hosts.  We are investigating moving to Visual Studio 2010 and the .Net Framework 4.0 for some of the new features.  However, one of our hosts is a 2.0 click once application that we do not have the source to.  I've tried modifying the config file for the executable to add the useLegacyV2RuntimeActivationPolicy with the 4.0 as the supported runtime and setting loadFromRemoteSources as suggested by a Google search and that came close to working.  However, depending on the workflow through our client code is giving a System.IO.FileNotFoundException for various references. The message associated with the exception is Could not load file or assembly 'file:///XXXXXX.resources.dll' or one of its dependencies. The system cannot find the file specified."  Were the XXXXX changes and the .dll may or may not be present depending on whether Assembly.Load or Assembly.LoadFrom was used to perform the load.  Any thoughts would be greatly appreciated. [Addition: I forgot to mention that our app originally targeted Framework 3.5SP1] Michael Fischer

.NET classes that allow you interct with windows while running other programs?

Hi everyone, I was wondering which .NET classes could I use if I want my aplication to interact wih windows while windows is running other programs. For Instance: As Snagit works...If you are using IE and press the Print screen key,(and have Snagit installed and activated) automatically the Snagit editor opens  showing the Clipboard you'v just got for you to edit it. Thanks!

.NET classes that allow you interct with windows while running other programs?

Hi everyone, I was wondering which .NET classes could I use if I want my aplication to interact wih windows while windows is running other programs. For Instance: As Snagit works...If you are using IE and press the Print screen key,(and have Snagit installed and activated) automatically the Snagit editor opens  showing the Clipboard you'v just got for you to edit it. Thanks!

Problem Creating Asymmetric Key from Executable File

In trying to create an asymmetric key from an executable file, I get an error if the path length to the dll is very long, while a short path length works perfectly.  Does anyone know what the limitation on the path length is?

Need to share a parameter across several programs in C#


I need to share and increment a counter accross several different instances of a program - written in c#. I used to use named shared memory in a previous life, but cant seem to figure out how its currently done in c#. Can anyone help with a snipet?

Thanks in advance,


Is the executable file generated by compiler a Managed code or Unmanaged code ?



when we compile our vb.net or c#.net code (say in a simple console application) then in bin\Debug folder a .exe file is created.Is that a managed code? when i directly execute this file,will this target CLR ? or will it directly run on OS ?

Why there is ConsoleApplication1.vshost.exe.manifest files created in that folder ?

What is .pdb file ?

That executable file is also created in obj\Debug folder .Why ?

Executable runs on 32-bit but not on 64-bit


Hi guys,

I have a project that I originally developed on a 32-bit PC. I recently received a new PC that is 64-bits and I can compile the project successfully on this machine. However, when I try to run it I get the following error, which I never seen on the 32-bit PC:

"An unhandled exception of type 'System.DllNotFoundException' occurred in Project1.exe

Additional information: Unable to load DLL 'jtag_atlantic.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

If I take that same executable, the one that was compiled on the 64-bit PC, over to a 32-bit PC it runs fine. So I can compile it but not run it.

Some background on the dll it is complaining about. I was provided with a dll driver which was used to compile a .lib. This was done on a 32-bit machine. That .lib is linked into my project, so it actually doesn't need the dll so I am not sure why it is complaining about it.

Could the problem be that the .lib was created on a 32-bit PC?

I tried placing the dll in the working directory but that didn't work but it shouldn't need it anyway.

Thanks guys, your help is much appreciated!

Joe S.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend