📄 pgpsc.h
字号:
/*__________________________________________________________________________
Copyright (C) 2002 PGP Corporation
All rights reserved.
$Id: PGPsc.h,v 1.22 2002/08/06 20:10:28 dallen Exp $
__________________________________________________________________________*/
#ifndef _PGPSCH
#define _PGPSCH
#include <shellapi.h>
#include "Progress.h"
#define kPGPscAddedKeysMsg "PGPscAddedKeys"
#define DDElogServer "PGPlog"
#define DDElogTopic "Operation_Results"
typedef struct _FILELIST
{
char *name;
BOOL IsDirectory;
struct _FILELIST *next;
} FILELIST;
#define OBL_END 1
#define OBL_LOCK 2
#define OBL_SIG 4
typedef struct _OUTBUFFLIST {
char *pBuff;
DWORD dwBuffSize;
BOOL FYEO;
DWORD dwType;
DWORD dwPos;
struct _OUTBUFFLIST *next;
} OUTBUFFLIST;
#ifdef __cplusplus
extern "C" {
#endif
// Library initialization routines
BOOL PGPscInit(
HWND hwnd,void **PGPsc,void **PGPtls,int Flags);
BOOL PGPscDestroy(
HWND hwnd,void *PGPsc,void *PGPtls);
BOOL PGPscCheckForPurge(
UINT uMsg,WPARAM wParam);
// Schedule directory wipes
BOOL PGPscSchedPGPdirwipe(
HWND hwnd,void *PGPsc,char *Directory);
// Clipboard routines
BOOL PGPscEncryptClipboard(
HWND hwnd,char *szApp,void *PGPsc,void *PGPtls,
BOOL Encrypt,BOOL Sign,BOOL bStartingCR);
BOOL PGPscDecryptClipboard(
HWND hwnd,char *szApp,void *PGPsc,void *PGPtls);
BOOL PGPscAddKeyClipboard(
HWND hwnd,void *PGPsc,void *PGPtls);
BOOL PGPscEraseClipboard(
HWND hwnd,void *PGPsc);
// Filelist routines
BOOL PGPscEncryptFileList(
HWND hwnd,char *szApp,void *PGPsc,void *PGPtls,
FILELIST *ListHead,BOOL bEncrypt,BOOL bSign);
BOOL PGPscCreateSDAFileList(HWND hwnd,char *szApp,
void *PGPsc,void *PGPtls,
FILELIST *ListHead);
BOOL PGPscDecryptFileList(
HWND hwnd,char *szApp,void *PGPsc,
void *PGPtls,FILELIST *ListHead);
BOOL PGPscAddKeyFileList(
HWND hwnd,void *PGPsc,void *PGPtls,
FILELIST *ListHead);
// Buffer routines
BOOL PGPscDecryptBuffer(
HWND hwnd,char *szApp,void *PGPsc,void *PGPtls,
char *pInput,DWORD dwInputSize,
char **ppOutput,DWORD *pdwOutputSize,
BOOL *pFYEO,OUTBUFFLIST **pobl,BOOL bNoProgress);
BOOL PGPscEncryptBuffer(
HWND hwnd,char *szApp,void *PGPsc,void *PGPtls,
BOOL Encrypt,BOOL Sign,
char *pInput,DWORD dwInputSize,
char **pOutput,DWORD *pdwOutputSize,
char **szRecipientArray,DWORD dwNumRecipients,
BOOL bForce);
#define WIPE_DEFAULT 0
#define WIPE_DONOTDELETE 1
#define WIPE_DONOTWARN 2
#define WIPE_DONOTPROGRESS 4
#define WIPE_DONOTERROR 8
#define WIPE_ADS 16
BOOL PGPscWipeFileList(
HWND hwnd,void *PGPsc,
FILELIST *ListHead,DWORD dwWipeFlags,DWORD dwPasses);
// Filelist utility functions (Note that ADDFILELISTCALLBACK can be NULL)
// Format of the user defined callback (Return TRUE to cancel add filelist!)
typedef BOOL (*ADDFILELISTCALLBACK)(FILELIST *fl,void *pUserValue);
BOOL PGPscAddToFileList(
FILELIST **filelist,char *filename,
ADDFILELISTCALLBACK UserProc,void *pUserValue);
BOOL PGPscFreeFileList(
FILELIST *FileList);
FILELIST *PGPscHDropToFileList(
HDROP hDrop);
FILELIST *PGPscCmdLineToFileList(
char *szCmdLine);
// Call-throughs to PGPcl
UINT PGPscQueryCacheSecsRemaining (void);
BOOL PGPscPreferences(
HWND hwnd,void *PGPsc,void *PGPtls);
BOOL PGPscAbout (
HWND hwnd,void *PGPsc);
// Returns filename from path
char *PGPscJustFile(
char *filename);
// Grabs preferences from pref file
BOOL PGPscGetValidityDrawPrefs(
void *PGPsc,BOOL *pbInputBool);
BOOL PGPscGetMarginalInvalidPref(
void *PGPsc,BOOL *pbInputBool);
BOOL PGPscGetSecureViewerPref(
void *PGPsc);
BOOL PGPscGetWipeOnDeletePrefs(
void *PGPsc,
BOOL *pbWipeOnDelete, BOOL *pbWipeProgress,
DWORD *pdwPasses);
// Views the clipboard
void PGPscClipboardEditor(
void *PGPsc,HWND hwnd);
// Use secure viewer and/or anti-tempest font
UINT PGPscTempestViewer(
void *PGPsc,HWND hwnd,char *pInput,
DWORD dwInSize,BOOL bWarn);
// Launches Keys/Tools
BOOL PGPscDoLaunchNet(HWND hwnd);
BOOL PGPscDoLaunchKeys(HWND hwnd);
BOOL PGPscDoLaunchTools(HWND hwnd);
BOOL PGPscDoLaunchDisk(HWND hwnd);
// Wipe free space on disk
void PGPscFreeSpaceWipeWizard(
HWND hwnd, void* PGPsc);
BOOL PGPscFreeSpaceWipeCmdLine(
HWND hwndParent, void* PGPsc,
char *Drive, int Passes, BOOL bAuto);
// Detects if window exists
BOOL PGPscWindowExists (LPSTR lpszName,
BOOL bShow);
// Sends signature info to PGPlog
BOOL PGPscSendPGPlogMsg(
HWND hwnd,char* szMsg);
void PGPscEnsureWindowIsOnMonitor(HWND hwnd);
// Returns path for PGPkeys
void PGPscPGPpath(char *szPath);
// Copy/Paste into current window
BOOL PGPscDoCopy(
HWND hwnd,void *PGPsc,BOOL bUseCurrent,
HWND *hwndFocus, BOOL *bStartingCR);
void PGPscDoPaste(
BOOL bUseCurrent,HWND hwndFocus);
void PGPscDoFocus(
BOOL bUseCurrent,HWND hwndFocus);
OUTBUFFLIST *PGPscMakeOutBuffItem(OUTBUFFLIST **obl);
BOOL PGPscConcatOutBuffList(
void *PGPsc,OUTBUFFLIST *obl,
char **pBuff,DWORD *dwBuffSize,
BOOL *FYEO);
BOOL PGPscInitDirectory(void);
BOOL PGPscHookCBTWin(void *PGPsc);
HWND PGPscReadCurrentFocus();
VOID PGPscReadOnlyWarning(HWND hWnd);
#define CP_NONE 0
#define CP_OK 1
DWORD PGPscCachePassphrase(HWND hwnd,
void **vPGPsc,
void **vPGPtls,
void *memmgr,
char *pszUserASCII,
char *pszPassASCII,
char *szNT);
#define EWI_NONE 0
#define EWI_DROPWITHWININFO 1
DWORD PGPscEncryptWinInfo(HWND hwnd,
void **vPGPsc,
void **vPGPtls,
void *memmgr,
char *pszUserASCII,
void *pInput,
DWORD dwInputSize,
char *szNT);
#define DWI_NONE 0
#define DWI_DROPWITHMAIN 1
#define DWI_GETWININFO 2
#define DWI_RETRY 3
#define DWI_DECODEDOK 4
#define DE_NONE 0
#define DE_NOPREFS 1
#define DE_NODEFAULTKEY 2
#define DE_NOCONTEXT 4
#define DE_NOKEYRINGS 8
// Make sure to free up ppszPassPhrase and ppszDomain beforehand
DWORD PGPscDecryptWinInfo(HWND hwnd,
void **vPGPsc,
void **vPGPtls,
void *memmgr,
char *pszUserASCII,
char *pszPassASCII,
void **ppOutput,
DWORD *pdwOutputSize,
BOOL bEraseWinInfo,
char *szNT,
DWORD *pdwDecErr);
#ifdef __cplusplus
}
#endif
#endif // PGPSCH
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -