EAServer Manager generates a .def file for your component. Visual C++ requires a module definition file that specifies which functions are exported from a DLL and some options that control how the DLL is loaded into memory. Module definition files end with the extension .def.
For most projects, you can use the generated file as-is. In some cases, you may want to edit settings other than those in the EXPORTS section. For example, your component may perform better with a smaller or larger HEAPSIZE setting.
Never edit the generated function names in the EXPORTS section of the .def file for a C component, otherwise, the EAServer dispatcher will not be able to call your methods.
Below is the example module definition file for the sample Enrollment component:
LIBRARY libEnrollment INITINSTANCE Description ’EnrollmentComponent - EAServer’ HEAPSIZE 22000 PROTMODE CODE LOADONCALL EXECUTEREAD NONCONFORMING DATA PRELOAD READWRITE MULTIPLE NONSHARED EXPORTS __skl_Enrollment_v_1_0_getMajorList __skl_Enrollment_v_1_0_getCourses __skl_Enrollment_v_1_0_getStudentRecord __skl_Enrollment_v_1_0_putCourseRecord __skl_Enrollment_v_1_0_destroy __skl_Enrollment_v_1_0_createStudentRecord __skl_Enrollment_v_1_0_create __skl_Enrollment_v_1_0_getMajorEnrollmentRecord __skl_Enrollment_v_1_0_removeCourseRecord __skl_Enrollment_v_1_0_getCourseList __skl_Enrollment_v_1_0_getAllEnrollmentRecord
For components, the .def file must use the mangled function names as shown in the example. For each method in your component, the mangled name is:
__skl_Comp_v_1_0_method
where
Comp is the component name.
method is the method name.
Copyright © 2005. Sybase Inc. All rights reserved. |