SDK - More Error Info

Started by JTaylor, May 25, 2020, 08:44:33 AM

Previous topic - Next topic

JTaylor

Is there a way to return More Error Info from the Extender?  I know how to create my own Error codes and return an Error but need to include "More Info" .   If so, a point in the right direction would be appreciated.

Thanks.

Jim

td

It's in addons.h:

Code (c) Select
/*---------------------------------------------------------------------------
LONG FARPASCAL DllStoreErrorInfo(HGLOBAL hBatData, LPSTR lpErrorInfo)

  hBatData     =  lpViperStruct->hBatData
  lpErrorInfo  =  error information string to store

  Returns 0 on success, or a positive value on error:
     1  Function failed
     2  GlobalLock(hBatData) failed
-----------------------------------------------------------------------------*/

typedef LONG (FARPASCAL * DLLSTOREERRORINFO) (HGLOBAL, LPSTR);


Note that the function name contains part of the name of the button on the WIL error message box.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Excellent.  That did the job.  Thanks.

Jim

td

There is an inline template method in WTExtender.h, as well.

Code (c) Select
inline long DllStoreErrorInfo(LPCSTR lpErrorInfo) throw()
{
return m_lpViperStruct->lpfnDllStoreErrorInfo(m_lpViperStruct->hBatData,(LPSTR)lpErrorInfo);
}
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Yep.  That is what I used.  Thanks again.

Jim