f_init_fxappcom.srf 1002 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. $PBExportHeader$f_init_fxappcom.srf
  2. $PBExportComments$初始化分销系统插件
  3. global type f_init_fxappcom from function_object
  4. end type
  5. forward prototypes
  6. global function integer f_init_fxappcom ()
  7. end prototypes
  8. global function integer f_init_fxappcom ();int rslt = 1
  9. string arg_msg
  10. uo_reghelper ll_reghelper
  11. IF Not IsValid(FXAppCom) THEN
  12. ll_reghelper = Create uo_reghelper
  13. FXAppCom = Create oleobject
  14. IF ll_reghelper.ConnectToNewObject("SanrossDll.FXAppCom", "SanrossDll.dll", FXAppCom, arg_msg) <> 1 THEN
  15. Destroy ll_reghelper
  16. Destroy FXAppCom
  17. rslt = 0
  18. GOTO ext
  19. END IF
  20. Destroy ll_reghelper
  21. END IF
  22. string ip
  23. long port
  24. ip = ProfileString(sys_fx_ini, 'server', 'ip', '223.4.178.191')
  25. port = ProfileInt(sys_fx_ini, 'server', 'port', 30040)
  26. //ip = '127.0.0.1'
  27. //port = 30040
  28. FXAppCom.Init(ip, port, ref arg_msg)
  29. if arg_msg <> '' then
  30. rslt = 0
  31. end if
  32. ext:
  33. if rslt = 0 then
  34. MessageBox('提示', arg_msg)
  35. end if
  36. return rslt
  37. end function