|
||||
|
KeePass 2.x
Installation / Portability
Translations
Plugins
Compatibility / SxS
Application Policy
Auto-Type Obfuscation
Synchronization
Triggers
User Interface
Database Settings
Entry
Interface Options
Load/Save From/To URL
License
Features
Auto-Type
Command Line Options
Composite Master Key
Configuration
Field References
Import / Export
Integration
Multi-User
Password Generator
Placeholders
Repair Databases
Secure Edit Controls
Security
TAN Support
URL Field
Using Stored Passwords
Development
Customize (1.x)
Customize (2.x)
Scripting (2.x)
Creating Plugins (1.x)
Creating Plugins (2.x)
Key Providers (1.x)
Key Providers (2.x)
Donate
|
KpDefs.hGo to the documentation of this file.00001 /* 00002 Copyright (c) 2008-2012, Dominik Reichl 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without 00006 modification, are permitted provided that the following conditions 00007 are met: 00008 00009 * Redistributions of source code must retain the above copyright 00010 notice, this list of conditions and the following disclaimer. 00011 * Redistributions in binary form must reproduce the above copyright 00012 notice, this list of conditions and the following disclaimer in 00013 the documentation and/or other materials provided with the 00014 distribution. 00015 00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00017 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00018 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00019 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00020 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00021 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00022 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00023 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00024 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00025 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00026 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00027 POSSIBILITY OF SUCH DAMAGE. 00028 */ 00029 00030 #ifndef ___KP_DEFS_H___ 00031 #define ___KP_DEFS_H___ 00032 00033 #pragma once 00034 00035 #include "../../SysDefEx.h" 00036 #include "IKpUnknown.h" 00037 00038 // Interface names 00039 #ifndef _UNICODE 00040 #define KP_I_CREATEINSTANCE "KpCreateInstance" 00041 #define KP_I_INITIALIZELIB "KpInitializeLibrary" 00042 #define KP_I_RELEASELIB "KpReleaseLibrary" 00043 #else 00044 #define KP_I_CREATEINSTANCE "KpCreateInstanceW" 00045 #define KP_I_INITIALIZELIB "KpInitializeLibraryW" 00046 #define KP_I_RELEASELIB "KpReleaseLibraryW" 00047 #endif 00048 00049 #define KP_I_CREATEINSTANCE_DECL KpCreateInstance 00050 #define KP_I_INITIALIZELIB_DECL KpInitializeLibrary 00051 #define KP_I_RELEASELIB_DECL KpReleaseLibrary 00052 00054 // KeePass menu item flags 00055 00056 #define KPMIF_NORMAL 0 00057 #define KPMIF_CHECKBOX 1 00058 #define KPMIF_ENABLED 0 00059 #define KPMIF_DISABLED 2 00060 #define KPMIF_POPUP_START 4 00061 #define KPMIF_POPUP_END 8 00062 // To make a separator, set lpCommandString to "" 00063 00065 // KeePass menu item states 00066 00067 #define KPMIS_UNCHECKED 0 00068 #define KPMIS_CHECKED 1 00069 00071 // Callback-like communication functions 00072 00073 // typedef DWORD_PTR(KP_API *LPKP_CALL)(DWORD dwCode, LPARAM lParamW, LPARAM lParamL, LPARAM lParamM); 00074 // typedef DWORD_PTR(KP_API *LPKP_QUERY)(DWORD dwCode, LPARAM lParam); 00075 00077 // KeePass plugin structures 00078 00079 // #pragma pack(1) 00080 00081 // typedef struct 00082 // { 00083 // DWORD dwAppVersion; // 0.98b would be 0x00090802, 1.04 is 0x01000401 00084 // HWND hwndMain; 00085 // void *pMainDlg; // Pointer to current CPwSafeDlg class, cast it 00086 // void *pPwMgr; // Pointer to current CPwManager class, cast it 00087 // 00088 // LPKP_CALL lpKPCall; // KeePass call function (see KP_Call) 00089 // LPKP_QUERY lpKPQuery; // KeePass query function (see KP_Query) 00090 // } KP_APP_INFO, *LPKP_APP_INFO; 00091 00092 // typedef struct 00093 // { 00094 // DWORD dwForAppVer; // Plugin has been designed for this KeePass version 00095 // DWORD dwPluginVer; 00096 // TCHAR tszPluginName[64]; 00097 // TCHAR tszAuthor[64]; // Author of the plugin 00098 // const TCHAR* cmdLineArgPrefix; // See Note 1 below. 00099 // DWORD dwNumCommands; // Number of menu items 00100 // KP_MENU_ITEM *pMenuItems; 00101 // } KP_PLUGIN_INFO, *LPKP_PLUGIN_INFO; 00102 00103 // #pragma pack() 00104 00105 // Note 1: 00106 // If the plugin does not define command line options, set cmdLineArgPrefix to null. 00107 // If the plugin defines command line options, cmdLineArgPrefix should point to 00108 // a null terminated lower case string whose last character is dot _T('.'). 00109 // This string represents the prefix for the command line arguments. 00110 00112 // Functions called by KeePass (must be exported by the plugin DLL) 00113 00114 // KP_EXP BOOL KP_API KeePluginInit(const KP_APP_INFO *pAppInfo, KP_PLUGIN_INFO *pPluginInfo); 00115 // typedef BOOL(KP_API *LPKEEPLUGININIT)(const KP_APP_INFO *pAppInfo, KP_PLUGIN_INFO *pPluginInfo); 00116 00117 // KP_EXP BOOL KP_API KeePluginCall(DWORD dwCode, LPARAM lParamW, LPARAM lParamL); 00118 // typedef BOOL(KP_API *LPKEEPLUGINCALL)(DWORD dwCode, LPARAM lParamW, LPARAM lParamL); 00119 00120 // KP_EXP BOOL KP_API KeePluginExit(LPARAM lParamW, LPARAM lParamL); 00121 // typedef BOOL(KP_API *LPKEEPLUGINEXIT)(LPARAM lParamW, LPARAM lParamL); 00122 00123 typedef HRESULT(KP_API *LPKPCREATEINSTANCE)(REFIID riid, void** ppvObject, 00124 IKpUnknown* pAPI); 00125 00126 typedef HRESULT(KP_API *LPKPLIBFUNC)(IKpUnknown* pAPI); 00127 00129 // The structure that holds all information about one single plugin 00130 00131 // #pragma pack(1) 00132 00133 // typedef struct 00134 // { 00135 // DWORD dwPluginID; // Assigned by KeePass, used internally 00136 // TCHAR tszFile[MAX_PATH]; 00137 // BOOL bEnabled; 00138 // HINSTANCE hinstDLL; 00139 // 00140 // KP_PLUGIN_INFO info; 00141 // 00142 // LPKEEPLUGININIT lpInit; 00143 // LPKEEPLUGINCALL lpCall; 00144 // LPKEEPLUGINEXIT lpExit; 00145 // } KP_PLUGIN_INSTANCE, *LPKP_PLUGIN_INSTANCE; 00146 00147 // #pragma pack() 00148 00150 // KeePass plugin message codes 00151 00152 #define KPM_NULL 0 00153 #define KPM_DIRECT_EXEC 1 00154 #define KPM_DIRECT_CONFIG 2 00155 #define KPM_PLUGIN_INFO 3 00156 00157 #define KPM_DELAYED_INIT 58 00158 00159 #define KPM_CLEANUP 72 00160 00161 // General notifications 00162 00163 #define KPM_INIT_MENU_POPUP 4 00164 00165 #define KPM_WND_INIT_POST 6 00166 #define KPM_READ_COMMAND_ARGS 54 00167 00168 #define KPM_DELETE_TEMP_FILES_PRE 7 00169 #define KPM_WM_CANCEL 12 00170 00171 #define KPM_PWLIST_RCLICK 18 00172 #define KPM_GROUPLIST_RCLICK 20 00173 00174 #define KPM_OPENDB_PRE 25 00175 #define KPM_OPENDB_POST 26 00176 #define KPM_OPENDB_COMMITTED 53 00177 00178 #define KPM_SAVEDB_POST 49 00179 #define KPM_SAVEDB_AS_POST 51 00180 00181 #define KPM_CHANGE_MASTER_KEY_PRE 50 00182 00183 // File menu commands 00184 00185 #define KPM_FILE_NEW_PRE 23 00186 #define KPM_FILE_NEW_POST 24 00187 #define KPM_FILE_OPEN_PRE 27 00188 #define KPM_FILE_SAVE_PRE 28 00189 #define KPM_FILE_SAVEAS_PRE 29 00190 #define KPM_FILE_CLOSE_PRE 30 00191 #define KPM_FILE_CLOSE_POST 52 00192 00193 #define KPM_FILE_PRINT_PRE 35 00194 #define KPM_FILE_PRINTPREVIEW_PRE 45 00195 00196 #define KPM_FILE_DBSETTINGS_PRE 48 00197 #define KPM_FILE_CHANGE_MASTER_KEY_PRE 34 00198 00199 #define KPM_FILE_LOCK_PRE 42 00200 #define KPM_FILE_LOCK_CLOSE_PRE 55 00201 #define KPM_FILE_LOCK_CLOSE_POST 56 00202 #define KPM_FILE_UNLOCK_FAILED 57 00203 00204 #define KPM_FILE_EXIT_PRE 8 00205 00206 // Other menu commands 00207 00208 #define KPM_OPTIONS_PRE 31 00209 #define KPM_OPTIONS_POST 32 00210 #define KPM_VIEW_HIDE_STARS_PRE 11 00211 #define KPM_GEN_PASSWORD_PRE 36 00212 #define KPM_TANWIZARD_PRE 44 00213 #define KPM_INFO_ABOUT_PRE 9 00214 00215 // Password list commands 00216 00217 #define KPM_ADD_ENTRY_PRE 5 00218 #define KPM_ADD_ENTRY 14 00219 #define KPM_EDIT_ENTRY_PRE 15 00220 // #define KPM_EDIT_ENTRY 16 00221 #define KPM_DELETE_ENTRY_PRE 17 00222 #define KPM_DUPLICATE_ENTRY_PRE 40 00223 00224 #define KPM_PWLIST_FIND_PRE 38 00225 #define KPM_PWLIST_FIND_IN_GROUP_PRE 39 00226 00227 #define KPM_MASSMODIFY_ENTRIES_PRE 43 00228 00229 // Direct entry commands 00230 00231 #define KPM_PW_COPY 19 00232 #define KPM_USER_COPY 21 00233 #define KPM_URL_VISIT 22 00234 00235 // Group list commands 00236 00237 #define KPM_GROUP_ADD_PRE 10 00238 #define KPM_GROUP_ADD 13 00239 #define KPM_GROUP_ADD_SUBGROUP_PRE 46 00240 #define KPM_GROUP_MODIFY_PRE 37 00241 #define KPM_GROUP_REMOVE_PRE 33 00242 #define KPM_GROUP_SORT_PRE 47 00243 #define KPM_GROUP_PRINT_PRE 41 00244 00245 // Key provider messages 00246 00247 #define KPM_KEYPROV_QUERY_INFO_FIRST 59 00248 #define KPM_KEYPROV_QUERY_INFO_NEXT 60 00249 #define KPM_KEYPROV_QUERY_KEY 61 00250 #define KPM_KEYPROV_QUERY_KEY_EX 70 00251 #define KPM_KEYPROV_FINALIZE 62 00252 00253 // Other messages 00254 00255 #define KPM_OPTIONS_SAVE_GLOBAL 63 00256 00257 #define KPM_VALIDATE_MASTERPASSWORD 64 00258 #define KPM_VALIDATE_ENTRY 65 00259 #define KPM_VALIDATE_GENPASSWORD 66 00260 00261 #define KPM_SELECTAPP_ASURL 67 00262 00263 #define KPM_USERAPP_GETFIRST 68 00264 #define KPM_USERAPP_GETNEXT 69 00265 00266 #define KPM_TRAY_NOTIFY 71 00267 #define KPM_TRAY_CUSTOMIZE_PRE 73 00268 #define KPM_TRAY_CUSTOMIZE_POST 74 00269 00270 // The following is unused; it's always the last command ID + 1; 00271 // do not use this value under any circumstances (it will break 00272 // upward compatibility, if you do!) 00273 #if (0 == 1) 00274 #define KPM_NEXT 75 00275 #error Your build will not be upward-compatible. 00276 #endif 00277 00278 // FREELY AVAILABLE MESSAGE CODES: 00279 // Plugins may internally use message codes in the range 00280 // 0xFF000000 to 0xFFFFFF00. It is guaranteed that KeePass will 00281 // never call your message handler with any of the codes in this range. 00282 00284 // KeePass query IDs (used in function KP_Query) 00285 00286 // #define KPQUERY_NULL 0 /* Deprecated, use KPQ_NULL */ 00287 // #define KPQUERY_VERSION 1 /* Deprecated, use KPQ_VERSION */ 00288 00289 // #define KPQ_NULL 0 00290 // #define KPQ_VERSION 1 00291 // #define KPQ_FILEOPEN 2 00292 // #define KPQ_PWLIST_ITEMCOUNT 3 00293 // #define KPQ_SELECTEDGROUPID 4 00294 // #define KPQ_NEVER_EXPIRE_TIME 5 00295 // #define KPQ_GET_GROUP 6 00296 // #define KPQ_ABSOLUTE_DB_PATH 7 00297 // #define KPQ_TRANSLATION_NAME 8 00298 // #define KPQ_GET_CUSTOMKVP 9 00299 // #define KPQ_MAINWINDOW_HWND 10 00300 00302 // KeePass call result codes (return value from KP_Call) 00303 00304 // #define KPR_SUCCESS 0 00305 // #define KPR_FAILED 1 00306 00308 // KeePass call IDs (used in function KP_Call) 00309 00310 // #define KPC_NULL 0 00311 // #define KPC_INSERT_IMPORTFROM_ITEM 1 // w: Name, l: ID, m: Icon index 00312 // #define KPC_MODIFIED 2 00313 // #define KPC_DISPLAYDIALOG 3 00314 // #define KPC_PWLIST_ENSUREVISIBLE 4 00315 // #define KPC_UPDATE_TOOLBAR 5 00316 // #define KPC_UPDATE_GROUPLIST 6 00317 // #define KPC_UPDATE_PASSWORDLIST 7 00318 // #define KPC_STATUSBARTEXT 8 00319 // #define KPC_UPDATE_UI 9 00320 // #define KPC_OPENFILE_DIALOG 10 00321 // #define KPC_ADD_ENTRY 11 00322 // #define KPC_EDIT_ENTRY 12 00323 // #define KPC_DELETE_ENTRY 13 00324 // #define KPC_AUTOTYPE 14 00325 // #define KPC_SET_CUSTOMKVP 15 00326 00328 // KeePass call flags (used in function IKpAPI::AutoType) 00329 00330 #define KPF_AUTOTYPE_LOSEFOCUS 0x10000 00331 00333 // Plugin string identifiers (used for GetProperty method) 00334 00335 #define KPPS_COMMANDLINEARGPREFIX _T("CommandLineArgPrefix") 00336 #define KPPS_UNLOAD_LATE _T("UnloadLate") 00337 00339 // Open mode for IKpUtilities::ShellOpenLocalFile 00340 00341 #define OLF_OPEN 0 00342 #define OLF_PRINT 1 00343 #define OLF_EXPLORE 2 00344 00346 // Flags for IKpUtilities::ValidatePath 00347 00348 #define KPVPF_DEFAULT 0 00349 #define KPVPF_MUST_EXIST 1 00350 00351 // The following additional flags are only valid if KPVPF_MUST_EXIST is 00352 // specified: 00353 #define KPVPF_TYPE_DIRECTORY 2 00354 #define KPVPF_TYPE_FILE 4 00355 00356 // Other optional checks: 00357 #define KPVPF_REGULAR_NAME 8 00358 00360 // Base64 utility method definitions 00361 00362 #define CB64_PROTOCOL "base64://" 00363 #define CB64_PROTOCOL_LEN 9 00364 00366 // Configuration definitions 00367 00368 #define SI_REGSIZE 2048 00369 00371 // IKpFullPathName state definitions 00372 00373 #define KPFPN_UNINITIALIZED 1 00374 #define KPFPN_INVALID_PATH 2 00375 #define KPFPN_PATH_ONLY 4 00376 #define KPFPN_PATH_AND_FILENAME 8 00377 00378 #endif // ___KP_DEFS_H___ Documentation generated with
Doxygen.
|
![]()
|
||
KeePass is OSI Certified Open Source Software Copyright © 2003-2012 Dominik Reichl, [Legal Contact / Imprint] [Disclaimer] [Acknowledgements] [Donate], Downloads hosted at |
||||
KeePass Help Center
KeePass Home
Downloads
Translations
Plugins
Help Center Home
Forums
Awards
Search

