EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Throwing CbFsErrors

Posted: 11/04/2008 11:15:35
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285


I asked this question a while back in another thread and I never really got a satisfactory answer to it.

The CbFsError documentation implies that you can throw it either with an error code or with a message string. But, whenever I throw it, no matter what code or string I pass to it, the Windows operating system displays a totally different message than the one I am expecting.

I am using the VC++ library API with Windows XP, SP3.

Posted: 11/04/2008 11:27:45
by Eugene Mayevski (Team)

Here's how error reporting works:

you throw the error with some error code (the message is ignored). CBFS API converts this error code to "native" error code (Native is the name of the NT kernel system. This is not Win32). Native error code is passed to Windows as a result of IRP (request) processing. Windows kernel consumes this native error code and acts accordingly. As a result, kernel can either handle the error internally or report it back to the caller. As most callers in Windows are Win32 callers, the error code will be converted back to Win32 error code. Finally, Win32 application generates an error message based on the error code. This is not necessarily the error code that you reported (this is because of the double conversion). No, you can't avoid this conversion, neither you can pass your text message.

Sincerely yours
Eugene Mayevski
Posted: 11/04/2008 13:07:44
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Thank you.



Topic viewed 2914 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!