• Welcome to SQLitening Support Forum.

A VC++ wrapper for Sqlitening (with demo project)

Started by yctsai, May 22, 2011, 02:05:45 PM

Previous topic - Next topic


This is a simple VC++ wrapper for Sqlitening. I've test it in local and remote mode, work great.

It is very simple to use, olny two files:

1. sluwrapper.h : define API prototypes in SQLitening.Dll and SQLiteningU.Dll.
2. sluwrapper.cpp: implementation


1. I use CString for convenience, it only works in VC++. If you want to port it to another C++ platform, remember to substitute CString in some way.

2. In the wrapper, I implement two functions: ES2A and DS2U.
ES2A converts and encrypt UNICODE to ASCII string that can be accept by SqliteningU.DLL.
When read from DB, we use DS2U to decrypt and convert it to UNICODE string.

The wrapper can handle any language in the world (Japan, Chinese, UK .. and so on), because, I treat the strings as "Binary raw data".

3. Error handling is weak. I only implement "GetErrorString()", you can modify it to your style.

    // if result is not zero, some error occur, you can read error string using "GetErrorString()"

Feel free to use it.