您的位置:首页 > 运维架构

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: