pka4916
Neophitic Presence
Posts: 5.1711 Threads: 0
Joined: 22nd Dec 2007
Reputation: 0
E-Pigs: 0.5000
|
RE: [PSP] [Source code] Simple Popstation GUI v3.00 beta
in vb6 it works fine, in .net it isn't working
Visual Basic Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
intFF2 = FreeFile()
FileOpen(intFF2, strISO, OpenMode.Binary)
Dim bytBuff(16 * 2352 - 1) As Byte
Dim bytBuffC(lngISOIndex_Length(lngCnt) - 1) As Byte
Dim lngRtn As Integer
Dim ZS As Z_STREAM_S
Dim intUpdCnt As Short
Const UPDATE_FREQ As Short = 32
For lngCnt = 0 To lngNumIndexes - 1
Seek(intFF, lngPSARHead + &H100001 + lngISOIndex_Offset(lngCnt))
intUpdCnt = intUpdCnt + 1
If intUpdCnt >= UPDATE_FREQ Then
System.Windows.Forms.Application.DoEvents()
If bConvertCancel Then
bConvertCancel = False
ExtractISOFromEBOOT = CANCELLED_TEXT
GoTo exitFunction
End If
intUpdCnt = 0
End If
If lngISOIndex_Length(lngCnt) = 16 * 2352 Then
FileGet(intFF, bytBuff) **this one is working for uncompressed ****
Else
ReDim bytBuffC(lngISOIndex_Length(lngCnt) - 1)
FileGet(intFF, bytBuffC)
With ZS
.zalloc = 0
.zfree = 0
.opaque = 0
.avail_in = 0
.next_in = 0
inflateInit2(ZS, -15, "1.1.3", Len(ZS)) **** I think this is the problem ***
.avail_in = lngISOIndex_Length(lngCnt)
.next_in = VarPtr(bytBuffC(0))
.avail_out = 16 * 2352
.next_out = VarPtr(bytBuff(0))
End With
If inflate(VarPtr(ZS), 0) < 0 Then
ExtractISOFromEBOOT = "zlib inflate failed!"
GoTo exitFunction
Else
inflate(VarPtr(ZS), 0)
End If
inflateEnd(VarPtr(ZS))
End If
FilePut(intFF2, bytBuff)
Next
FileClose(intFF)
FileClose(intFF2)
|
(This post was last modified: 23/01/2008 04:14 AM by ZiNgA BuRgA.)
|
|
10/01/2008 09:44 AM |
|