Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Activation of the multiple license of the

SPEED7 Communication driver V6.2X

1 Overview SPEED7 Communication driver licenses

Multiple license: for VIPA 100V/200V/300S/SLIO and Siemens


S7-300, S7-400, S7-1200, S7-1500 PLCs
Multiple license Win CE: for VIPA 100V/200V/300S/SLIO and
Siemens S7-300, S7-400, S7-1200, S7-1500 PLCs
Option 64 Bit: You need this option, if you want to build a native 64Bit
application with ComDrvS7.

multiple license=
License for several developer in one company on one location.

2 Activation of the multiple license of the driver


If you have more than one license of the driver, you must activate each
license with one call of the activate function.
Example: if you have purchased the multiple license 32-Bit and the 64-Bit
option, you have to call the activate function two times.

The activate function has the name "MPI6_ActivateComDrvS7SerialOnly".


The function needs the parameter of the serial number.

64 Bit option:
If you have purchased the 64bit option of the driver, you get also a serial
number for this option.
Note: First you have to call the activate function with the 64bit serial number.
After that, you must call the activate-function with the multiple license data.

You find your license data on a separate sheet.

In the following you find a description of the activate-function in the several


programming languages.

1
Activation of the multiple license of the
SPEED7 Communication driver V6.2X

3 Activation of the multiple license


To activate the multiple license of the driver, you must call the function
"MPI6_ActivateComDrvS7SerialOnly".
You must call this function one times, while your application is starting.

With the purchase you get the license data of the driver.
The important data is the serial number.
This serial number is the parameter of the activation-function.

In the following there are examples for the using of the activate-function in the
programming languages C#, Visual C++, Visual Basic (VB6 and VB2008 or
higher), Delphi and C++ Builder.

Activation with C# or VB.Net.


C# or VB.Net uses the wrapper-class of the communication driver.
So the activation-data are given to the constructor of the ComDrvS7V6-class.

Example:
MpiDLL = new ComDrvS7V6("serialNumber", false, false);//messages in
german, no exceptions

If a second call is necessary (64bit-option), you can use the class-method


"MPI6_ActivateSerialOnly". In this case, the constructor gets the serial
number of the 64-bit option. In the second call, you pass the serial number of
the multiple license.

Example:
MpiDLL.MPI6_ActivateSerialOnly("serialNumber");

Activation with VB2008 or higher


Declaration:
Declare Function MPI6_ActivateComDrvS7SerialOnly _
Lib "mpia32_v60_vb.dll" (ByVal Serial As String) As Integer

Call:
Dim serial As String
serial = New String(Chr(0), 255)
serial = "XYZW-DRV6-3322-4173-9876-1234-2498"
'execute activate'
Dim Activate_Ret_Value As Integer
Activate_Ret_Value = MPI6_ActivateComDrvS7SerialOnly(serial)

2
Activation of the multiple license of the
SPEED7 Communication driver V6.2X

Activation with VB6


Declaration:
Declare Function MPI6_ActivateComDrvS7SerialOnly _
Lib "mpia32_v60_vb.dll" (ByVal Serial As String) _
As Long

Call:
Dim Activate_Ret_Value As Long
Dim Serial As String
Serial = String$(255, 0)
serial = "XYZW-DRV6-3322-4173-9876-1234-2498"
Activate_Ret_Value = MPI6_ActivateComDrvS7SerialOnly(Serial)

Activation with Visual C++


Declaration (32-Bit):
__declspec(dllexport) int __cdecl
_MPI6_ActivateComDrvS7SerialOnly(char *Serial);

Declaration (64-Bit):
__declspec(dllexport) int __cdecl
MPI6_ActivateComDrvS7SerialOnly(char *Serial);

Call (32-Bit):
int Ret_Value=0;
char serial[255];
strcpy(serial, "XYZW-DRV6-3322-4173-9876-1234-2498");
Ret_Value=_MPI6_ActivateComDrvS7SerialOnly(serial);

Call (64-Bit):
int Ret_Value=0;
char serial[255];
strcpy(serial, "XYZW-DRV6-3322-4173-9876-1234-2498");
Ret_Value=MPI6_ActivateComDrvS7SerialOnly(serial);

3
Activation of the multiple license of the
SPEED7 Communication driver V6.2X

Activation Delphi 2009 or higher


Declaration (32-Bit):
function _MPI6_ActivateComDrvS7SerialOnly(Serial:PAnsiChar): Integer;
cdecl; external 'MPIA32_V60_BC.DLL';

Declaration (64-Bit):
function MPI6_ActivateComDrvS7SerialOnly(Serial:PAnsiChar): Integer;
cdecl; external 'MPIA64_V60_BC.DLL';

Call (32-Bit):
var
back : integer;
serial : array [0..255] of AnsiChar;

begin
serial := 'XYZW-DRV6-3322-4173-9876-1234-2498';
back := _MPI6_ActivateComDrvS7SerialOnly (@serial);
end;

Call (64-Bit):
var
back : integer;
serial : array [0..255] of AnsiChar;

begin
serial := 'XYZW-DRV6-3322-4173-9876-1234-2498';
back := MPI6_ActivateComDrvS7SerialOnly (@serial);
end;

Activation with Delphi 4 to Delphi 2006


Declaration:
function _MPI6_ActivateComDrvS7SerialOnly(Serial:PCHAR): Integer;
cdecl; external 'MPIA32_V60_BC.DLL'

Call:
var
back : integer;
serial: array[0..255] of char;
begin
serial:='XYZW-DRV6-3322-4173-9876-1234-2498';
//execute activate
back:=_MPI6_ActivateComDrvS7SerialOnly(@serial);
end;

4
Activation of the multiple license of the
SPEED7 Communication driver V6.2X

Activation with C++Builder 5 - 2009 - XE


Declaration:
__declspec(dllexport) int __cdecl MPI6_ActivateComDrvS7SerialOnly(
char *Serial);

Call:
//
int back=0;
char serial[255];
strcpy(serial, "XYZW-DRV6-3322-4173-9876-1234-2498");
back=MPI6_ActivateComDrvS7SerialOnly(serial);

5
Activation of the multiple license of the
SPEED7 Communication driver V6.2X

You might also like