Understanding Platform Invocation Services(Chapter 1 of COM and .NET Interoperability) part1
2010-03-08 22:08
495 查看
A traditional C-style DLL is not constructed using the building blocks of COM and does not have the same internal structure as a .NET binary. Rather, unmanaged DLLs contain some set of global functions, user-defined types (UDTs), and data points that are identified by a friendly string name and ordinal value. Typically, a *.def file is used to identify the available exports.
1 ; ATLServer.def : Declares the module parameters.
2 LIBRARY "ATLServer.DLL"
3
4 EXPORTS
5 DllCanUnloadNow @1 PRIVATE
6 DllGetClassObject @2 PRIVATE
7 DllRegisterServer @3 PRIVATE
8 DllUnregisterServer @4 PRIVATE
Although traditional *.def files have stood the test of time, the Visual C++ compiler also supports a specific declaration specification (declspec) that can be used to expose a member from a C-based DLL without the need to maintain and update a stand-alone *.def file.
1 ; ATLServer.def : Declares the module parameters.
2 LIBRARY "ATLServer.DLL"
3
4 EXPORTS
5 DllCanUnloadNow @1 PRIVATE
6 DllGetClassObject @2 PRIVATE
7 DllRegisterServer @3 PRIVATE
8 DllUnregisterServer @4 PRIVATE
Although traditional *.def files have stood the test of time, the Visual C++ compiler also supports a specific declaration specification (declspec) that can be used to expose a member from a C-based DLL without the need to maintain and update a stand-alone *.def file.
相关文章推荐
- Understanding Platform Invocation Services(Chapter 1 of COM and .NET Interoperability) part2
- The Anatomy of a COM Server(Chapter 2 of COM and .NET Interoperability) part1
- The Anatomy of a COM Server(Chapter 2 of COM and .NET Interoperability) part2
- A Primer on COM Programming Frameworks(Chapter 3 of COM and .NET Interoperability)
- COM Type Information(Chapter 4 of COM and .NET Interoperability)
- Understanding Classic COM Interoperability With .NET Applications
- Understanding Platform Invocation Services(Chapter 1 of COM and .NET Interoperability) part3
- COM and .NET Interoperability
- interoperability between COM and .Net Component
- 转:Understanding Classic COM Interoperability With .NET Applications
- Using the Web Services and COM+ Event System in the .Net Application.
- [Clojure] Data Collection and Data Analysis on the music of www.xiami.com - Part 5
- Chapter 4– Functions and Program Structure of TCPL (Part 11)
- Java EE and .NET Interoperability: Integration Strategies, Patterns, and Best Practices
- WS-Security Interoperability Issues: WebSphere, JBoss, Axis and .Net
- An Overview Of The New Services, Controls, And Features In ASP.NET 2.0
- [Clojure] Data Collection and Data Analysis on the music of www.xiami.com - Part 2
- [Clojure] Data Collection and Data Analysis on the music of www.xiami.com - Part 6
- Understanding ASP.NET Provider Model (Creating Custom Membership and Role Providers) - Part 3