SetupDLL problem (try 2)
From: N D (t_at_e.s.t)
Date: 04/07/04
- Next message: KS: "Re: Help with EVB"
- Previous message: Ian: "Help with EVB"
- Next in thread: Mike: "Re: SetupDLL problem (try 2)"
- Reply: Mike: "Re: SetupDLL problem (try 2)"
- Reply: The Fat Controller: "Re: SetupDLL problem (try 2)"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 7 Apr 2004 18:08:46 -0400
Ok my last try on this ng to get some clue about this:
.......................
I am trying to play with this setup DLL. I made my setupDLL using eVC++.
Currently I am only trying to pop up a MessageBox before and after install
and uninstall. For some reason, it does not seem to be working. I tried
adding the WindowsCE object to Basic MSI and InstallscriptMSI project and
give my setupDLL when it asked if I had any. The installation seems to be
working fine. All the required files are copied but no messageBoxes pop up
and hence I do not know if my setup DLL is working right or not. My .def
file has the four required functions exported. And I am pasting here my DLL
code, any idea where the problem might be? am I doing something wrong in
registering the DLLs or whatever. I am using DevStudio9. Is it supposed to
copy this SetupDLL somewhere on PocketPC? I wanted to check if it is doing
that. I am hoping to pop up these boxes today.
Any input will be greatly appreciated, again.
Thanks for your time.
------------------------------------------------------
#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;
}
- Next message: KS: "Re: Help with EVB"
- Previous message: Ian: "Help with EVB"
- Next in thread: Mike: "Re: SetupDLL problem (try 2)"
- Reply: Mike: "Re: SetupDLL problem (try 2)"
- Reply: The Fat Controller: "Re: SetupDLL problem (try 2)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|