Back to the Function Reference Table of Contents

Preferences Functions

Functions to get and set values in the PGPsdk preferences file and to post the standard Preferences dialog. "PGPsdk preferences" are default values for the public key-ring, secret key-ring, random seed file, groups file, and default private key. The functions spgpSetPreference and spgpGetPreference have been superceded by spgpSetPreferences and spgpGetPreferences. The older functions are still in the SPGP library and will remain there for purposes of backward compatibility, but they have been removed from this reference.

spgpSetPreferences

Sets one or more preferences in the default PGPsdk preferences file.

Visual Basic declaration:

Declare Function spgpsetpreferences Lib "spgp.dll" (
        Prefs As PGPPreferencesRec,
        ByVal Flags As Long
        ) As Long

Parameters:
Prefs A record of the type spgpPreferenceRec, containing new values for one or more of the PGPsdk preferences.
Flags The Flags parameter tells the function which of the preferences to set, and is formed from the bitwise OR of one or more of the following constants:

spgpPrefsFlag_PublicKeyring
spgpPrefsFlag_PrivateKeyring
spgpPrefsFlag_RandomSeedFile
spgpPrefsFlag_DefaultKeyID
spgpPrefsFlag_GroupsFile

Notes and Warnings:

up to the top

spgpGetPreferences

Retrieves one or more preferences from the default PGPsdk preferences file.

Visual Basic declaration:

Declare Function spgpgetpreferences Lib "spgp.dll" (
        Prefs As PGPPreferencesRec,
        ByVal Flags As Long
        ) As Long

Parameters:
Prefs A record of the type spgpPreferenceRec, which will receive the values for one or more of the PGPsdk preferences.
Flags The Flags parameter tells the function which of the preferences to get, and is formed from the bitwise OR of one or more of the following constants:

spgpPrefsFlag_PublicKeyring
spgpPrefsFlag_PrivateKeyring
spgpPrefsFlag_RandomSeedFile
spgpPrefsFlag_DefaultKeyID
spgpPrefsFlag_GroupsFile

Notes and Warnings:

up to the top

spgpPreferencesDialog

Posts the standard Preferences dialog, through which the users can view and change PGPsdk and client preferences.

Visual Basic declaration:

Declare Function spgppreferencesdialog Lib "spgp.dll" (
        ByVal ShowPage As Long, 
        ByVal WindowHandle As Long
        ) As Long

Parameters:
ShowPage The ShowPage parameter tells the function which of the dialog's pages to display when the dialog posts, and must be one of the following constants:

spgpPrefsPage_GeneralPrefs
spgpPrefsPage_KeyringPrefs
spgpPrefsPage_EmailPrefs
spgpPrefsPage_HotkeyPrefs
spgpPrefsPage_KeyserverPrefs
spgpPrefsPage_CAPrefs
spgpPrefsPage_AdvancedPrefs

WindowHandle Handle (i.e., Hwnd) to the calling application or window. Passing this handle to the function makes the dialog a "child" of the calling application. Set this parameter to '0' avoid this effect.

Notes and Warnings:

up to the top

Special Data Types

spgpPreferenceRec

This record or structure is used by the Preferences functions to get and set values from the PGPsdk preferences file.

Visual Basic declaration:

  Type spgpPreferenceRec
    PublicKeyring As String * 256
    PrivateKeyring As String * 256
    RandomSeedFile As String * 256
    GroupsFile As String * 256
    DefaultKeyID As String * 10
  End Type
  

Notes and Warnings:

up to the top


Back to the Function Reference Table of Contents