a. 使用def文件,文件如下
LIBRARY "MsiActions"
DESCRIPTION 'Custom Action DLL created for Java Installer Project'
EXPORTS
InstallAction
UninstallAction
b. 不使用def文件,
1. extern "C" __declspec(dllexport) unsigned int __stdcall UninstallAction ( MSIHANDLE hModule )
2. project setting -> link -> Project Options, 加上
/export:InstallAction
/export:UninstallAction