36 lines
1.9 KiB
Plaintext
36 lines
1.9 KiB
Plaintext
ChangeTest - sample code to call DinkeyChange Module in Visual Studio 2008
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
This project is written in Visual Studio 2008 but will work in more recent
|
|
versions of Visual Studio (they will upgrade the Project to the latest version).
|
|
|
|
The main source files in the project are:
|
|
|
|
changetest.c Samples\c main source code file for C
|
|
changetest.h Samples\c contains some useful constants
|
|
|
|
Note that the source paths are structured to minimise files. If you want to
|
|
move this project the references to these files will probably be no longer valid.
|
|
|
|
The solutions have been modified to link in the correct library file (DinkeyChange.lib,
|
|
DinkeyChange64.lib) depending on whether the output is 32-bit or 64-bit. They have also
|
|
been modified to assume Unicode characters are not the default (this sample uses ascii
|
|
characters because that is what the Dinkey dongle SDK requires).
|
|
|
|
The sample code contains 7 functions. Just use which ever functions are most
|
|
appropriate and customise in your own way. The sample code is just a guide.
|
|
As none of the parameters are sensitive then there is no need to implement
|
|
strong security in calling DinkeyChange.
|
|
|
|
Note - you will not be able to debug your program after DinkeyChange has been called.
|
|
Our strong anti-debug code will cause the debugger to throw an exception. However,
|
|
if you do need to debug your code you can use our debug module for DinkeyChange:
|
|
DinkeyChangeDebug.dll. So, you can use DinkeyChange.dll for your release build
|
|
and DinkeyChangeDebug.dll for your debug build. (64-bit versions of these files
|
|
also exist).
|
|
|
|
Note - If you are using Visual Studio 2012 or higher then you may get the linker error
|
|
"LNK2026: module unsafe for SAFESEH image". To stop this please turn off SAFESEH by
|
|
going to your project properties > Linker > Advanced and setting
|
|
"Image Has Safe Exception Handlers" to "No".
|