KeePass   KeePass Help Center Home KeePass Home | Package Downloads | Flag Translations | Blocks Plugins | Donate Donate  
Home Help Center Home | People Forums | Award Awards | Link Links | Search Search  







IKpAPI Struct Referenceabstract

KeePass API for plugins, provides access to all objects in KeePass (singletons, instantiable objects, utility method classes, etc). More...

#include <IKpAPI.h>

Inheritance diagram for IKpAPI:
IKpUnknown IKpAPI2 IKpAPI3

Public Member Functions

virtual HRESULT CreateInstance (REFCLSID rclsid, REFIID riid, void **ppvObject)=0
 Create an object of the class associated with a specified class ID. More...
 
virtual HRESULT CreateInstanceEx (REFCLSID rclsid, REFIID riid, void **ppvObject, LPARAM lParamW, LPARAM lParamL)=0
 Create an object of the class associated with a specified class ID. More...
 
virtual HRESULT QueryInstance (REFCLSID rclsid, REFIID riid, void **ppvObject)=0
 Get an interface to a static or singleton object. More...
 
virtual HRESULT DeleteObject (void *pObject)=0
 Delete an object that has been allocated by the KeePass CRT. More...
 
virtual HRESULT DeleteArray (void *pArray)=0
 Delete an array/string that has been allocated by the KeePass CRT. More...
 
virtual DWORD GetVersion ()=0
 Get the KeePass version as integer. More...
 
virtual LPCTSTR GetVersionStr ()=0
 Get the KeePass version as string. More...
 
virtual DWORD GetCharSize ()=0
 Get the size of a TCHAR in bytes (can be used to detect whether KeePass is compiled in multi-byte or Unicode mode). More...
 
virtual DWORD GetPointerSize ()=0
 Get the size of a pointer in bytes (can be used to detect whether KeePass is compiled in 32 or 64 bit mode). More...
 
virtual DWORD GetDebugLevel ()=0
 Get a value indicating which debugging features are present. More...
 
virtual HWND GetMainWindowHandle ()=0
 Get a handle to the KeePass main window. More...
 
virtual HIMAGELIST GetClientIconsImageList ()=0
 Get a handle to the client icons image list. More...
 
virtual LPCTSTR GetTranslationName ()=0
 Get the name of the currently active translation table. More...
 
virtual LPCTSTR Translate (LPCTSTR lpDefString)=0
 Translate a string using the currently active translation file of KeePass. More...
 
virtual HRESULT GetNeverExpireTime (PW_TIME *pBuf)=0
 Get the predefined PW_TIME value that indicates infinity. More...
 
virtual HRESULT GetCurrentPwTime (PW_TIME *pBuf)=0
 Get the current local system time as PW_TIME structure. More...
 
virtual BOOL IsFileOpen ()=0
 Indicates whether there's currently a file open (if this is the case, the methods of the IKpDatabase interface can be used). More...
 
virtual LPCTSTR GetAbsoluteDatabasePath ()=0
 
virtual DWORD GetEntryListItemCount ()=0
 
virtual DWORD GetSelectedGroupId ()=0
 
virtual BOOL IsFileModified ()=0
 Get the 'modified' bit of the current database. More...
 
virtual HRESULT SetFileModified (BOOL bModified)=0
 Set the 'modified' bit of the current database. More...
 
virtual BOOL IsDisplayingDialog ()=0
 Get a bit indicating whether KeePass is currently showing a modal dialog. More...
 
virtual HRESULT SetDisplayDialog (BOOL bDialogDisplayed)=0
 Set a bit indicating whether KeePass is currently showing a modal dialog. More...
 
virtual HRESULT EntryListEnsureVisible (INT nItem, BOOL bPartialOK)=0
 
virtual HRESULT UpdateUI ()=0
 Update group tree and entry list (preserving current view if possible). More...
 
virtual HRESULT UpdateGroupTree ()=0
 
virtual HRESULT UpdateEntryList ()=0
 
virtual HRESULT UpdateToolBar ()=0
 Update the toolbar state. More...
 
virtual HRESULT SetStatusBarText (LPCTSTR lpText)=0
 
virtual HRESULT ShowDialog (DWORD dwDialogId, DWORD dwVersion, void *pConfig, INT *pnResult, void *pOutput)=0
 Show one of the KeePass dialogs. More...
 
virtual HRESULT AutoType (PW_ENTRY *pEntry, LONG_PTR lFlags)=0
 
virtual HRESULT AddImportMenuItem (LPCTSTR lpText, UINT uId, INT nIconId)=0
 
- Public Member Functions inherited from IKpUnknown
virtual HRESULT QueryInterface (REFIID riid, void **ppvObject)=0
 COM infrastructure, provides access to all interfaces supported by this object. More...
 
virtual ULONG AddRef ()=0
 COM infrastructure, increments the reference count for this object. More...
 
virtual ULONG Release ()=0
 COM infrastructure, decrements the reference count for this object and eventually deletes it. More...
 

Detailed Description

KeePass API for plugins, provides access to all objects in KeePass (singletons, instantiable objects, utility method classes, etc).

Member Function Documentation

virtual HRESULT IKpAPI::AddImportMenuItem ( LPCTSTR  lpText,
UINT  uId,
INT  nIconId 
)
pure virtual
virtual HRESULT IKpAPI::AutoType ( PW_ENTRY pEntry,
LONG_PTR  lFlags 
)
pure virtual
virtual HRESULT IKpAPI::CreateInstance ( REFCLSID  rclsid,
REFIID  riid,
void **  ppvObject 
)
pure virtual

Create an object of the class associated with a specified class ID.

Class IDs supported by this method typically start with CLSID_.

Parameters
rclsidClass ID. Supported class IDs include but are not limited to:
  • CLSID_KpConfig (configuration object with write access).
  • CLSID_KpConfig_ReadOnly (configuration object with read-only access).
  • For a complete list of supported class IDs, see the KpGuids.h file.
riidID of the interface requested for the new object.
ppvObjectIf the object has been created successfully and the requested interface is supported, the interface pointer will be stored at this address.
Returns
S_OK, if successful.
A COM error code (E_XXX), if unsuccessful.
The returned COM object must be freed using its Release method.
See Also
KpGuids.h file.
virtual HRESULT IKpAPI::CreateInstanceEx ( REFCLSID  rclsid,
REFIID  riid,
void **  ppvObject,
LPARAM  lParamW,
LPARAM  lParamL 
)
pure virtual

Create an object of the class associated with a specified class ID.

Class IDs supported by this method typically start with CLSID_. Objects with constructors that don't need any parameters should be created with the IKpAPI::CreateInstance method.

Parameters
rclsidClass ID. Supported class IDs include but are not limited to:
  • CLSID_KpFullPathName (object wrapping a path).
  • CLSID_KpCommandLineOption (object wrapping a command line option).
  • CLSID_KpFileTransaction (file transaction object).
  • All CLSIDs that are supported by IKpAPI::CreateInstance.
  • For a complete list of supported class IDs, see the KpGuids.h file.
riidID of the interface requested for the new object.
ppvObjectIf the object has been created successfully and the requested interface is supported, the interface pointer will be stored at this address.
lParamWParameter depending on object type.
lParamLParameter depending on object type.
Returns
S_OK, if successful.
A COM error code (E_XXX), if unsuccessful.
The returned COM object must be freed using its Release method.
See Also
KpGuids.h file.
virtual HRESULT IKpAPI::DeleteArray ( void *  pArray)
pure virtual

Delete an array/string that has been allocated by the KeePass CRT.

DeleteObject should be used to free single objects/instances, DeleteArray should be used to free arrays and strings.

Parameters
pArrayArray to be deleted.
See Also
DeleteObject
virtual HRESULT IKpAPI::DeleteObject ( void *  pObject)
pure virtual

Delete an object that has been allocated by the KeePass CRT.

DeleteObject should be used to free single objects/instances, DeleteArray should be used to free arrays and strings.

Parameters
pObjectObject to be deleted.
See Also
DeleteArray
virtual HRESULT IKpAPI::EntryListEnsureVisible ( INT  nItem,
BOOL  bPartialOK 
)
pure virtual
virtual LPCTSTR IKpAPI::GetAbsoluteDatabasePath ( )
pure virtual
virtual DWORD IKpAPI::GetCharSize ( )
pure virtual

Get the size of a TCHAR in bytes (can be used to detect whether KeePass is compiled in multi-byte or Unicode mode).

virtual HIMAGELIST IKpAPI::GetClientIconsImageList ( )
pure virtual

Get a handle to the client icons image list.

KeePass caches various properties of this image list, therefore do not modify it – only use read-only operations.

virtual HRESULT IKpAPI::GetCurrentPwTime ( PW_TIME pBuf)
pure virtual

Get the current local system time as PW_TIME structure.

virtual DWORD IKpAPI::GetDebugLevel ( )
pure virtual

Get a value indicating which debugging features are present.

Returns
0, if no debugging information is present (release version).
1, if debugging information is available (debug version).
virtual DWORD IKpAPI::GetEntryListItemCount ( )
pure virtual
virtual HWND IKpAPI::GetMainWindowHandle ( )
pure virtual

Get a handle to the KeePass main window.

The returned handle should not be stored for later use.

virtual HRESULT IKpAPI::GetNeverExpireTime ( PW_TIME pBuf)
pure virtual

Get the predefined PW_TIME value that indicates infinity.

Entries and groups, which have set their expiry times to this value, will never expire.

virtual DWORD IKpAPI::GetPointerSize ( )
pure virtual

Get the size of a pointer in bytes (can be used to detect whether KeePass is compiled in 32 or 64 bit mode).

virtual DWORD IKpAPI::GetSelectedGroupId ( )
pure virtual
virtual LPCTSTR IKpAPI::GetTranslationName ( )
pure virtual

Get the name of the currently active translation table.

Returns
Name of the translation.
This string is static in KeePass, do not delete it.
virtual DWORD IKpAPI::GetVersion ( )
pure virtual

Get the KeePass version as integer.

virtual LPCTSTR IKpAPI::GetVersionStr ( )
pure virtual

Get the KeePass version as string.

The version string may include additional information / suffixes, like 'Debug', 'Experimental Release' or others.

Returns
Version string.
This string is static in KeePass, do not delete it.
virtual BOOL IKpAPI::IsDisplayingDialog ( )
pure virtual

Get a bit indicating whether KeePass is currently showing a modal dialog.

See Also
SetDisplayDialog
virtual BOOL IKpAPI::IsFileModified ( )
pure virtual

Get the 'modified' bit of the current database.

See Also
SetFileModified
virtual BOOL IKpAPI::IsFileOpen ( )
pure virtual

Indicates whether there's currently a file open (if this is the case, the methods of the IKpDatabase interface can be used).

virtual HRESULT IKpAPI::QueryInstance ( REFCLSID  rclsid,
REFIID  riid,
void **  ppvObject 
)
pure virtual

Get an interface to a static or singleton object.

Class IDs supported by this method typically start with SCLSID_.

Parameters
rclsidClass ID. Supported class IDs include but are not limited to:
  • SCLSID_KpDatabase (database handling singleton).
  • SCLSID_KpUtilities (utility methods singleton).
  • SCLSID_KpCommandLine (command line methods singleton).
  • For a complete list of supported class IDs, see the KpGuids.h file.
riidID of the interface requested for the specified class.
ppvObjectIf the object is known and the requested interface is supported, the interface pointer will be stored at this address.
Returns
S_OK, if successful.
A COM error code (E_XXX), if unsuccessful.
The returned COM object must be freed using its Release method.
See Also
KpGuids.h file.
virtual HRESULT IKpAPI::SetDisplayDialog ( BOOL  bDialogDisplayed)
pure virtual

Set a bit indicating whether KeePass is currently showing a modal dialog.

If this bit is set, various automation is blocked (for example KeePass will not automatically lock its workspace when a modal dialog is displayed).

See Also
IsDisplayingDialog
virtual HRESULT IKpAPI::SetFileModified ( BOOL  bModified)
pure virtual

Set the 'modified' bit of the current database.

If the 'modified' bit is set, KeePass will ask the user whether to save or not when he tries to close the database (on locking, exiting, etc).

See Also
IsFileModified
virtual HRESULT IKpAPI::SetStatusBarText ( LPCTSTR  lpText)
pure virtual
virtual HRESULT IKpAPI::ShowDialog ( DWORD  dwDialogId,
DWORD  dwVersion,
void *  pConfig,
INT *  pnResult,
void *  pOutput 
)
pure virtual

Show one of the KeePass dialogs.

All dialogs shown by this method are modal, the method will return when the dialog has been closed.

Parameters
dwDialogIdID of the dialog to show.
dwVersionVersion of the input/output structures.
pConfigInput configuration structure for the dialog.
pnResultOutput buffer that receives the dialog result code.
pOutputOutput structure.
Returns
S_OK, if the dialog has been shown correctly.
E_NOTIMPL, if the dialog ID is not supported by KeePass.
Any other E_XXX error code, if showing the dialog failed.
virtual LPCTSTR IKpAPI::Translate ( LPCTSTR  lpDefString)
pure virtual

Translate a string using the currently active translation file of KeePass.

Parameters
lpDefStringEnglish text (not a string identifier).
Returns
Translated string.
This string is static in KeePass, do not delete it.
virtual HRESULT IKpAPI::UpdateEntryList ( )
pure virtual
virtual HRESULT IKpAPI::UpdateGroupTree ( )
pure virtual
virtual HRESULT IKpAPI::UpdateToolBar ( )
pure virtual

Update the toolbar state.

Toolbar buttons will be enabled/disabled depending on the current main window state (selected group, selected entries, etc).

virtual HRESULT IKpAPI::UpdateUI ( )
pure virtual

Update group tree and entry list (preserving current view if possible).

This method updates both the group tree and the entry list in the main window. In contrast to the separate IKpAPI::UpdateGroupTree and IKpAPI::UpdateEntryList methods, this method tries to save and restore the current view.


The documentation for this struct was generated from the following file:



Documentation generated with Doxygen.




Valid XHTML 1.0 Transitional Document

Get KeePass

Flattr this


KeePass is OSI Certified Open Source Software
Copyright © 2003-2014
Dominik Reichl, [Legal Contact / Imprint] [Disclaimer] [Acknowledgements] [Donate], Downloads hosted at

Get KeePass Password Safe at
SourceForge.net. Fast, secure and Free Open Source software downloads