Visual Basic 6

Description

This is a short example application to demonstrate how to enconde and decode a NC-Program.
The Start-Button starts the program in the text box.
The Stop-Button stops it.
With the “Encode a file” button you can encode an NC-Program.
The button “activate decode” switches the online decoding for the running program.

Screenshot

Visual Basic 6 1:

Code Example

The following lines show the usage of the TcISGEncryption.dll with VB6:

Private Declare Function encode_cnc_file Lib "TcISGEncrypt.dll" _
(ByVal pIn As String, ByVal pOut As String, ByVal password As
String) As Long 
Private Declare Function decode_cnc_file Lib "TcISGEncrypt.dll" _
(ByVal pDest As String, ByVal pName As String, ByVal Offset
As Long, ByVal length As Long, ByVal password As String) As
Long 
---------------------------------------------------------------------- 
Dim fileIn As String
Dim fileOut As String
Dim password As String 
encode_cnc_file(fileIn, fileOut, password) 
---------------------------------------------------------------------- 
Dim Offset As Long
Dim dest As String * 10
Dim password As String
Dim active_file_name As String 
Call decode_cnc_file(dest, active_file_name, Offset, Len(dest), password)