diff options
author | Eric Norum <WENorum@lbl.gov> | 2003-05-27 21:27:32 +0000 |
---|---|---|
committer | Eric Norum <WENorum@lbl.gov> | 2003-05-27 21:27:32 +0000 |
commit | 638e53ff239fdc0ae65d88dc196a507dd0642f14 (patch) | |
tree | 664e5dea7db53fc4b904c158f24f9fd5f22485fb /zlib-1.1.4/contrib/visual-basic.txt | |
parent | b92d90caf1ed6f6a7c9edcfc873bad4efc7b750c (diff) |
Add zlib to RTEMS add-ons
Diffstat (limited to 'zlib-1.1.4/contrib/visual-basic.txt')
-rw-r--r-- | zlib-1.1.4/contrib/visual-basic.txt | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/zlib-1.1.4/contrib/visual-basic.txt b/zlib-1.1.4/contrib/visual-basic.txt new file mode 100644 index 0000000..10fb44b --- /dev/null +++ b/zlib-1.1.4/contrib/visual-basic.txt @@ -0,0 +1,69 @@ +See below some functions declarations for Visual Basic. + +Frequently Asked Question: + +Q: Each time I use the compress function I get the -5 error (not enough + room in the output buffer). + +A: Make sure that the length of the compressed buffer is passed by + reference ("as any"), not by value ("as long"). Also check that + before the call of compress this length is equal to the total size of + the compressed buffer and not zero. + + +From: "Jon Caruana" <jon-net@usa.net> +Subject: Re: How to port zlib declares to vb? +Date: Mon, 28 Oct 1996 18:33:03 -0600 + +Got the answer! (I haven't had time to check this but it's what I got, and +looks correct): + +He has the following routines working: + compress + uncompress + gzopen + gzwrite + gzread + gzclose + +Declares follow: (Quoted from Carlos Rios <c_rios@sonda.cl>, in Vb4 form) + +#If Win16 Then 'Use Win16 calls. +Declare Function compress Lib "ZLIB.DLL" (ByVal compr As + String, comprLen As Any, ByVal buf As String, ByVal buflen + As Long) As Integer +Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr + As String, uncomprLen As Any, ByVal compr As String, ByVal + lcompr As Long) As Integer +Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As + String, ByVal mode As String) As Long +Declare Function gzread Lib "ZLIB.DLL" (ByVal file As + Long, ByVal uncompr As String, ByVal uncomprLen As Integer) + As Integer +Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As + Long, ByVal uncompr As String, ByVal uncomprLen As Integer) + As Integer +Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As + Long) As Integer +#Else +Declare Function compress Lib "ZLIB32.DLL" + (ByVal compr As String, comprLen As Any, ByVal buf As + String, ByVal buflen As Long) As Integer +Declare Function uncompress Lib "ZLIB32.DLL" + (ByVal uncompr As String, uncomprLen As Any, ByVal compr As + String, ByVal lcompr As Long) As Long +Declare Function gzopen Lib "ZLIB32.DLL" + (ByVal file As String, ByVal mode As String) As Long +Declare Function gzread Lib "ZLIB32.DLL" + (ByVal file As Long, ByVal uncompr As String, ByVal + uncomprLen As Long) As Long +Declare Function gzwrite Lib "ZLIB32.DLL" + (ByVal file As Long, ByVal uncompr As String, ByVal + uncomprLen As Long) As Long +Declare Function gzclose Lib "ZLIB32.DLL" + (ByVal file As Long) As Long +#End If + +-Jon Caruana +jon-net@usa.net +Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member |