The FesfUtil2 APIs are available in two forms: C and C++. These two APIs are entirely interoperable but, to avoid confusion, we recommend that you choose and stick with one set of APIs.
In the FesfUtil2 Library there is a C Language function for each C++ Function. Given a C++ function named FESFUtil2Function the equivalent function for C will be named FESFUtil2Function_C. The documentation below describes the C++ function but also provides the C prototype.
All the C++ functions report errors by throwing an exception of type FEU2Exception. The FEU2Exception structure contains a Win32 error code (and, if applicable, an NTSTATUS value) indicating the error encountered. FEU2Exception also provides methods for rendering strings that describe the error.
Note the following regarding the C Language functions:
• Every C Language function returns a Win32 Error Code. If the function succeeds, the function returns ERROR_SUCCESS.
• When a C++ function returns a value, the C equivalent returns the value in one or more [out] parameters. In these situations, the documentation only refers to the return value.
• Strings that are passed as input must be null terminated.
• Where a buffer and length is passed for the return of a string value, on
input the buffer size is specified in bytes and must include the maximum string
length that can fit in the buffer, including the trailing null character
(2 bytes long since all strings are wide-character strings).
On return, the
buffer length is set by FesfUtil2 to the length (in bytes) of the returned
string NOT including the terminating null character.
• If a buffer and length are passed as input to an FesfUtil2 function, and the indicated buffer is not large enough, FesfUtil2 will return ERROR_MORE_DATA and the minimum required buffer length will be provided on output in the buffer length parameter.
• If a C++ function returns a FESF_UTIL2_SOLUTION_HEADER, then the C function has three extra parameters: A pointer to the buffer into which the header is to be returned, a pointer to a DWORD containing the length of the buffer on input, and returning the size of the header on output, and a pointer to a DWORD in which is returned the maximum possible length of the header in the file without extension.