Download AES_4C - MarshallSoft Computing
Transcript
2.8 Error Display
The error message text associated with AES error codes can be displayed by calling aesErrorText. For
example, if ‘ErrCode’ is returned by a AES function and it is negative (indicating an error), the text
associated with the error code can be found by calling aesErrorText, as demonstrated by the following
code segment:
void DisplayError(int ErrCode, char *MsgPtr)
{int Len;
char ErrBuff[128];
printf("ERROR %d: ", ErrCode);
if(MsgPtr) printf("%s: ", MsgPtr);
Len = aesErrorText(ErrCode, (char *)ErrBuff, 127);
if(Len>0) printf("%s\n", ErrBuff);
else printf("\n");
}
2.9 Explicitly Loading an AES DLL
When an application program runs that makes calls to AES32.dll (or AES64.DLL), the Windows operating
system will locate AES32.dll (or AES64.DLL) by searching the directories as specified by the Windows
search path. If the AES DLL is placed in the \WINDOWS, it will always be found by Windows.
However, AES32.dll (or AES64.DLL) can also be loaded from a specified directory by using the
GetProcAddress Win32 API function. For an example, refer to the LoadLib.c program.
9