#include <windows.h>
#include "ce_setup.h"
/* This is the entry point of the DLL. This DLL is to be used during */
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
/* This function will be executed before the install starts */
codeINSTALL_INIT Install_Init(HWND hwndParent,
BOOL fFirstCall,
BOOL fPreviouslyInstalled,
LPCTSTR pszInstallDir)
{
if(fFirstCall)
{
/* TO DO: Add any "one time only" initialization code here. */
MessageBox(NULL, "First installation: preinstall", "preinstall", MB_OK);
}
else
{
/* TO DO: Add your code here. Be sure to take into account the */
/* fact that "pszInstallDir" may be different each time this */
/* function is called! */
MessageBox(NULL, "Subsequent installation: preinstall", "preinstall", MB_OK);
}
return codeINSTALL_INIT_CONTINUE;
}
/* This function will be executed after the install finishes */
codeINSTALL_EXIT Install_Exit(HWND hwndParent,
LPCTSTR pszInstallDir,
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
WORD cFailedRegVals,
WORD cFailedShortcuts)
{
/* First, make sure the installation succeeded */
if(cFailedDirs||cFailedFiles||cFailedRegKeys||cFailedRegVals
||cFailedShortcuts)
{
/* The installation failed, so clean up and exit */
/* TO DO: Undo any actions taken in Install_Init() */
#ifdef __WINBUG
/* WINBUG: codeINSTALL_EXIT_UNINSTALL doesn't work - it causes the*/
/* "Writing uninstall info" dialog to hang. We'll always return */
/* codeINSTALL_EXIT_DONE instead. */
return codeINSTALL_EXIT_DONE;
#else
return codeINSTALL_EXIT_UNINSTALL;
#endif
}
/* IMPORTANT NOTE: */
/* We must register OCX controls ourselves for CE 2.11 Palm-size PC */
/* devices due to a bug in "wceload.exe" that causes the device to */
/* hang while creating registry entries. */
/* If you plan to distribute your application to Palm-size PC users,*/
/* **DO NOT** mark the files as self-registering from within */
/* InstallShield for Windows CE. You will need to register the */
/* controls from within this DLL instead. */
/* TO DO: Add any other controls you need to register below. */
MessageBox(hwndParent, "PostInstall", "PostInstall", MB_OK);
return codeINSTALL_EXIT_DONE;
}
/* This function will be executed before the uninstall starts. */
codeUNINSTALL_INIT Uninstall_Init(HWND hwndParent,
LPCTSTR pszInstallDir)
{
/* Undo anything that was done during install through this DLL, */
/* creating shortcuts etc */
MessageBox(NULL, "Pre-uninstall", "Pre-UnInstall", MB_OK);
return codeUNINSTALL_INIT_CONTINUE;
}
/* This function will be executed after the uninstall finishes */
codeUNINSTALL_EXIT Uninstall_Exit(HWND hwndParent)
{
/* TO DO: Undo any other actions taken during installation and not */
/* cleaned up in Uninstall_Init(). */
MessageBox(NULL, "Post-uninstall", "Post-UnInstall", MB_OKCANCEL);
return codeUNINSTALL_EXIT_DONE;
}
#include "ce_setup.h"
/* This is the entry point of the DLL. This DLL is to be used during */
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
/* This function will be executed before the install starts */
codeINSTALL_INIT Install_Init(HWND hwndParent,
BOOL fFirstCall,
BOOL fPreviouslyInstalled,
LPCTSTR pszInstallDir)
{
if(fFirstCall)
{
/* TO DO: Add any "one time only" initialization code here. */
MessageBox(NULL, "First installation: preinstall", "preinstall", MB_OK);
}
else
{
/* TO DO: Add your code here. Be sure to take into account the */
/* fact that "pszInstallDir" may be different each time this */
/* function is called! */
MessageBox(NULL, "Subsequent installation: preinstall", "preinstall", MB_OK);
}
return codeINSTALL_INIT_CONTINUE;
}
/* This function will be executed after the install finishes */
codeINSTALL_EXIT Install_Exit(HWND hwndParent,
LPCTSTR pszInstallDir,
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
WORD cFailedRegVals,
WORD cFailedShortcuts)
{
/* First, make sure the installation succeeded */
if(cFailedDirs||cFailedFiles||cFailedRegKeys||cFailedRegVals
||cFailedShortcuts)
{
/* The installation failed, so clean up and exit */
/* TO DO: Undo any actions taken in Install_Init() */
#ifdef __WINBUG
/* WINBUG: codeINSTALL_EXIT_UNINSTALL doesn't work - it causes the*/
/* "Writing uninstall info" dialog to hang. We'll always return */
/* codeINSTALL_EXIT_DONE instead. */
return codeINSTALL_EXIT_DONE;
#else
return codeINSTALL_EXIT_UNINSTALL;
#endif
}
/* IMPORTANT NOTE: */
/* We must register OCX controls ourselves for CE 2.11 Palm-size PC */
/* devices due to a bug in "wceload.exe" that causes the device to */
/* hang while creating registry entries. */
/* If you plan to distribute your application to Palm-size PC users,*/
/* **DO NOT** mark the files as self-registering from within */
/* InstallShield for Windows CE. You will need to register the */
/* controls from within this DLL instead. */
/* TO DO: Add any other controls you need to register below. */
MessageBox(hwndParent, "PostInstall", "PostInstall", MB_OK);
return codeINSTALL_EXIT_DONE;
}
/* This function will be executed before the uninstall starts. */
codeUNINSTALL_INIT Uninstall_Init(HWND hwndParent,
LPCTSTR pszInstallDir)
{
/* Undo anything that was done during install through this DLL, */
/* creating shortcuts etc */
MessageBox(NULL, "Pre-uninstall", "Pre-UnInstall", MB_OK);
return codeUNINSTALL_INIT_CONTINUE;
}
/* This function will be executed after the uninstall finishes */
codeUNINSTALL_EXIT Uninstall_Exit(HWND hwndParent)
{
/* TO DO: Undo any other actions taken during installation and not */
/* cleaned up in Uninstall_Init(). */
MessageBox(NULL, "Post-uninstall", "Post-UnInstall", MB_OKCANCEL);
return codeUNINSTALL_EXIT_DONE;
}