<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_DbfDecrypt |
Declare Function sx_DbfDecrypt Lib "Apollo9.dll" () As Integer
BOOL FAR PASCAL sx_DbfDecrypt (VOID);
Decrypts a table that has been encrypted at the file level with sx_DbfEncrypt or decrypt all records that have been encrypted at the record level by setting sx_SetPassword.
The password used in decrypting the table must be set via sx_SetPassword and of course must be the same one used to encrypt the data in the first place.
The progress of the function may be visually monitored if a gauge hook has been set with sx_SetGaugeHook.
The file should be opened for exclusive use before encrypting or decrypting.
True if the function is successful and False if not.
If the operation is successful, the table header block is rewritten as a standard xBase compatible header block. A table encrypted at the file level may not be read by other xBase compatible programs.
' Decrypt an encrypted database
sx_SetPassword "HANDEL"
If Not sx_DbfDecrypt() Then
MsgBox "Database decrypting failed"
End If
void CNamesForm::OnButtonDecrypt()
{
sx_SetPassword("HANDEL");
if (!sx_DbfDecrypt())
AfxMessageBox((LPCSTR) "Database decrypting failed.");
}