8.2.4.1 Loading the SecureDECODE SDK DLL


   Loading of SecureDECODE SDK DLL


Here are code snippets on how to perform this action:



   C++


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
/**
 * @brief Load SecureDecodeSDK DLL
 *
 * @param no parameters. uses the constant SECURE_DECODE_SDK_DLL_NAME_x86
 *
 * @return Loads the DLL that implemented SecureDECODE function.
 *
 */
int32_t Load_SecureDecodeSDK_DLL()
{
        h_SecureDecodeSDK_DLL_Handler_x86 = LoadLibrary(SECURE_DECODE_SDK_DLL_NAME_x86);
        if (h_SecureDecodeSDK_DLL_Handler_x86 != NULL)
        {
                wprintf(L"\n Successfuly loaded SecureDECODE x86 DLL {%s}", SECURE_DECODE_SDK_DLL_NAME_x86);
                return 0x00;
        }

        return 0x01;
}



   VB .NET


1
2
3
4
5
Dim SecureDECODE_DLL_Path_ As String = "SecureDECODE_SDK_DLL_x86.dll"

Dim SecureDECODE_LibraryHandle As IntPtr

SecureDECODE_LibraryHandle = LoadLibrary(SecureDECODE_DLL_Path_)



   C#


1
2
3
4
private string cs_SD_SDK_SECURE_DECODE_DLL_NAME = "SecureDECODE_SDK_DLL_x86.dll";
private IntPtr m_hDecodeDll_x86 = IntPtr.Zero;
...
m_hDecodeDll_x86 = LoadLibrary(cs_SD_SDK_SECURE_DECODE_DLL_NAME);



   DELPHI


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
type
  SecureDELTA_DLL_Record = record
    const SecureENCODE_DLL = 'SecureENCODE_SDK_DLL_x86.dll';
    const SecureENCODE_DLL_Main_Ptr = 'SecureDELTA_SDK_SecureENCODE_Main_';
    const SecureDECODE_DLL = 'SecureDECODE_SDK_DLL_x86.dll';
    const SecureDECODE_DLL_Main_Ptr = 'SecureDELTA_SDK_SecureDECODE_Main_';
  end;

var
  SecureDECODE_DLL_Handle: HMODULE;

begin
  SecureDECODE_DLL_Handle :=  LoadLibrary(SecureDELTA_DLL_Record.SecureDECODE_DLL);