background preloader

32bit/64bit App

Facebook Twitter

Interprocess Communication

Interprocess Communications. The Windows operating system provides mechanisms for facilitating communications and data sharing between applications. Collectively, the activities enabled by these mechanisms are called interprocess communications (IPC). Some forms of IPC facilitate the division of labor among several specialized processes. Other forms of IPC facilitate the division of labor among computers on a network. Typically, applications can use IPC categorized as clients or servers. After you decide that your application would benefit from IPC, you must decide which of the available IPC methods to use. Should the application be able to communicate with other applications running on other computers on a network, or is it sufficient for the application to communicate only with applications on the local computer?

The following IPC mechanisms are supported by Windows: Using the Clipboard for IPC The clipboard acts as a central depository for data sharing among applications. Using COM for IPC Using Data Copy for IPC. Accessing 32-bit DLLs from 64-bit code « Another Roadside Attraction. Migrating your 32-bit Windows application to a 64-bit machine can be problematic if you have 32-bit DLLs that you cannot re-write. Mike Becker shows you how you can access 32-bit DLLs from 64-bit code using built-in IPC mechanisms. Originally published on DNJ Online, June 2007 Microsoft’s 64-bit technology first appeared with Windows Server 2003 for Itanium 2 (also known as IA64 Architecture) and for eXtended technology CPUs (also known as x64 Architecture). It offers many advantages but also raises new issues for the software developer. For example, you may still need to access existing 32-bit DLLs from a 64-bit process. A key advantage of 64-bit technology is its ability to address up to 8Tb of memory, against a maximum of 2Gb for 32-bit processes.

Many C or C++ applications are easy to migrated to a 64-bit platform, particularly if they are written in a monolithic fashion. The conflict: 64-bit versus 32-bit The solution: a surrogate process COM as an IPC mechanism Implications 1. 2. 3. 4. An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework. Jon Box, Dan Fox Quilogy Contributions by: Jonathan Wells Microsoft Corporation Jim Wilson JW Hedgehog, Inc. March 2003 Applies to: Microsoft® .NET Compact Framework 1.0 Microsoft® Visual Studio® .NET 2003 Summary: Learn how to use the Platform Invoke (P/Invoke) feature of the .NET Compact Framework. (16 printed pages) Contents Introduction Using P/Invoke Marshaling Data Conclusion Introduction In order to realize the vision of access to information anywhere, any time, and on any device, developers need robust and feature-rich tools.

The .NET Compact Framework targets Pocket PC 2000, 2002, and embedded Microsoft® Windows® CE .NET 4.1 devices, and has been developed as a subset of the desktop Framework. Luckily for you, the .NET Compact Framework (like its desktop cousin) does support the Platform Invoke (P/Invoke) service. Using P/Invoke Declaration To begin, you must, at design time, tell the .NET Compact Framework which unmanaged function you intend to call. Invocation Imports Quilogy ... DllImport(), P/Invoke, 32 & 64 bit DLLs and all that! « Andrew Sheppard.

Using DllImport with 32-bit and 64-bit versions of the same DLL under Windows This has turned into a rather lengthy blog entry. It’s on a subject that, once you scratch the surface, merely reveals new layers and issues to look at. In this blog I present a number of ways to work around the problem of supporting unmanaged code 32-bit and 64-bit DLLs with the DllImport() attribute and P/Invoke. It is a topic made more complex by the fact there are even good reasons why you might want to load and run a 32-bit DLL on a 64-bit version of Windows even if a 64-bit version of the DLL is also available; one example is a managed code add-in for Excel (prior to Excel 2010, all versions of Excel were 32-bit applications, and Excel 2010 comes in both 32-bit and 64-bit versions) that loads and makes use of an unmanaged code DLL (which therefore has to be a 32-bit DLL if the user is running 32-bit Excel, even on 64-bit Windows).

The Problem An Overview of the Solutions Type A Type B Solution 1: Symbolic link. Migrating 32-bit Managed Code to 64-bit. Microsoft Corporation Updated May 2005 Applies to: Microsoft .NET Microsoft .NET Framework 2.0 Summary: Find out what is involved in migrating 32-bit managed applications to 64-bit, issues that can impact migration, and the tools that are available to assist you. (17 printed pages) Contents Introduction Managed Code in a 32-bit Environment Enter the CLR for the 64-bit Environment Migration and Platform Invoke Migration and COM Interoperability Migration and Unsafe Code Migration and Marshaling Migration and Serialization Summary Introduction This whitepaper discusses: What is involved in migrating managed applications from 32-bit to 64-bit The issues that can impact migration What tools are available to assist you This information is not meant to be prescriptive; rather it is intended to familiarize you with the different areas that are susceptible to issues during the process of migrating to 64-bit.

Managed Data—data that is allocated on the managed heap and collected via garbage collection.