pdfGetWin32ErrorFunc

Return the name of the last Win32 API function to fail.
const char *pdfGetWin32ErrorFunc()
Returns the name of the last Win32 API function to fail on this thread. Returns NULL if there is no saved function name, i.e., if no Win32 API functions have failed since the last call to pdfClearWin32ErrorInfo.

Call pdfClearWin32ErrorInfo first to clear any saved function name and error code.

Each thread has its own, independent saved error function and code.

This function is only available on Windows.

Win32 error info is currently saved only for printing functions.

C:
pdfClearWin32ErrorInfo(); if (pdfPrint4(pdf) != pdfOk) { const char *func = pdfGetWin32ErrorFunc(); DWORD code = pdfGetWin32ErrorCode(); if (func != NULL) { // ... error was caused by [func] / [code] } }
pdfClearWin32ErrorInfo
pdfGetWin32ErrorCode