|
|
||||||
|
||||||
|
LIBBROKERHEADER The LIBBROKERHEADER data structure contains information used both internally by the Library Broker engine and externally by all proxy methods to link the current method to its associated registration information. A pointer to a LIBBROKERHEADER structure is passed to all proxy methods and contains information identifying the previous instance of this method (whether that be another proxy method, or the original method itself). In effect this enables numerous proxies to be installed for the one method, providing each with the opportunity to call the previous instance where required, terminating at the original method implementation. Library Broker does this by inserting the LPLIBBROKERHEADER pointer as the last DWORD on the stack, thereby making it the first parameter for proxy methods that implement the cdecl and stdcall calling conventions, and the last parameter for proxy methods that implement the pascal calling convention. Members lpPreviousInstance
Note for cdecl proxy methods: Because the caller is responsible for cleaning up the stack after a cdecl defined method has been called, you must ensure that the stack is properly "cleaned" yourself as Library Broker will not automate this for you. This means popping the last two DWORD parameters off of the stack (the return EIP address and the LPLIBBROKERHEADER pointer) and then pushing the first DWORD popped off of the stack back onto the stack (the return EIP address).
|
||||||