Re: SetupDLL problem (try 2)

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mike (mikeotown_at_nospam.msn.com)
Date: 04/09/04


Date: Thu, 8 Apr 2004 22:07:02 -0400

Are you talking about a setup.dll that gets called by wceload.exe on a
Pocket PC while installing a cab file?

Have you seen this article:
http://www.pocketpcdn.com/articles/setupdll.html
?

"N D" <t@e.s.t> wrote in message
news:enCaevOHEHA.3584@TK2MSFTNGP09.phx.gbl...
> 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;
> }
>
>



Relevant Pages

  • Re: POOM - Pocket PC 2003 - Visual Studio .NET 2003 - eMbedded Visual C++ 4.0
    ... 1.Your device is ARM based, so installing the x86 version to it will not ... For example the GotDotNet sample has no support for marshalling ... > the Pocket PC calendar using the Pocket Outlook Object Model. ...
    (microsoft.public.pocketpc.developer)
  • Re: How to enable Flash Player in a WinCE 4.2 OS design
    ... Pocket PC 2003 is a specific type of Windows Mobile device. ... installing it, you should know whether it's legal to install it on ... Checked on the BSquare site for Flash Player and could find nothing. ...
    (microsoft.public.windowsce.app.development)
  • Re: Win CE 4.2
    ... You're installing the wrong version of the Compact ... Paul T. ... Even tried copying the exe from pocket pc device, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Win CE 4.2
    ... You're installing the wrong version of the Compact ... Paul T. ... Even tried copying the exe from pocket pc device, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Not a valid Pocket PC application
    ... Are you sure you are installing applications that are designed for PocketPC? ... I just tried to download and install ... Adobe and it gave me an error 'filename' is not a valid Pocket PC ...
    (microsoft.public.pocketpc)