SetupDLL problem (try 2)

From: N D (t_at_e.s.t)
Date: 04/07/04


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;
}



Relevant Pages

  • SetupDLL
    ... Hi I am trying to use a setupDLL in my installation with Installshield. ... I am giving this DLL as a setup DLL in the Windows CE object creation of ... not see any message boxes during the installation or removal. ...
    (microsoft.public.pocketpc.developer)
  • Re: The annoying VSTO 2003 message "The current .NET security poli
    ... You have to add a new project to you're solution that will create a dll. ... I have one project dll and one template Excel file. ... within the Charts folder I have a sub-folder called Chart_bin ... Interop Assembly) for .NET selected during installation. ...
    (microsoft.public.vsnet.vstools.office)
  • Re: Cant use web links from messages
    ... What registering a DLL does is add/update some entries in the registry. ... That's necessary if some other program deleted or modified the registry entries. ... > Choose 'Extract One File From Installation Disk'. ... >> How to Make Internet Explorer the Default Web Browser ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • RE: KB898461 consistently fails to install
    ... To fix the .dll issue, you will need to re-register a couple of .dll files. ... REGSVR32 WUAPI.DLL ... that several aspects of the installation may have failed. ... to 0x80006060 but I think it didn't add any detail to the log file. ...
    (microsoft.public.windowsupdate)
  • Re: Web Part deployment
    ... I sure hope there is going to be better support ... The Bentley.ECOM.dll is a support DLL for the ... you are going to control the installation ... > Microsoft is providing this information as a convenience to you. ...
    (microsoft.public.sharepoint.portalserver.development)