1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- $PBExportHeader$f_init_fxappcom.srf
- $PBExportComments$初始化分销系统插件
- global type f_init_fxappcom from function_object
- end type
- forward prototypes
- global function integer f_init_fxappcom ()
- end prototypes
- global function integer f_init_fxappcom ();int rslt = 1
- string arg_msg
- uo_reghelper ll_reghelper
- IF Not IsValid(FXAppCom) THEN
- ll_reghelper = Create uo_reghelper
- FXAppCom = Create oleobject
- IF ll_reghelper.ConnectToNewObject("SanrossDll.FXAppCom", "SanrossDll.dll", FXAppCom, arg_msg) <> 1 THEN
- Destroy ll_reghelper
- Destroy FXAppCom
- rslt = 0
- GOTO ext
- END IF
- Destroy ll_reghelper
- END IF
- string ip
- long port
- ip = ProfileString(sys_fx_ini, 'server', 'ip', '223.4.178.191')
- port = ProfileInt(sys_fx_ini, 'server', 'port', 30040)
- //ip = '127.0.0.1'
- //port = 30040
- FXAppCom.Init(ip, port, ref arg_msg)
- if arg_msg <> '' then
- rslt = 0
- end if
- ext:
- if rslt = 0 then
- MessageBox('提示', arg_msg)
- end if
- return rslt
- end function
|