SafeHouse ActiveX Component

SafeHouse Professional includes an ActiveX component which is registered
with Windows when the product is initially installed. This component can
be used by programmers to gain access to a variety of SafeHouse's features,
making it possible to automate many of the product's functions using custom
scripts and programming.

Component:

Module: SafeHouseCOM.dll

ProgID:
SafeHouseCOM.SafeHouseUtility

Threading: Apartment

Interface: Dual, supporting both late and
early binding.

SafeHouse Utilities Designed for Scripting

The following executables found in the SafeHouse program files folder
support a rich set of command line options that are so complete that you
can practically do anything through scripting that you can otherwise do
from the standard SafeHouse dialogs. This includes creating new volumes,
opening and closing volumes, as well as resizing them.

TIP:
Running
the SafeHouse utilities silently without a window requires using the /SILENT and /GO
command line options in addition to the usual parameters required by each
utility. When you specify these options and are not missing any other
required options, the SafeHouse utilities will not display and visual
user interface.

Using the SafeHouse ActiveX Component from Visual Basic

Before using the ActiveX component with Visual Basic you must first
set a reference to the module in Visual Basic as you would with any other
COM component
that you might choose to work with. Once you set a reference, you can
access the component as shown below.

Example:

Dim sAboutText as String

Dim SafeHouse As New
SAFEHOUSECOMLib.SafeHouseUtility

sAboutText = SafeHouse.About

Property: About

Returns a string indicating the version of the ActiveX module.

Property: DriverVersion

Returns a string with the version of the SafeHouse device driver in
the form "3.00.000", or if not loaded, then "0.0.0".

Property: MappedDriveLetters

Returns string with list of the drive letters currently in use by open
SafeHouse volumes. If there aren't any open volumes, then an empty string
is returned.

Example:

If SafeHouse has three open volumes using drive letters D, E
and F, this
property would return "DEF"
as the property value.

Function: GetVolumeFilepathFromDriveLetter

Returns the filepath for the volume associated with the mapped drive
letter. If no volume is mapped to this letter, then returns empty string.

Syntax:

GetVolumeFilepathFromDriveLetter(DriveLetter as String)
as String

Example:

Calling this function as shown below might return a string such as "c:\SafeHouse\Test.sdsk".

GetVolumeFilepathFromDriveLetter("D")

Function: ExecuteProgram

Executes the specified application with command line and working directory
by calling the Win32 CreateProcess() API. Wait is a flag which is used
to specify if the function should return immediately (False), or if it
should Wait (True) for the application to terminate, and then return the
application ExitCode. If Wait is False,
then you will not be able to obtain the exit code since this function
will return prior to the code becoming available.

Syntax:

ExecuteProgram(Application
as String, CmdLine as String, WorkingDir
as String, Wait as Boolean) as Integer

Application is the filepath to the program to execute. Although this
function was intended to make it easy to invoke the SafeHouse utilities,
it could in fact be used to invoke any standard Windows executable.

If Wait is set to False, the return code from this function is always
0. See SafeHouse Exit Codes for a complete
list of possible return values.

CmdLine and WorkingDir
may be empty strings if not needed.

Example:

The following example will close all open SafeHouse volumes without
displaying any visual interface or sounds. Since the /force option is
included, the volumes will be closed even if they have open files. Notice
that /silent and /go are used to keep SafeHouse from displaying its dialog.

Function: GetVolumeProperties

This function retrieves a number of properties about a specified volume
file and returns it as an XML string. This may be useful when using custom
programming to track volumes. The information returned includes elements
indicating things such as serial numbers, administrator groups, file size,
password policies and other general attributes.

The resulting XML document does not contain any information which can
be used to breach the data in your volumes.

Syntax:

GetVolumeProperties(VolumeFilepath as String, XmlOutputFile
as String) as Integer

Returns 0 when successful. Any other value indicates failure. When successful,
the XML output string variable will be filled with the requested XML document.

CmdLine and WorkingDir
may be empty strings if not needed.

Function: PerformLocalPasswordReset

This function can be used to reset the normal user password for a volume.
It performs identically to the dialog-based features in SafeHouse for
performing local administrator password resets. This is simply an alternate
method to accomplish the same task for projects which use custom programming
to work with SafeHouse volumes.

To use this feature, SafeHouse groups must be enabled for the volume
and you must know the administrator password for its respective group.

Syntax:

PerformLocalPasswordReset(VolumeFilepath as String,
AdminPassword as String, NewPassword as String) as Integer

Returns 0 when successful. Any other value indicates failure.

Example:

The following example uses your administrator password to change the
user password for the volume to MyNewPassword.