The following commands are used to generate network protected applications. For 32-bit applications, use the PkitNet32.dll. For 64-bit applications, use the PkitNet64.dll
Before using the PkitNet32dll/PkitNet64.dll commands, the program which calls these commands must have a copy of the description of the DLL function declarations (header files found in folder called "Include").
For added security, we recommend that you rename the PkitNet32.dll/PkitNet64.dll to make it less obvious that you are using the ProtectKit. If you rename the PkitNet32.dll/PkitNet64.dll files, you must be sure that your program points to the renamed dll files. When using Visual Basic, in the Pkit3net.bas file, change the references from "PkitNet32.dll/PkitNet64.dll" to the name of the renamed dll. In VC6, Delphi, and C++ Builder, change the LoadProtectKit3NETDll to refer to the newly renamed dll.
Containers and Header Files
Container | Header File Name |
C++Builder, VisualC++ | Pkit3net.h |
Delphi | Pkit3net.pas |
VisualBasic | Pkit3net.bas |
DLL Function List (in Alphabetical order)
Function Name | Explanation |
PK3NETDeleteRegistry | Deletes the specified item from the registry |
PK3NETGetError | Retrieves the error code from the Net Protection DLL |
PK3NETGetMessage | Uses the Form Resize event to retrieve message information |
PK3NETGetMessageE | Uses the Form Resize event to retrieve message information (Supports multiple network cards) |
PK3NETGetRegistryValue | Retrieves the specified information from the registry |
PK3NETInitialize | Initializes network protection and enables the network protection functions |
PK3NETSetRegistryValue | Sets the specified information in the registry. |
PK3NETStartNet | Starts network protection |
PK3NETStopNet | Stops network protection |
Structure Definition (User defined type)
(1) C++Builder,VisualC++
typedef struct {
char
szAppID[13];
char
szMessage[129];
long
lSendTime;
HWND hWndHandle;
} PROTECTKIT3NET;
typedef PROTECTKIT3NET * PTR_PROTECTKIT3NET;
typedef struct {
char
szMessage[129];
long
lMessageLen;
char
szPcName[65];
long
lPcNameLen;
char
szMacAdr[13];
long
lMacAdrLen;
} PROTECTKIT3NET_MSG;
typedef PROTECTKIT3NET_MSG * PTR_PROTECTKIT3NET_MSG;
typedef struct {
char szMessage[129];
long lMessageLen;
char szPcName[65];
long lPcNameLen;
char szMacAdr[65];
long lMacAdrLen;
} PROTECTKIT3NETE_MSG;
(2) Delphi
type
PROTECTKIT3NET = Record
szAppID:
array[0..12] of AnsiChar;
szMessage: array[0..128]
of AnsiChar;
lSendTime:
Longint;
hWndHandle: HWND;
end;
PROTECTKIT3NET_MSG = Record
szMessage:
array[0..128] of AnsiChar;
lMessageLen: Longint;
szPcName:
array[0..64] of AnsiChar;
lPcNameLen: Longint;
szMacAdr:
array[0..12] of AnsiChar;
lMacAdrLen:
Longint;
end;
PROTECTKIT3NETE_MSG = Record
szMessage: array[0..128]
of AnsiChar;
lMessageLen: Longint;
szPcName: array[0..64]
of AnsiChar;
lPcNameLen: Longint;
szMacAdr: array[0..64]
of AnsiChar;
lMacAdrLen:
Longint;
end;
(3) VisualBasic
Type PROTECTKIT3NET
szAppID
As String * 13
szMessage As
String * 129
lSendTime As
Long
hWndHandle As
Long
End Type
Type PROTECTKIT3NET_MSG
szMessage
As String * 129
lMessageLen As
Long
szPcName As
String * 65
lPcNameLen As
Long
szMacAdr
As String * 13
lMacAdrLen As
Long
End Type
Type PROTECTKIT3NETE_MSG
szMessage As
String * 129
lMessageLen As
Long
szPcName As
String * 65
lPcNameLen As
Long
szMacAdr As
String * 65
lMacAdrLen As
Long
End Type
Explanation of the PROTECTKIT3NET Member Variables:
When the PK3NETInitialize command is executed, values set in
member variables are enabled and szMessage content is sent
to other PCs
szAppID - use this to set the application ID (8 digits + "."
+ 3 digits).
Because the all the same applications running on the network will
send and recieve message notification, please be sure to use the
above format for the application id.
An example of the 8 digits + "." + 3 digits format is:
"Newtone0.001"
szMessage - use this to set the message that is sent between
PCs on the network
One possibility would be to use product serial numbers or other
application identifiers as the szMessage content.
lSendTime - use this to set the time interval (in seconds)
between message transmissions.
hWndHandle - set the application's window handle into this
variable.
Explanation of the PROTECTKIT3NET_MSG Member
Variables:
When the PK3NETGetMessage command is executed values are set
into the various member variables
(The information retrieved by PK3NETGetMessage is
information transmitted by other PCs existing on the same
network.
szMessage refers to the message that is received.
(This is the PROTECTKIT3NET szMessage set PCs other than your
own)
lMessageLen is the length of the szMessage
szPcName refers to the computer name.
(For example in Windows98, the computer name is that name for the
computer set in the Control Panel / Newtork)
lPcNameLen refers to the length of the szPcName
szMacAdr is the network Mac Address
lMacAdrLen refers to the length of the szMacAdr
Explanation of the PROTECTKIT3NET_MSG Member
Variables:
When the PK3NETGetMessage command is executed values are set into
the member variables
(This is the information sent from PCs, other than your own, that
are connected on the same network.
szMessage refers to the message that is received.
(This is the PROTECTKIT3NET szMessage transmitted by PCs other than
your own)
lMessageLen is the length of the szMessage
szPcName refers to the computer name.
(For example: In Windows98, the computer name will be the computer
name set in the Control Panel / Newtork)
lPcNameLen refers to the length of the szPcName
szMacAdr the network card Mac Address. Even if multiple
network cards exist, this can retrieve information from only one of
them.
lMacAdrLen refers to the length of the szMacAdr
Explanation of the PROTECTKIT3NETE_MSG Member
Variables:
When the PK3NETGetMessageE command is executed values are set into
the member variables
(This is the information sent from PCs, other than your own, that
are connected on the same network.
szMessage refers to the message that is received.
(This is the PROTECTKIT3NET szMessage transmitted by PCs other than
your own)
lMessageLen is the length of the szMessage
szPcName refers to the computer name.
(For example: In Windows98, the computer name will be the computer
name set in the Control Panel / Newtork)
lPcNameLen refers to the length of the szPcName
szMacAdr the network card Mac Address. The can retrieve up
to 5 Mac Addresses. When multiple Mac Addresses are retrieved, they
will be seperated by a colon.
For example:
One Mac Address --> 001122334455 Multiple Mac Addresses -->
001122334455:66778899AABB
lMacAdrLen refers to the length of the szMacAdr
The Message flow
In this case, "Serial No = xxx" refers to the application's serial
number transmitted in PROTECTKIT3NET's szMessage.