Visual Basic .net

Description

In VB.net the program works in the same way like in VB6. For details please look at the description above.
A small difference is in the usage of the decoding function. To get the decoded program part you must use a “StringBuilder” instead of a “String”. Otherwise the dll is not able to write into the buffer.

Screenshot

Visual Basic .net 1:

Code Example

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

<DllImport("TcISGEncrypt.dll", CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _ 
Public Shared Function encode_cnc_file(ByVal pIn AsString, ByVal pOut AsString, ByVal password AsString) AsInteger 
End Function 
<DllImport("TcISGEncrypt.dll", CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _ 
Public Shared Function decode_cnc_file(ByVal pDest As StringBuilder, ByVal pName AsString, ByVal Offset AsInteger, ByVal length AsInteger, ByVal password AsString) AsInteger 
End Function 
---------------------------------------------------------------------- 
Dim fileIn As String
Dim fileOut As String
Dim password As String 
encode_cnc_file(fileIn, fileOut, password) 
---------------------------------------------------------------------- 
Dim Offset AsInteger
Dim password As String
Dimactive_file_nameAs String
Dim dest = New StringBuilder
dest.Length = 10 
decode_cnc_file(dest, active_file_name, Offset, 10, password)