Attribute VB_Name = "enigma_ide"
' Declaration of Enigma API functions
Public Const MAX_STRING_SIZE = 255

Public Type TWMContent
    WMType As Long
    Name As String
    NameLen As Long
    Text As String
    TextLen As Long
    FileName As String
    FileNameLen As Long
    AFile As String
    AFileLen As Long
End Type

' Registration API
Public Declare Function EP_RegSaveKey Lib "enigma_ide.dll" (ByVal Name As String, ByVal Key As String) As Byte
Public Declare Function EP_RegLoadKey Lib "enigma_ide.dll" (ByRef Name As String, ByRef Key As String) As Byte
Public Declare Function EP_RegCheckKey Lib "enigma_ide.dll" (ByVal Name As String, ByVal Key As String) As Byte
Public Declare Function EP_RegDeleteKey Lib "enigma_ide.dll" () As Byte
Public Declare Function EP_RegLoadAndCheckKey Lib "enigma_ide.dll" () As Byte
Public Declare Function EP_RegCheckAndSaveKey Lib "enigma_ide.dll" (ByVal Name As String, ByVal Key As String) As Byte
Public Declare Function EP_RegHardwareID Lib "enigma_ide.dll" () As String
Public Declare Function EP_RegKeyCreationDate Lib "enigma_ide.dll" (ByRef Year As Long, ByRef Month As Long, ByRef Day As Long) As Byte
Public Declare Function EP_RegKeyExpirationDate Lib "enigma_ide.dll" (ByRef Year As Long, ByRef Month As Long, ByRef Day As Long) As Byte

' Trial API
Public Declare Function EP_TrialExecutions Lib "enigma_ide.dll" (ByRef Total As Long, ByRef Left As Long) As Byte
Public Declare Function EP_TrialDays Lib "enigma_ide.dll" (ByRef Total As Long, ByRef Left As Long) As Byte
Public Declare Function EP_TrialExpirationDate Lib "enigma_ide.dll" (ByRef Year As Long, ByRef Month As Long, ByRef Day As Long) As Byte
Public Declare Function EP_TrialDateTillDate Lib "enigma_ide.dll" (ByRef StartYear As Long, ByRef StartMonth As Long, ByRef StartDay As Long, ByRef EndYear As Long, ByRef EndMonth As Long, ByRef EndDay As Long) As Byte
Public Declare Function EP_TrialExecutionTime Lib "enigma_ide.dll" (ByRef Total As Long, ByRef Left As Long) As Byte

' Misc API
Public Declare Function EP_MiscGetWatermark Lib "enigma_ide.dll" (ByVal ID As Long, ByVal WM As TWMContent) As Long

' Protection API
Public Declare Function EP_ProtectedStringByID Lib "enigma_ide.dll" (ByVal ID As Long, ByVal Str As String, ByVal Length As Byte) As Byte
Public Declare Function EP_ProtectedStringByKey Lib "enigma_ide.dll" (ByVal Key As String, ByVal Str As String, ByVal Length As Byte) As Byte
