f_getqrcode.srf 909 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. $PBExportHeader$f_getqrcode.srf
  2. global type f_getqrcode from function_object
  3. end type
  4. forward prototypes
  5. global function string f_getqrcode (string arg_content)
  6. end prototypes
  7. global function string f_getqrcode (string arg_content);String Pathname
  8. oleobject FM
  9. uo_reghelper ll_reghelper
  10. String arg_msg = ''
  11. Pathname = sys_cur_path+ins_fjtemppath+'\QR' + arg_content + '.bmp'
  12. IF Trim(Pathname) <> '' THEN
  13. IF Not FileExists ( Pathname ) THEN
  14. FM = Create oleobject
  15. ll_reghelper = Create uo_reghelper
  16. IF ll_reghelper.ConnectToNewObject("LJCom.FileHelper", "LJCom.FileHelper.dll", FM, arg_msg) <> 1 THEN
  17. MessageBox('', arg_msg)
  18. GOTO ext
  19. END IF
  20. IF Not FM.SaveQRCode(arg_content, ref Pathname, Ref arg_msg) THEN
  21. MessageBox('', arg_msg)
  22. GOTO ext
  23. END IF
  24. ext:
  25. FM.DisconnectObject()
  26. Destroy FM
  27. Destroy ll_reghelper
  28. END IF
  29. END IF
  30. RETURN Pathname
  31. end function