⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgpclientlibwin32.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
📖 第 1 页 / 共 5 页
字号:
//						  be the address of a DWORD containing the help ID.
//

enum
{
	kPGPclHelpContentsAndIndex		= 0,
	kPGPclHelpContext				= 1,
	kPGPclHelpMoreInformation		= 2
};

BOOL PGPclExport
PGPclHtmlHelp (
		HWND				hwnd,
		UINT				uMsgOrHelpType,
		WPARAM				wParam,
		LPARAM				lParam,
		char*				pszHelpFile,
		DWORD*				pdwID);

//
//	Determines if we are running with Admin priviledges
//	Note: returns TRUE if not running under NT

PGPBoolean PGPclExport
PGPclLoggedInAsAdministrator (void);

//
//	Get a valid IP/subnet mask for the local system.
//	Note: if there are multiple IPs, then the first is returned

PGPError PGPclExport
PGPclGetIPandSubnetMask (
		PGPUInt32*	puIP,
		PGPUInt32*	puSubnetMask);

//
//	Returns TRUE if local system is connected to the internet

PGPBoolean PGPclExport
PGPclIsLocalMachineOnline (void);

//
//	Get the IP address of a DNS server for the local machine

PGPError PGPclExport
PGPclGetDNSServerAddress (
		PGPUInt32*	puDNSAddress);

//
//	Plays the specified sound.  Note the user can change the sound
//  file associated with each event by using the control panel applet
//
//	Entry parameters :
//		index			- specifies which event to play sound for
//		bSynchrounous	- TRUE => wait for sound to end before returning
//

typedef enum PGPclSoundIndex
{
	kPGPclNoSound					= 0,
	kPGPclFirewallIntruderAlert		= 1,
} PGPclSoundIndex;

PGPError PGPclExport
PGPclPlaySound (
		PGPclSoundIndex		index,
		PGPBoolean			bSynchronous);

//
//	Find out if component is installed (uses the InstalledComponents
//  registry key as setup by the installer)
//
//	Entry parameters :
//		index		- specifies which module to report
//

typedef enum PGPclComponentIndex
{
	kPGPclUsersManual				= 0,
	kPGPclPGPkeys					= 1,
	kPGPclPFIDS						= 2,
	kPGPclPGPdisk					= 3,
	kPGPclCommandLine				= 4,
	kPGPclICQplugin					= 5,
	kPGPclEudoraPlugin				= 6,
	kPGPclExchangePlugin			= 7,
	kPGPclOutlookExpressPlugin		= 8,
	kPGPclLotusNotesPlugin			= 9,
	kPGPclPGPlogin					= 10,
	kPGPclPGPtools					= 11,
	kPGPclVPN						= 12,
	kPGPclPGPnet					= 13,	// VPN or PF/IDS
	kPGPclGroupwisePlugin			= 14,
	kPGPclPGPmailPlugin				= 15,	// OR of all plugins
	kPGPclPGPadmin					= 16,
	kPGPclPGPPersonal				= 17,
	kPGPclPGPDesktop				= 18,
	kPGPclPGPEnterprise				= 19
} PGPclComponentIndex;

PGPBoolean PGPclExport
PGPclIsComponentInstalled (
		PGPclComponentIndex	index);

PGPError PGPclExport 
PGPclNoLicense(
		HWND				hwndParent,
		PGPclComponentIndex	index);

PGPError PGPclExport 
PGPclDisplayLicense(
		PGPContextRef	context,
		HWND			hwndParent);

//
//	Get the specified file or folder path
//
//	Entry parameters :
//		index		- specifies which path to retrieve
//		pszPath		- buffer to receive path string
//		uLen		- length of buffer in bytes
//
//  Note: returned folder paths include trailing '\'

typedef enum PGPclPathIndex
{
	kPGPclRegistryKey				= 0,   // registry subkey name
	kPGPclInstallFolder				= 1,
	kPGPclHelpFile					= 2,
	kPGPclPGPkeysExeFile			= 3,
	kPGPclPrefsFile					= 4,
	kPGPclGroupsFile				= 5,
	kPGPclNetPrefsFile				= 6,
	kPGPclNetLogFile				= 7,
	kPGPclDefaultRandseedFolder		= 8,
	kPGPclDefaultKeyringFolder		= 9,
	kPGPclDefaultOpenFolder			= 10,
	kPGPclDefaultSaveAsFolder		= 11,
	kPGPclPublicKeyringFile			= 12,
	kPGPclPrivateKeyringFile		= 13,
	kPGPclNetPublicKeyringFile		= 14,
	kPGPclNetPrivateKeyringFile		= 15,
	kPGPclRandseedFile				= 16,
	kPGPclNetHelpFile				= 17,
	kPGPclDesktopFolder				= 18,
	kPGPclDiskHelpFile				= 19,
	kPGPclAdminHelpFile				= 20,
	kPGPclDefaultKeysFile			= 21,
	kPGPclNetLogEventDataFolder		= 22,
	kPGPclFireHelpFile				= 23,
	kPGPclMailHelpFile				= 24,
	kPGPclNumPathIndices			= 25
} PGPclPathIndex;

PGPError PGPclExport
PGPclGetPath (
		PGPclPathIndex		index,
		char*				pszPath,
		PGPInt32			iLen);

//
//	Set the specified file path
//
//	Entry parameters :
//		prefref		- must be the correct (PGP vs. PGPnet) prefref
//		index		- specifies which file path to set
//		pszPath		- buffer containing path string
//
//	Notes: 	- only the keyring and randseed file paths can be
//		      set.  Others will return kPGPError_BadParams.
//			- caller should pass in PGP or PGPnet prefref as appropriate
//			- caller must call PGPclFlushPrefs if using clientlib prefref

PGPError PGPclExport
PGPclSetPath (
		PGPPrefRef			prefref,
		PGPclPathIndex		index,
		char*				pszPath);

//
//	Load up the specified SHFOLDER.DLL and use it to create the
//	special folders we need.

PGPError PGPclExport
PGPclInstallerCreateFolders (
		char*				pszSHFolderPath);

//
//	Set the keyring file paths (called only by the installer)
//
//	Entry parameters :
//		pszPubRing		- buffer containing path string
//		pszSecRing		- buffer containing path string
//		pszNetPubRing	- buffer containing path string (can be NULL)
//		pszNetSecRing	- buffer containing path string (can be NULL)
//		pszRNGSeedFile	- buffer containing path string (can be NULL)
//		pszDefaultKeys	- buffer containing path string (can be NULL)
//
//	Notes:	- pass in NULL for pszNetPubRing and pszNetSecRing if
//			  PGPnet is not installed
//			- if you pass in NULL for pszRNGSeedFile, a default name
//			  will be used
//			- if you pass in NULL for pszDefaultKeys, no attempt to
//			  import the default keys to the keyring will be made
//

PGPError PGPclExport
PGPclInstallerSetPaths (
		char*				pszPubRing,
		char*				pszSecRing,
		char*				pszNetPubRing,
		char*				pszNetSecRing,
		char*				pszRNGSeedFile,
		char*				pszDefaultKeysFile);

//
//	keygen wizard wrapper convenience function (called only by the installer)
//
//	Entry parameters :
//		bCheckForKeyPairs	- FALSE => always run wizard
//							- TRUE => only run if no keypairs on keyring
//

PGPError PGPclExport
PGPclRebootKeyGeneration (
		HWND				hwndParent,
		BOOL				bCheckForKeyPairs);

// Called only from installer -wjb
PGPError PGPclExport
PGPclInstallerKeyGeneration (
		HWND				hwndParent,
		BOOL				bCheckForKeyPairs);

//
//	Drop-in replacement for WinExec
//
//	Entry parameters :
//		pszPath			- file to run
//		uCmdShow		- flags (see Docs for ShellExecute)
//
//	return TRUE if no successful

PGPBoolean PGPclExport
PGPclExecute (
		char* 				pszPath,
		PGPUInt32			uCmdShow);

//
//	Launch web browser and send to specified page
//
//	Entry parameters :
//		pszURL			- URL to open
//

PGPError PGPclExport
PGPclWebBrowse (
		char* 				pszURL);

//
//	Convert info in SYSTEMTIME structure to number of days from today
//
//	Entry parameters :
//		pst			address of SYSTEMTIME structure containing data
//					to convert
//		piDays		address of buffer to receive number of days from
//					today.  Negative numbers are prior to today.

PGPError PGPclExport
PGPclSystemTimeToDays (
		SYSTEMTIME*			pst,
		PGPInt32*			piDays);

//
//	Check whether SDK supports specified Public Key algorithm
//
//	Entry parameters :
//		alg				SDK public key algorithm constant
//		bMustEncrypt	TRUE=>SDK must support encryption with
//									this algorithm
//		bMustSign		TRUE=>SDK must support signing with
//									this algorithm
//
//	returns kPGPError_NoErr if SDK supports operations with
//	specified algorithm, kPGPError_FeatureNotAvailable otherwise.

PGPError PGPclExport
PGPclCheckSDKSupportForPKAlg (
		PGPPublicKeyAlgorithm	alg,
		PGPBoolean				bMustEncrypt,
		PGPBoolean				bMustSign);

//
//	Check whether SDK supports specified cipher algorithm
//
//	Entry parameters :
//		PGPCipherAlgorithm		SDK cipher algorithm constant
//
//	returns kPGPError_NoErr if SDK supports operations with
//	specified algorithm, kPGPError_FeatureNotAvailable otherwise.

PGPError PGPclExport
PGPclCheckSDKSupportForCipherAlg (
		PGPCipherAlgorithm 		alg);

//
//	Broadcast messages that indicates that the various things
//	have been changed and that others should reload from
//	disk.
//
//	Entry parameters :
//		lParam		- 32 value which is passed along as the LPARAM
//					  of the broadcast message.  Current usage
//					  is to set this to your process ID or your
//					  window handle so that you can ignore
//					  your own messages, if you want.  Set to
//					  zero to ensure all recipients process message.

//	broadcast message used to inform others of keyring changes
#define kPGPclReloadKeyRingMsg			("PGP Keyrings Reload")
#define kPGPclReloadPrefsMsg			("PGP Prefs Reload")
#define kPGPclReloadNetPrefsMsg			("PGP Net Prefs Reload")
#define kPGPclReloadKeyserverPrefsMsg	("PGP Keyserver Prefs Reload")

typedef enum PGPclChangeType
{
	kPGPclUnspecifiedChanges		= 0,
	kPGPclNewDefaultKeyrings		= 1,
	kPGPclKeyringContentsModified	= 2,
	kPGPclGroupsFileModified		= 3
} PGPclChangeType;

void PGPclExport
PGPclNotifyKeyringChanges (
		PGPclChangeType		type,
		PGPUInt32 			uParam);

void PGPclExport
PGPclNotifyPrefsChanges (
		PGPUInt32 			uParam);

void PGPclExport
PGPclNotifyNetPrefsChanges (
		PGPUInt32 			uParam);

void PGPclExport
PGPclNotifyKeyserverPrefsChanges (
		PGPUInt32 			uParam);

//
//	Get the ImageList index of the icon for this object
//
//	Entry parameters :
//			key			key to determine icon for
//			pbItalics	receives TRUE if associated text should be italics

PGPInt32 PGPclExport
PGPclDetermineKeyIcon (
		PGPKeyDBObjRef		key,
		PGPBoolean*			pbItalics);

PGPInt32 PGPclExport
PGPclDetermineUserIDIcon (
		PGPKeyDBObjRef		userid,
		PGPBoolean*			pbItalics);

PGPInt32 PGPclExport
PGPclDetermineCertIcon (
		PGPKeyDBObjRef		cert,
		PGPBoolean*			pbItalics,
		PGPBoolean*			pbX509);

//
//	convert the SDK representation of a fingerprint to a text representation
//	suitable for displaying in the GUI.

PGPError PGPclExport
PGPclConvertFingerprintToString (
		PGPUInt32			uKeyVersion,
		char*				sz);

//
//	open the specified keyring files, doing some extra error checking for
//	readonly conditions, floppy not inserted, etc.

PGPError PGPclExport
PGPclOpenKeyrings (
		PGPContextRef				context,
		char*						pszPubPath,
		char*						pszPrivPath,
		PGPOpenKeyDBFileOptions		options,
		PGPKeyDBRef*				pkeydbOut);

//	_______________________________________________________
//
//	Multimonitor convenience functions

typedef enum PGPclMonitorID
{
	kPGPclPrimaryMonitor				= 0,
	kPGPclWindowMonitor					= 1,
} PGPclMonitorID;

//
//	Get bounding rect of specified monitor
//
//	Entry parameters :
//		hwnd		- reference window
//					  (can be NULL, if uMonitor == PGPCL_PRIMARYMONITOR)
//		monitor	- one of above values specifying monitor
//		prcMonitor	- pointer to RECT to receive coordinates

PGPError PGPclExport
PGPclGetMonitorRect (
		HWND				hwnd,
		PGPclMonitorID		monitor,
		RECT*				prcMonitor);

//
//	Center window on multimonitor system
//
//	Entry parameters :
//		hwnd		- window to center
//		uMonitor	- one of above values specifying monitor to center on

PGPError PGPclExport
PGPclCenterWindowOnMonitor (
		HWND				hwnd,
		PGPUInt32			uMonitor);

//
//	Make sure that window position is on the same monitor as parent.
//	If parent window is NULL, then just make sure the window is visible.
//
//	Entry parameters :
//		hwndToMove		- window to check and move (if necessary)
//		hwndParent		- parent window or NULL

PGPError PGPclExport
PGPclEnsureWindowIsOnMonitor (
		HWND			hwndToMove,
		HWND			hwndParent);

//	_______________________________________________________
//
//	JPEG/PhotoID convenience functions

//	Get the size and dimensions of a bitmap from a DIB structure
//
//	Entry parameters :
//		lpbi		- pointer to DIB structure
//		piWidth		- pointer to int to receive bitmap width
//		piHeight	- pointer to int to receive bitmap height
//		piDIBSize	- pointer to int to receive buffer length

PGPError PGPclExport
PGPclGetDIBSize (
		LPBITMAPINFO	lpbi,
		PGPInt32*		piWidth,
		PGPInt32*		piHeight,
		PGPInt32*		piDIBSize);

//
//	construct a DDB from a DIB
//
//	Entry parameters :
//		lpbi		- pointer to DIB structure
//		phbitmap	- pointer to buffer to receive handle of DDB
//		phpalette	- pointer to buffer to receive handle of palette

PGPError PGPclExport
PGPclDDBfromDIB (
		LPBITMAPINFO	lpbi,
		HBITMAP*		phbitmap,
		HPALETTE*		phpalette);

//
//	construct a DIB from a PGP photoID buffer
//
//	Entry parameters :
//		pBuf		- buffer containing PGP photoID data
//		iLen		- length of photoID buffer in bytes
//		bForDisplay - TRUE => the DIB is for blitting to the screen
//		plpbi		- pointer to buffer to receive DIB structure

PGPError PGPclExport
PGPclDIBfromPhoto (
		PGPContextRef	context,
		PGPByte*		pBuf,
		PGPInt32		iLen,
		PGPBoolean		bForDisplay,
		LPBITMAPINFO*	plpbmi);

//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -