PB代码,请大虾帮忙翻译成VB的,重分酬谢!!
$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