ObjectStore Release 5 Windows VAR Kit
Chapter 3
API Reference
The API descriptions that follow are based on the ObjectStore Release 5 version of OS_SETUP.DLL. The descriptions are organized alphabetically. Check the README.TXT file supplied with the VAR kit for the latest information about these APIs.
OS_BuildUnzipList
EXPORT BOOL OS_BuildUnzipList (char *InstallDir, char *InstallFrom,
BOOL Upgrading, long Flags, char *ZipFileName,
int iZipFile, long Mask)
Creates an internal list of files to be extracted from a given zip file.
You must call this entry before attempting to extract files from a given zip file.
OS_CheckLogFile
EXPORT int OS_CheckLogFile (CHAR *FileName, int FileNameSize)
Attempts to determine if the Server log file has been initialized.
OS_CheckRAWFS
EXPORT int OS_CheckRAWFS ()
Determines if any RAWFS partitions exist.
OS_CheckServerStartup
EXPORT int OS_CheckServerStartup ()
Determines if the ObjectStore Server is currently set for autostartup.
OS_DecompressZipFile
EXPORT BOOL OS_DecompressZipFile (char *InstallDir, char *InstallFrom,
BOOL Upgrading, long Flags, char *ZipFileName,
int iZipFile, long Mask)
Decompresses an entire zip file. Not currently used for the InstallShield installation.
This entry is obsolete.
OS_DeleteUninstRegKey
EXPORT BOOL OS_DeleteUninstRegKey (CHAR *szKeyPath, CHAR * szKey)
InstallShield adds an item to the list of uninstallable applications in the registry as one activity in the InstallShield ObjectStore installation process. However, ObjectStore cannot be uninstalled in the standard InstallShield mechanism, so Object Design deletes the key to avoid confusing the user. For this purpose, szKeyPath is
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
and szKey is ObjectStore.
OS_DeleteUninstRegKey attempts to delete the key from
HKEY_LOCAL_MACHINE.
ObjectStore uses the InstallShield VerUpdateFile routine to install C++ run-time files. VerUpdateFile determines whether a reboot is required to complete installation. However, VerUpdateFile requires that the deinstall system be initialized (creating the Uninstall key) that OS_DeleteUninstRegKey later deletes.
OS_GetDefaultSrvrLogFile
EXPORT BOOL OS_GetDefaultSrvrLogFile(CHAR *pSvrLogFile)
Constructs a default pathname for the Server log file.
OS_GetDiskRequirement
EXPORT long OS_GetDiskRequirement (unsigned long Flags, char *InstallDir)
Returns an estimate of the amount of disk space required to install ObjectStore, based on the options represented by the Flags word.
OS_GetInstallFlags
XPORT long OS_GetInstallFlags (BOOL bLcClient, BOOL bLcServer, BOOL bLcDevo,
BOOL bCompDBMS, BOOL bCompSingle, BOOL bCompExamples,
BOOL bCompHTML, BOOL bCompPScript)
The entries that determine disk space requirements and lists of files to be installed use a flag, long, whose bits indicate which installation components should be copied, based on the various Boolean values passed in.
OS_GetNextUnzip
EXPORT int OS_GetNextUnzip (char *UnzipName)
Gets the name of the next file to be unzipped.
OS_GetRegistration
EXPORT int OS_GetRegistration (CHAR *pRegisterType, CHAR *pRegEntry, int RegEntrySize, int
LocalMachBool)
Returns ObjectStore registration registry information.
Values are retrieved from
HKEY_LOCAL_MACHINE\SOFTWARE\Object Design Inc.\ObjectStore.4.0\Registration
or
HKEY_CURRENT_USER\Software\Object Design Inc.\ObjectStore.4.0\Registration
Values stored in HKEY_LOCAL_MACHINE include all of these that are literal strings:
Values stored in HKEY_CURRENT_USER consist only of
OS_GetServerParameter
EXPORT int OS_GetServerParameter (const CHAR *Key, CHAR *Value)
Gets the current value of an ObjectStore Server parameter.
Server parameters are stored under the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Object Design Inc.\ObjectStore.4.0\Server
Note that a parameter can be known but have a null value. In this case, the OS_GetServerParameter returns 0 but the value buffer will contain a null string.
OS_GetZipFile
EXPORT int OS_GetZipFile(char *ArchiveName, int Which, long *Mask)
Gets the name of the next zip file and a mask, corresponding to the flags (see OS_ZipLogFiles) associated with the files in the zip file.
OS_InitDLL
EXPORT int OS_InitDLL (HWND hWnd, CHAR *pAppPath)
OS_InitLog
EXPORT int OS_InitLog (CHAR *Logfile, BOOL bSilent)
Initializes the ObjectStore Server and the Server log file.
OS_IsUserAdmin
EXPORT BOOL OS_IsUserAdmin ()
Attempts to determine if the current user is an administrator for this system. For InstallShield users, Object Design recommends that you use the InstallShield IS (USER_ADMINISTRATOR) call instead. Some installation processes, especially those involving the registry, might not be possible if the user is not running as administrator.
OS_NeedCheckpoint
EXPORT int OS_NeedCheckpoint ()
Determines if a Server log file or a RAWFS partition exists on the system. If they do, the user should be queried to see if they need to run checkpoint before proceeding.
OS_NeedCheckpoint examines the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\Object Design Inc.\ObjectStore.4.0\Server
and looks for either a Log File entry or a Partition0 entry. It does not check to see if either of these entries corresponds to actual data on the system.
OS_OStoreInstalled
EXPORT int OS_OStoreInstalled (CHAR *pOSRootDir, CHAR *pSingleDir, CHAR *pExamplesDir,
CHAR *pHTMLDir, CHAR *pPScriptDir)
Attempts to determine if ObjectStore is currently installed on the system. If it is, it attempts to determine pathnames for directories being used. This entry should be called very early in the setup process. All the directories involved are obtained from the corresponding registry entries found in pOSRootDir, which points to a 512-byte buffer that holds the current OS_ROOTDIR.
Each of the return values depends on the corresponding directory's being named in the registry data and on the existence of the named directory in the system.
An internal default installation directory pathname might be set based on what directories are found. At any given time, only one installation directory is permitted; therefore, if multiple directories are encountered, the internal setting corresponding to the lower return value (that is, OS_ROOTDIR is preferred) is used.
OS_OStoreRunning
EXPORT BOOL OS_OStoreRunning ()
Attempts to determine if ObjectStore is currently running. Looks for any services (Server or Cache Manager) that might be running and for ObjectStore DLLs that might be active.
OS_rename_dir
EXPORT BOOL OS_rename_dir (char *Path, char *NewPath)
Renames a directory (or file).
OS_RenameToLongFiles
EXPORT BOOL OS_RenameToLongFiles (char *InstallDir)
Renames files to their correct long (non-8.3) names.
OS_SetInstallDirectories
EXPORT int OS_SetInstallDirectories (CHAR *pOSRootDir, CHAR *pSingleDir,
CHAR *pExamplesDir, CHAR *pHTMLDir,
CHAR *pPScriptDir)
Sets registry values corresponding to the directory names passed in. All names passed in should be the same, but directories corresponding to components that have not been installed should be set to "". Do not pass in NULL pointers.
OS_SetRegistration
EXPORT int OS_SetRegistration (CHAR *pRegisterType, CHAR *pRegEntry, int LocalMachBool)
Sets the ObjectStore registration registry information.
See OS_GetRegistration for details of registration keys used by ObjectStore.
OS_SetServerParameter
EXPORT int OS_SetServerParameter (const CHAR *Key, CHAR *Value)
Sets an ObjectStore Server parameter value.
Server parameters are stored under the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Object Design Inc.\ObjectStore.4.0\Server
OS_SetServerParams
EXPORT int OS_SetServerParams ()
Runs the ObjectStore Server Parameters dialog and sets any parameters selected by the user.
OS_SetupRawfs
EXPORT int OS_SetupRawfs (int *bPartChanged)
Runs the ObjectStore RAWFS partition dialogs and sets registry values appropriately.
OS_ShutdownOStore
EXPORT int OS_ShutdownOStore ()
Attempts to shut down any running ObjectStore services (Server or Cache Manager).
OS_status_update_bar_num
EXPORT int OS_status_update_bar_num (char *CurrFile)
Gets the total disk space used by files installed to this point.
OS_TermDLL
EXPORT int OS_TermDLL ()
OS_Uninstall
EXPORT int OS_Uninstall (char *OSRootDir, BOOL bUninstallRAWFS)
Removes ObjectStore from the system; attempts to remove all vestiges of ObjectStore.
OS_update_environment
EXPORT BOOL OS_update_environment (char *OSRootDir, BOOL bRuntimeOnly, char
*OSSchemaDir)
Sets various environment values.
Environment values that can be set or modified by this call include
For Windows NT, settings are made in the registry. For Windows 95, settings are made in OS_AUTO.BAT, which is called from AUTOEXEC.BAT.
OS_UpdateStartup
EXPORT int OS_UpdateStartup (BOOL StartServer, CHAR *InstallDir, BOOL StartNow)
Updates Server autostartup values in the registry and in system services databases.
OS_UnzipOneFile
EXPORT INT OS_UnzipOneFile (char *UnzipName)
Unzips one file.
Unzip error codes are defined in os_setup.h, with names beginning with PK_ and values ranging from 1 to 51.
OS_ZipLogFiles
EXPORT BOOL OS_ZipLogFiles (char *InstallDir)
Opens log files OSUNZIP.LOG and OSUNZIP.ERR in InstallDir and redirects stdout and stderr to those files. You can use this entry to direct unzip output to these files, but the InstallShield installation does not currently do this.
[previous] [next]
Copyright © 1998 Object Design, Inc. All rights
reserved.
Updated: 03/26/98 21:57:32