Template:DLL Language Specific

From Payment Processing Software Library
Jump to: navigation, search

Visual Basic

  • In VB you need to declare all the parameters using the ByVal prefix instead of ByRef. This includes the strings.
  • If you would like to use an OCX instead for Visual Basic, you can use CLClient.ocx in the same directory. Another alternative is File Based Communication.

Public Declare Function clcInit Lib "CLCAPIW2.dll" (ByVal ClientName As String, ByVal ServerName As String As Integer)

C++

  • The Header file is the regular WIN32 header file. The data type LONG is 32 bit.
  • In C, the path has to be of format "C:\\911\\DATA", because back-slash is the escape char

DllImport("CLCAPIW2.dll", EntryPoint="clcInit", SetLastError=true, ExactSpelling=true, CallingConvention=CallingConvention.StdCall)

public static extern int clcInit(string ClientName, string ServerName);

.NET

  • For .NET please use clcCs.dll and CLCAPIW2.dll from \911\BIN directory.
  • Keep in mind that in C# and any .NET environment for instance, LONG is 64 bit so you have to use int or Integer not LONG ot Long in your definitions.
  • The .NET interface is the same as C, with one exception: there is no clc prefix and you have to use an object.

    Example: the call
    clcSetMerchantIndex(hObj, index)' is obj.setMerchantIndex(index).