#Region - Chilkat.au3 - Header #include-once #include #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 ;~ #AutoIt3Wrapper_Run_Debug_Mode=Y #Tidy_Parameters=/sort_funcs /reel #EndRegion - Chilkat.au3 - Header #Region - Chilkat.au3 - Declarations Global Enum _ $CHILKAT_ERR_SUCCESS, _ $CHILKAT_ERR_GENERAL, _ $CHILKAT_ERR_OBJECTCREATE, _ $CHILKAT_ERR_COMERROR, _ $CHILKAT_ERR_FILENOTEXIST, _ $CHILKAT_ERR_LOAD, _ $CHILKAT_ERR_LOADFILE, _ $CHILKAT_ERR_COUNTER Global Enum _ $CHILKAT_EXT_DEFAULT, _ $CHILKAT_EXT_PARAM1, _ $CHILKAT_EXT_PARAM2, _ $CHILKAT_EXT_PARAM3, _ $CHILKAT_EXT_COUNTER Global Enum _ $CHILKAT_RET_FAILURE, _ $CHILKAT_RET_SUCCESS, _ $CHILKAT_RET_COUNTER Global Const $CHILKAT_PROGID_JSON = 'Chilkat_9_5_0.JsonObject' Global Const $CHILKAT_CLSID_JSON = '{82DF90A6-29B8-4BFC-9433-76A7BC3E0E82}' Global Const $CHILKAT_IID_JSON = '{BDAB5180-01A8-4D6C-AD56-CFD444EA4C07}' Global Const $CHILKAT_PROGID_XML = 'Chilkat_9_5_0.Xml' Global Const $CHILKAT_CLSID_XML = '{501B9600-382D-454D-AA0A-3BC22A87C485}' Global Const $CHILKAT_IID_XML = '{2077C1B5-FBD0-40DF-B7AA-E07CBA589CB0}' Global Const $CHILKAT_PROGID_SSHTUNEL = 'Chilkat_9_5_0.SshTunnel' Global Const $CHILKAT_CLSID_SSHTUNEL = '{D01DB5A3-B9B7-4837-9874-FBA5BA171976}' Global Const $CHILKAT_IID_SSHTUNEL = '{B777D3CD-07A8-4E22-9AB2-EC62B7160ABF}' Global Const $CHILKAT_DLLFILE = @ScriptDir & '\ChilkatAx-9.5.0-win32.dll' Global $__g_hDll_CHILKAT = 0 #EndRegion - Chilkat.au3 - Declarations OnAutoItExitRegister(_Chilkat_ShutDown) ; in case the script exit without calling _Chilkat_ShutDown() #Region - Chilkat.au3 - Function - INIT Func _Chilkat_JSON_ObjCreate() Local $oObject = ObjCreate($CHILKAT_CLSID_JSON, $CHILKAT_IID_JSON, $__g_hDll_CHILKAT) If @error Then _ Return __ErrorLog_Chilkat('ObjCreate: ' & $CHILKAT_PROGID_JSON) & _ SetError($CHILKAT_ERR_OBJECTCREATE, $CHILKAT_EXT_DEFAULT, $CHILKAT_RET_FAILURE) Return $oObject EndFunc ;==>_Chilkat_JSON_ObjCreate Func _Chilkat_ShutDown() DllClose($__g_hDll_CHILKAT) EndFunc ;==>_Chilkat_ShutDown Func _Chilkat_SSHTunel_ObjCreate() Local $oObject = ObjCreate($CHILKAT_CLSID_SSHTUNEL, $CHILKAT_IID_SSHTUNEL, $__g_hDll_CHILKAT) If @error Then _ Return __ErrorLog_Chilkat('ObjCreate: ' & $CHILKAT_PROGID_SSHTUNEL) & _ SetError($CHILKAT_ERR_OBJECTCREATE, $CHILKAT_EXT_DEFAULT, $CHILKAT_RET_FAILURE) Return $oObject EndFunc ;==>_Chilkat_SSHTunel_ObjCreate Func _Chilkat_StartUp($sDLL_FileFullPath = Default) If $sDLL_FileFullPath = Default Then $sDLL_FileFullPath = $CHILKAT_DLLFILE If Not FileExists($sDLL_FileFullPath) Then _ Return __ErrorLog_Chilkat('DLL File not exist:' & $sDLL_FileFullPath) & _ SetError($CHILKAT_ERR_FILENOTEXIST, $CHILKAT_EXT_PARAM1, $CHILKAT_RET_FAILURE) $__g_hDll_CHILKAT = DllOpen($sDLL_FileFullPath) EndFunc ;==>_Chilkat_StartUp Func _Chilkat_XML_ObjCreate() Local $oObject = ObjCreate($CHILKAT_CLSID_XML, $CHILKAT_IID_XML, $__g_hDll_CHILKAT) If @error Then _ Return __ErrorLog_Chilkat('ObjCreate: ' & $CHILKAT_PROGID_XML) & _ SetError($CHILKAT_ERR_OBJECTCREATE, $CHILKAT_EXT_DEFAULT, $CHILKAT_RET_FAILURE) Return $oObject EndFunc ;==>_Chilkat_XML_ObjCreate #EndRegion - Chilkat.au3 - Function - INIT #Region - Chilkat.au3 - Function - Misc Func __ErrorLog_Chilkat($sText, $iError = @error, $iExtended = @extended) Local $fnFunction = _ErrorLog_ChilkatWrapper() If IsFunc($fnFunction) Then $fnFunction("!" & ' @error=' & $iError & ' @extended=' & $iExtended & ' : ' & $sText & @CRLF) Return SetError($iError, $iExtended) EndFunc ;==>__ErrorLog_Chilkat Func _ErrorLog_ChilkatWrapper($fnFunction = Default) Local Static $fnFunction_static = Null If $fnFunction = Default Then Return $fnFunction_static If Not IsFunc($fnFunction) Then Return SetError(1) $fnFunction_static = $fnFunction Return $fnFunction_static EndFunc ;==>_ErrorLog_ChilkatWrapper #EndRegion - Chilkat.au3 - Function - Misc