<< Prev        Next >>

ID : 124

#Pragma Encrypt

Function

Source code will be encrypted.

Syntax

#Pragma Encrypt(On)
	'Statements
#Pragma Encrypt(Off)

Guaranteed entry

#Pragma Encrypt(On)
This is the start of the source code to encrypt.
#Pragma Encrypt(Off)
This is the end of the source code to encrypt.

Description

Source code will be encrypted.

A program between "#Pragma Encrypt(On)" and "#Pragma Encrypt(Off)" is encrypted.

Attention

  • Handle and remember the encryption key for encryption/decrypting with care. If you forget the key, decryption cannot be done.
  • For command "On" and "Off," variables cannot be used.
  • When encrypting the TP panel file, make sure that the reserved area of the Panel Designer is not included in area to be encrypted.
    If the reserved area of Panel Designer is included in the encryption area, an execution error will occur in the TP panel after encryption.
    In addition, the TP panel editor will not be able to recognize files properly.
    The reserved area for the Panel Designer is shown as follows.

  • #ifdef TP_DESIGNER
    '<<--TPDESIGNER_RESERVED-->>
         
         
    :
         
    '<<--TPDESIGNER_RESERVED-->>
    #endif

Example

'!TITLE "Program Code Encryption"
' To repeat process to add 1 to variable aaa for 5 times
Sub Sample_PragmaEncrypt

  Dim aaa As Integer
  Dim bbb As Integer 
  Dim ccc As Integer 

  aaa = 0
  bbb = 0
  ccc = 0

' Start of the program code to encrypt
#Pragma Encrypt( On ) 

  ' To repeat until ccc reaches 15
  For ccc = 10 To 15 
    aaa = aaa + 1

' End of the program code to encrypt
#Pragma Encrypt( Off )

  Next
  bbb = ccc

  ' Display "5" on the message output window
  PrintDbg aaa

  ' Display "15" on the message output window
  PrintDbg bbb

End Sub

ID : 124

<< Prev        Next >>