Ray's playground

 

Understanding Platform Invocation Services(Chapter 1 of COM and .NET Interoperability) part1

  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.

posted on 2010-03-08 22:08  Ray Z  阅读(193)  评论(0编辑  收藏  举报

导航