Protect your SQL Server database from unauthorized access, modification and distribution! Hides schema!
 
About DBDefence
System Requirements
Installation
Configuration and Startup
DBDefence Configurator
Starting DBDefence
Database Encryption
Introduction
Hardware Encryption
Encryption Tools
Encryption API
Exceptions
Database decryption
FIPS 140-2 Information
Database Access
Introduction
Using SQL commands
DBDefence Client DLL
Reporting Services Extension
Editing Database with SQL Studio
Service Broker Access
Hiding DbDefence
Hiding DbDefence
Profiler Protection
Profiler Protection
Backup, Distribution ...
Replication
Backup
Distribution
DBDefence SQL functions
dbd_hardware_aes
dbd_listdb
dbb_on
dbd_reg_info
dbd_status
Sales questions
Purchase and support
Activation
Acknoledgements
DBDefence 3 Reference

DBDefence Encryption API

There are two DLLs in API folder of DbDefence installation.

dbencrypt.dll - for 32-bit applications
dbencrypt64.dll for 64-bit applications.

You can use API from C#, C++ or any other languages.

For further reference see code examples in API folder. C#/C++ examples available.

API consist of 1 function:

int Encrypt (TCallbackFunc * func, int argc, wchar_t * argv[]);

TCallbackFunc * func is the pointer to the function to be called on events during encryption: info, error and success messages.

It can be defined as:

void WINAPI ShowMessage (const wchar_t * msg, int code);

Info messages - msg -  comes with error code 0. Possible error codes:

0 - Success.
-777 - Encryption finished. (used only in API)
-21 - Error messages from SQL Server.
-20 - Can't connect to server.
-19 - DbDefence not installed or not started.
-18 - Database already encrypted.
-17 - No password specified.
-16 - Can't switch to select db.
-15 - Can't create dbdefence tables in database or created incorrectly.
-14 - Unexpected error.
-13 - Can't detach database.
-12 - Can't open database files for RW access.
-11 - Can't attach database after encryption.
-10 - File with exceptions specified but its not accessible.
-4 - Can't access all files of the database.
-3 - Database too big for demo version.
-2 - Unknown command line option.

If encryption done successfully API call func with code -777 and return 0. In case of error it returns error code used in callback.

Next parameter argc is the number of parameters in next parameter argv. It is the same as traditional parameters of function main in C/C++ programming.

Parameters are the same as parameters to command line encryption tool.


support@dbdefence.com
Copyright Elitude Software, 2009-2012