cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gthomas
Level 2

Callout File Information

Is there any information regarding the requirements to create a callout file DLL for an update? (C++; entry-point functions (exported), registration?)
0 Kudos
(4) Replies
gthomas
Level 2

This file needs to be written as a C++ [or similar DLL] so the entry point can be exported.

HEADER:
#ifdef USCALLOUT_EXPORTS
#define USCALLOUT_API __declspec(dllexport)
#else
#define USCALLOUT_API __declspec(dllimport)
#endif

// This class is exported from the USCallout.dll
class USCALLOUT_API CUSCallout {
public:
CUSCallout(void);
// TODO: add your methods here.
};

extern USCALLOUT_API int nUSCallout;

USCALLOUT_API int fnUSCallout(void);

SOURCE:
#include "USCallout.h"

#import "C:\Program Files\Common Files\InstallShield\UpdateService\Agent.exe" named_guids no_namespace


void ClientCalloutMessagePending( IMessageProperties* msg )
{

//msg->QueryValue(DownloadUrl, "RobURL" );
//MessageBox(0,"in message pending","",0);
return;
}

void ClientCalloutDownloadBegin( IMessageProperties* msg )
{
//MessageBox(0,"in message download begin","",0);
return;
}
void ClientCalloutDownloadComplete( IMessageProperties* msg )
{
//MessageBox(0,"in message download complete","",0);
return;
}
void ClientCalloutInstallStart( IMessageProperties* msg )
{
MessageBox(0"","INSTALLATION INSTRUCTIONS",0);
return;
}
void ClientCalloutInstallEnd( IMessageProperties* msg, int rc )
{
//MessageBox(0,"in message install end","",0);
return;
}
0 Kudos
mmuhhin
Level 2

gthomas wrote:
This file needs to be written as a C++ [or similar DLL] so the entry point can be exported.

HEADER:
#ifdef USCALLOUT_EXPORTS
#define USCALLOUT_API __declspec(dllexport)
#else
#define USCALLOUT_API __declspec(dllimport)
#endif

// This class is exported from the USCallout.dll
class USCALLOUT_API CUSCallout {
public:
CUSCallout(void);
// TODO: add your methods here.
};

extern USCALLOUT_API int nUSCallout;

USCALLOUT_API int fnUSCallout(void);

SOURCE:
#include "USCallout.h"

#import "C:\Program Files\Common Files\InstallShield\UpdateService\Agent.exe" named_guids no_namespace


void ClientCalloutMessagePending( IMessageProperties* msg )
{

//msg->QueryValue(DownloadUrl, "RobURL" );
//MessageBox(0,"in message pending","",0);
return;
}

void ClientCalloutDownloadBegin( IMessageProperties* msg )
{
//MessageBox(0,"in message download begin","",0);
return;
}
void ClientCalloutDownloadComplete( IMessageProperties* msg )
{
//MessageBox(0,"in message download complete","",0);
return;
}
void ClientCalloutInstallStart( IMessageProperties* msg )
{
MessageBox(0"","INSTALLATION INSTRUCTIONS",0);
return;
}
void ClientCalloutInstallEnd( IMessageProperties* msg, int rc )
{
//MessageBox(0,"in message install end","",0);
return;
}



The supplied sample has problems.

I've tried to compile it, but "IMessageProperties" was not found in "Agent.exe" type library.
I've also opened "Agent.exe" with OLE/COM Object Viewer tool and it also did not find the interface named "IMessageProperties" inside "Agent.exe" file.

I've searched the Net for "IMessageProperties" and did not find any extra information.

Please provide me with some help about where can I find library, type library or anything where "IMessageProperties" interface is implemented.

Or, if you have a working sample project of that "USCallout Dll" please provide me with complete project archive.
0 Kudos
mmuhhin
Level 2

Er... Cancel the last one. I've updated my IS US (from v2.2 to 5.1) and now "Agent.exe" has all the necessary interfaces.

But the DLL is still not working!

How can I ensure that US is running any methods from within the supplied DLL sample? I've uncommented all of the Message Boxes, but there still won't appear any.

Please, provide me with WORKING MSVC++ PROJECT!
0 Kudos
Ritesh
Level 4

You might try this:


USCALLOUT_API void ClientCalloutMessagePending( IMessageProperties* msg )
{
//msg->QueryValue(DownloadUrl, "RobURL" );
//MessageBox(0,"in message pending","",0);
return;
}
USCALLOUT_API void ClientCalloutDownloadBegin( IMessageProperties* msg )
{
//MessageBox(0,"in message download begin","",0);
return;
}
USCALLOUT_API void ClientCalloutDownloadComplete( IMessageProperties* msg )
{
//MessageBox(0,"in message download complete","",0);
return;
}
USCALLOUT_API void ClientCalloutInstallStart( IMessageProperties* msg )
{
MessageBox(0"","INSTALLATION INSTRUCTIONS",0);
return;
}
USCALLOUT_API void ClientCalloutInstallEnd( IMessageProperties* msg, int rc )
{
//MessageBox(0,"in message install end","",0);
return;
}



You might need a .def file, like so:

; callout.def : Declares the module parameters.

LIBRARY "callout.dll"

EXPORTS
ClientCalloutMessagePending @1
ClientCalloutDownloadBegin @2
ClientCalloutDownloadComplete @3
ClientCalloutInstallStart @4
ClientCalloutInstallEnd @5
0 Kudos