Discussion:
DirectDB -> DatabaseSession -> OpenDatabase -> iDatabaseExtension - No info found
(too old to reply)
R.Wieser
2020-09-24 18:14:19 UTC
Permalink
Hello all,

I'm still mucking around in DirectDB, and have a bit of a problem : The
DatabaseSession::OpenDatabase method (
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/oe/oe-idatabasesession-opendatabase )
has an "IDatabaseExtension *pExtension" argument, but not linked to any info
about such an IDatabaseExtension object. Googeling and DDG-ing for it
turns up ... nothing.

I've also tried seaching for its IID {B58A0F80-0702-11D2-9A63-00C04FA309D4},
and got nothing back either.

Question:
Does anyone (still) have some info about this elusive IDatabaseExtension
object for me ? I could certainly use it (I could probably extract the
number of methods and count of arguments for each from the msoe dll, but
having names for both would be a lot better).

Regards,
Rudy Wieser
Christian Astor
2020-10-09 06:38:38 UTC
Permalink
Post by R.Wieser
Hello all,
I'm still mucking around in DirectDB, and have a bit of a problem : The
DatabaseSession::OpenDatabase method (
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/oe/oe-idatabasesession-opendatabase )
has an "IDatabaseExtension *pExtension" argument, but not linked to any info
about such an IDatabaseExtension object. Googeling and DDG-ing for it
turns up ... nothing.
I've also tried seaching for its IID {B58A0F80-0702-11D2-9A63-00C04FA309D4},
and got nothing back either.
Does anyone (still) have some info about this elusive IDatabaseExtension
object for me ? I could certainly use it (I could probably extract the
number of methods and count of arguments for each from the msoe dll, but
having names for both would be a lot better).
I found this in an old .IDL =>

//----------------------------------------------------------------------
// IDatabaseExtension
//----------------------------------------------------------------------
cpp_quote("#ifndef __LPDATABASEEXTENSION_DEFINED")
cpp_quote("#define __LPDATABASEEXTENSION_DEFINED")
[
object,
uuid(B58A0F80-0702-11d2-9A63-00C04FA309D4),
pointer_default(unique)
]
interface IDatabaseExtension : IUnknown
{
//------------------------------------------------------------------
// OPERATIONSTATE
//------------------------------------------------------------------
typedef enum tagOPERATIONSTATE {
OPERATION_BEFORE,
OPERATION_AFTER
} OPERATIONSTATE;

//------------------------------------------------------------------
// Pointer to an interface of this type
//------------------------------------------------------------------
typedef IDatabaseExtension *LPDATABASEEXTENSION;

//------------------------------------------------------------------
// Methods
//------------------------------------------------------------------
HRESULT Initialize(
[in] IDatabase *pDB);

HRESULT OnLock(void);

HRESULT OnUnlock(void);

HRESULT OnRecordInsert(
[in] OPERATIONSTATE tyState,
[in,unique] LPORDINALLIST pOrdinals, //
Only valid when tyState = OPERATION_AFTER
[in] LPVOID pRecord);

HRESULT OnRecordUpdate(
[in] OPERATIONSTATE tyState,
[in,unique] LPORDINALLIST pOrdinals, //
Only valid when tyState = OPERATION_AFTER
[in] LPVOID pRecordOld,
[in] LPVOID pRecordNew);

HRESULT OnRecordDelete(
[in] OPERATIONSTATE tyState,
[in,unique] LPORDINALLIST pOrdinals, //
Only valid when tyState = OPERATION_AFTER
[in] LPVOID pRecord);

HRESULT OnExecuteMethod(
[in] METHODID idMethod,
[in] LPVOID pBinding,
[in] LPDWORD pdwResult);
}
cpp_quote("#endif // __LPDATABASEEXTENSION_DEFINED")
R.Wieser
2020-10-09 09:53:44 UTC
Permalink
Christian,
Post by Christian Astor
Post by R.Wieser
Does anyone (still) have some info about this elusive IDatabaseExtension
object for me ?
I found this in an old .IDL =>
Thank you very much.

Although I could infer /some/ info from looking at what was happening (like
the tagOPERATIONSTATE argument), having this certainly helps.

Ah, the second and third callback methods are fired when locking and
unlocking the database. So that is why I saw those come by so often. :-)

Regards,
Rudy Wieser

Loading...