|
|
The IGateKeeper interface has no properties.
The methods below are used to interact with the Gatekeeper system.
This system is stateless and information needs to be passed for each
call.
- Method
GkGetNewPID
Idispatch ID
1
Parameters
None
Return Value(s)
BSTR* bsNewPID - pointer to BSTR to
receive new private program ID.
Description
This method will create a new Program
ID. This is the private key for the encryption. The public key that
should be used in the program is the Packed PID
- Method
GkGetPublicPID
Idispatch ID
2
Parameters
BSTR bstrPrivatePID - BSTR of private
program ID.
Return Value(s)
BSTR* bstrPublicPID - pointer to BSTR to
receive new public program ID.
Description
Method GetPublicPID takes a PID returned
from GetNewPID and returns the public PID that is used for key
decryption. Keys can not be encrypted using the public PID only the
private PID
- Method
GkGetSerialNumber
Idispatch ID
3
Parameters
BSTR bstrPublicPID - BSTR of public
program ID.
Return Value(s)
BSTR* bstrSerialNumber - Pointer to BSTR
to receive a hardware specific serial number.
Description
Method GetSerialNumber returns the
machine specific product serial number.
- Method
GkCreateKey
Idispatch ID
4
Parameters
int UseRuns - Boolean that indicates use
of number of runs restriction.
int nRuns - Integer value for number of
runs to allow (0-254).
int UseDays - Boolean that indicates use
of number of days restriction
int nDays - Integer value for number of
days to allow (0-254).
int UseDate - Boolean that indicates use
of fixed date restriction.
int nMonth - integer value for month of
fixed expiration date.
int nDay - integer value for day of
fixed expiration date.
int nYear - integer value for year of
fixed expiration date.
int UseMaxVer - Boolean that indicates
use of maximum version information.
int wMaxVer - Integer value for maximum
version. User must query and evaluate this. (16 bits)
int bUseCDKey - Boolean that indicates
that the serial number is a CD Serial Number
long dwReserved - reserved must be 0
int wOptions - Integer value of 16 bits
of options.
int bUseSerial - Boolean that indicates
that the serial number is a hardware serial number.
BSTR bstrPrivatePID - BSTR of private
program ID.
BSTR bstrSerialNum = BSTR of serial
number if used.
Return Value(s)
BSTR* bstrKey - pointer to BSTR that
receives the new key.
Description
Method CreateKey Combines all used
information and creates a unique key for the product and serial
number.
- Method
GkGetCDSerialNumber
Idispatch ID
5
Parameters
BSTR bstrPublicPID - BSTR of public
program ID.
Return Value(s)
BSTR* bstrSerialNum - pointer to a BSTR
that will receive the random CD serial number.
Description
Method GetCDSerialNumber creates a
serial number that can be paired with a key using the private PID.
- Method
GkWriteLicense
Idispatch ID
6
Parameters
BSTR bstrFileName - BSTR of the file name
for the license file.
BSTR bstrLicenseText - BSTR of the text
of the license (512 characters max)
BSTR bstrPublicPID - BSTR of the public
program ID.
BSTR bstrSerialNum - BSTR of the serial
number if used.
BSTR bstrKey - BSTR of the key.
Return Value(s)
int* bDone - Boolean value that
indicates that the operation completed.
Description
Method WriteLicense will create a
license file that works with the corresponding program ID
- Method
GkReadLicense
Idispatch ID
7
Parameters
BSTR bstrFileName - BSTR of the license
file name.
Return Value(s)
BSTR* bstrLicenseText - pointer to BSTR
that receives the text of the license (512 characters max)
BSTR* bstrPublicPID - pointer to BSTR
that receives the public program ID of this license file.
BSTR* bstrSerialNumber - pointer to BSTR
that receives the serial number if used.
BSTR* bstrKey - pointer to BSTR that
receives the key for this license file.
int* bDone - pointer to Boolean that
indicates the operation completed.
Description
Method ReadLicense reads and decryptes a
license file and returns the components.
- Method
GkCheckLicense
Idispatch ID
8
Parameters
BSTR bstrFileName - BSTR of the license
file name.
BSTR bstrPublicPID - BSTR that contains
the public program ID.
BSTR bstrSerialNum -BSTR that contains
the serial number if used.
BSTR bstrKey -BSTR that contains the
key for this license file.
int bUpdateUse - Boolean value that is
used to force an update of the run usage. This value should be TRUE on
the first call from a program and FALSE thereafter.
int bForceUpdate - Boolean value that is
for advanced use. Should be set to FALSE.
Return Value(s)
int* bDone
Description
method CheckGkLicense will check the
license restrictions and can optionally update the use information.
The bForceUpdate is for advanced use and should be set to false unless
this method is called from the GkRegistrationRequired event. That is
the ONLY time that the bForceUpdate should be set to TRUE.
- Method
GkValidDate
Idispatch ID
9
Parameters
None
Return Value(s)
BOOL* bValid - pointer to a Boolean that
indicates that the system date is valid.
Description
Method GkValidDate will check that the
system date is valid and has not been set back.
- Method
GkLicenseDateValid
Idispatch ID
10
Parameters
BSTR bstrPublicPid - BSTR that contains
the public program ID.
BSTR bstrLicenseFile - BSTR of the
license file name.
Return Value(s)
int* bValid - pointer to a Boolean that
indicates that all date restrictions on the license have not expired.
Description
Method GkLicenseDateValid will check
that the end date on the license has not passed.
- Method
GkGetDaysLeft
Idispatch ID
11
Parameters
BSTR bstrPublicPid - BSTR that contains
the public program ID.
BSTR bstrLicenseFile - BSTR of the
license file name.
Return Value(s)
int* nCount - Pointer to an integer that
holds the number of days left on the license.
Description
Method GkGetDaysLeft returns the number
of days left on the license. If not date restricted this method
returns 32767
- Method
GkGetRunsLeft
Idispatch ID
12
Parameters
BSTR bstrPublicPid - BSTR that contains
the public program ID.
BSTR bstrLicenseFile - BSTR of the
license file name.
Return Value(s)
int* nCount - pointer to an integer that
holds the number of runs left on the license.
Description
Method GkGetRunsLeft returns the number
of runs left on the license. If not run restricted this method will
return -1.
- Method
GkGetMaxVer
Idispatch ID
13
Parameters
BSTR bstrPublicPid - BSTR that contains
the public program ID.
BSTR bstrLicenseFile - BSTR of the
license file name.
Return Value(s)
int* wVer - pointer to an integer that
holds the user defined maximum version for this license.
Description
Method GkGetMaxVer returns the maximum
version field data if set. If not set this method returns 0.
- Method
GkGetOptions
Idispatch ID
14
Parameters
BSTR bstrPublicPid - BSTR that contains
the public program ID.
BSTR bstrLicenseFile - BSTR of the
license file name.
Return Value(s)
int* wOptions - pointer to an integer
that holds the user defined options.
Description
Method GkGetOptions returns the option
value. If not set this method returns 0.
- Method
GkUseInternalDialogs
Idispatch ID
15
Parameters
int bUseDialogs - Boolean that dictates
the use of internal registration dialogs.
Return Value(s)
None
Description
method UseInternalDialogs sets the
internal dialog use flag. If not set then the return values need to be
carefully checked
- Method
GkGetUseDialogState
Idispatch ID
16
Parameters
None
Return Value(s)
int* bUseDialogs - pointer to a Boolean
that holds the state of the internal dialog use flag.
Description
Method GetUseDialogState returns the
state of the use internal dialog flag.
- Method
GkTestFireRegistrationRequiredEvent
Idispatch ID
17
Parameters
None
Return Value(s)
None
Description
Method GkTestFireRegistrationRequiredEvent
is used for testing and will fire the RegistrationRequired event.
< - B>Method
GkTestFireLicenseDataModifedEvent
Idispatch ID
18
Parameters
None
Return Value(s)
None
Description
Method GkTestFireLicenseDataModifedEvent
is used for testing and will fire the LicenseDataModified event. This
event is fired when the user tries to bypass this system.
- Method
GkCreateTestVector
Idispatch ID
19
Parameters
None
Return Value(s)
BSTR* bstrChallenge - pointer to a BSTR
that receives the challenge string (128 bits)
BSTR* bstrResponse - pointer to a BSTR that receives the response
string (160 bits)
Description
method GkCreateTestVector returns a
challenge/response test vector
- Method
GkTestVector
Idispatch ID
20
Parameters
BSTR bstrChallenge - a BSTR that holds
the previously returned 128 bit challenge string
Return Value(s)
BSTR *bstrResponse - pointer to a BSTR
that receives the 160 bit response string.
Description
Method GkTestVector returns the response
from a challenge. Compare the response with the one returned by
GkCreateTestVector.
_IGateKeeperEvents
The following methods are for the
IGateKeeperEvents connection point. These methods are called from
IGatekeeper
- Method
GkRegistationRequired
Idispatch ID
1
Description
Method GkRegistationRequired is called
when the license is expiring and the user need to register.
- Method
GkLicenseDataModified
Idispatch ID
2
Description
Method GkLicenseDataModified is called
when the license control information is changed by the user in order
to bypass this system.
|