尝试在纯基本版本5.70 LTS上激活30天试用版,但使用发布的代码,在检查语法时返回以下错误。 (如果有任何区别,请在64位w7计算机上使用32位版本)
我正在使用:
Dim glob作为新的Chilkat.Global glob.UnlockBundle(“开始我的30天 试用”)
并获得以下错误:
第4行“昏暗”的系统税是:昏暗的名字(nb)。
答案 0 :(得分:0)
Dim用于定义数组。要定义一个由3个字符串组成的数组,请编写
Dim names.s(2)
根据Chilkat网站的PureBasic module,要解锁捆绑包,您应该按照以下示例进行操作。
IncludeFile "CkGlobal.pb"
Procedure ChilkatExample()
; The Chilkat API can be unlocked for a fully-functional 30-day trial by passing any
; string to the UnlockBundle method. A program can unlock once at the start. Once unlocked,
; all subsequently instantiated objects are created in the unlocked state.
;
; After licensing Chilkat, replace the "Anything for 30-day trial" with the purchased unlock code.
; To verify the purchased unlock code was recognized, examine the contents of the LastErrorText
; property after unlocking. For example:
glob.i = CkGlobal::ckCreate()
If glob.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
success.i = CkGlobal::ckUnlockBundle(glob,"Anything for 30-day trial")
If success <> 1
Debug CkGlobal::ckLastErrorText(glob)
CkGlobal::ckDispose(glob)
ProcedureReturn
EndIf
status.i = CkGlobal::ckUnlockStatus(glob)
If status = 2
Debug "Unlocked using purchased unlock code."
Else
Debug "Unlocked in trial mode."
EndIf
; The LastErrorText can be examined in the success case to see if it was unlocked in
; trial more, or with a purchased unlock code.
Debug CkGlobal::ckLastErrorText(glob)
CkGlobal::ckDispose(glob)
ProcedureReturn
EndProcedure