PB代码,请大虾帮忙翻译成VB的,重分酬谢!!

xiaowen01 xiaowen01 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
$PBExportHeader$nv_compression_untitle.sru
$PBExportComments$Compression NVO(无头信息)
forward
global type nv_compression_untitle from nonvisualobject
end type
end forward

global type nv_compression_untitle from nonvisualobject
end type
global nv_compression_untitle nv_compression_untitle

type prototypes
/* Win32 declarations */

function integer compress (ref blob dest, ref long DestLen, ref blob src, long srcLen) library "zlib.dll"
function integer uncompress (ref blob dest, ref long DestLen, ref blob src, long srcLen) library "zlib.dll"

/* Win16 declarations */

function integer compress16 (ref blob dest, ref long DestLen, ref blob src, long srcLen) alias for compress library "zlib16.dll"
function integer uncompress16(ref blob dest, ref long DestLen, ref blob src, long srcLen) alias for uncompress library "zlib16.dll"

end prototypes

type variables
boolean ib_Win32
end variables

forward prototypes
public function integer of_selectfile (ref string as_filename)
public function integer of_getfilename (string as_filename, ref string as_file, ref string as_dir)
public function string of_getfilename (string as_filename)
public function integer of_readfile (string as_filename, ref blob abl_data)
public function integer of_uncompressfile (string as_filename)
public function integer of_compressfile (string as_filename)
public function long of_writefile (string as_filename, ref blob abl_data)
public function integer of_uncompress (ref string as_indicator, ref blob abl_data, ref blob abl_res)
public function integer of_alloc (long al_len, ref blob abl_data)
public function integer of_compress (string as_indicator, ref blob abl_data, ref blob abl_res)
end prototypes

public function integer of_selectfile (ref string as_filename);/*

returns : integer (1=ok,-1=error)
arg1 : string as_FileName (FileName of he selected file)
This function selects a filename.
string ls_docname, ls_named
integer li_Value
/* get a filename with the standard dialog box */
li_value = GetFileOpenName("Select File", &
+ ls_docname, ls_named )
if li_Value <= 0 then return -1
/* return the selected filename */
as_filename = ls_named
return 1
end function
...全文
评论 4
收藏 已收藏
分享
返回顶部
xiaowen01
PowerBuilder 1,111 成员 66,454 内容