ISVREG.H

/* */ 
/*ISVReg.h - include file for C routine that creates Registry entries */
/*for ISV Application Launching in SMS 1.2 */
/* */
/*Created: 8 April 1996 */
/* */

#ifndef ISVREG
#define ISVREG

/* we use the generic text-mapping macros to handle multiple platforms */
#include <tchar.h>

#define SmsRegMaxLength2048/* the maximum size of any value: bytes */

/* useful defines */
#define SmsRegRootKey_T("Software\\Microsoft\\SMS\\Applications")
#define SmsLocalMachine _T("HKEY_LOCAL_MACHINE")
#define SmsCurrentUser _T("HKEY_CURRENT_USER")
#define SmsRegNameValue_T("ApplicationName")
#define SmsRegOrder_T("Order")
#define SmsRegIconFile_T("IconFile")
#define SmsRegIconIndex_T("IconFile")
#define SmsRegCommand_T("Command")
#define SmsRegDescription_T("Description")
#define SmsRegWorkingDir_T("WorkingDir")
#define SmsRegRunWindow_T("RunWindow")
#define SmsRegEnableRule_T("EnableRule")
#define SmsRegPresentRule_T("PresentRule")
#define SmsRegArguments_T("Arguments")
#define SmsRegPrompt_T("Prompt")

#define SmsTotalNumContexts 13 /* Total number of defined contexts */
#define SmsGeneralContext _T("General")
#define SmsAlertsContext _T("SMSAlerts")
#define SmsArchWndContext _T("SMSArchWnd")
#define SmsJobsContext _T("SMSJobs")
#define SmsMachineContext _T("SMSMachine")
#define SmsMachineGroupsContext _T("SMSMachineGroups")
#define SmsPackagesContext _T("SMSPackages")
#define SmsPackageGroupsContext _T("SMSPackageGroups")
#define SmsQueriesContext _T("SMSQueries")
#define SmsQueryResultsContext _T("SMSQueryResults")
#define SmsSiteGroupsContext _T("SMSSiteGroups")
#define SmsSitesContext _T("SMSSites")
#define SmsTrapWndContext _T("SMSTrapWnd")

/* ISVContext holds the information stored in the a Context subkey */

typedef struct
{
LPTSTRm_pContextKey;/* the context the app launches from */
/*
m_pEnableRule, m_pPresentRule, and m_pArguments should point to
null-terminated strings with the character \r\n (CR\LF) in
them representing line breaks. RegisterSMSTool will
convert those strings into REG_MULTI_SZ data by replacing the \r\n
characters with nulls and adding an additional null at the end
*/
LPTSTRm_pEnableRule;
LPTSTRm_pPresentRule;
LPTSTRm_pArguments;
}
ISVContext,
*LPISVContext;

/* ISVAppReg holds the information stored in the Vendor Key and subkeys*/
/* including an array of ISVContext structs that hold the Context subkeys */
/* to be registered.*/

typedef struct
{
LPTSTRm_pVendor; /* name of vendor */
LPTSTRm_pAppNameKey; /* name of application key */
LPTSTRm_pAppName; /* value-name that appears in menu */
LPTSTRm_pCommand; /* The command to execute */
LPTSTRm_pWorkingDir; /* working directory */
LPTSTRm_pDescription; /* status bar description*/
LPTSTRm_pRunWindow; /* Normal, Minimized, or Maximized */

DWORDm_dwOrder;
BOOLm_bHkeyLocal; /* TRUE if using HKEY_LOCAL_MACHINE */
intm_nNumContexts;/* number of ISVContexts in m_pContexts */
LPISVContextm_pContexts;/* an array of ISVContexts */
}
ISVAppReg,
*LPISVAppReg;

#if defined(__cplusplus)
extern "C"
{
#endif
/*
RegisterSMSTool(BOOL bRemove, LPISVAppReg lpisv)

This routine makes multiple calls to Registry APIs to create or update
information about a single application that wants to be visible in the
SMS Tools menu and therefore launchable from the SMS Admin UI.

bRemove == TRUE means take out the information
bRemove == FALSE means add or update the information

The input struct contains all the strings and values to be registered.
See the ISV Application Launching spec for details about what these
strings should be. In general the name of the key or value is the
about the same as the member variable. Because an application can support
multiple contexts, the input structure has a pointer to multiple ISVContext
structs in an array, plus a count.

Return ERROR_SUCCESS if successful, otherwise the error code from the
Registry function that failed.
*/

LONG WINAPI RegisterSMSTool(BOOL bRemove, LPISVAppReg lpisv);
#if defined(__cplusplus)
}
#endif

#endif /* ISVREG */