Changes to Module Definition Files(.DEF)
 
 
 

A typical .def file looked like the following example prior to VS2005:

LIBRARY update1 EXPORTS   LibDescription       @1         LibNumberClasses     @2         LibClassDesc         @3         LibVersion           @4      SECTIONS    .data READ WRITE

With VS2005 we now have the following code. The numbers in parentheses point to footnotes below:

LIBRARY update1.dlo        ( 1) EXPORTS    LibDescription       @1      PRIVATE (2)    LibNumberClasses     @2       PRIVATE    LibClassDesc         @3      PRIVATE    LibVersion           @4      PRIVATE    LibInitialize        @6      PRIVATE (3)    LibShutdown          @7      PRIVATE SECTIONS   .data READ WRITE

Notes:

  1. If the extension is not given, the linker assumes .DLL. Since it doesn't match the actual output filename, a warning is given.
  2. PRIVATE will export the function from the DLL, but will not include the function prototype in the import library.
  3. We have generally used 6 and 7 for the ordinal number on the two new functions, but this is not enforced and your plug-in will work if you use a different number.