%MAX_PATH = 260 is located in the "win32api.inc" file.
Cheers,
Cecil

------------------
ARRAY SCAN CAB_FILES(1), = "", to lCount
Dim CAB_FILES(1 To 100) As Asciiz * 256 ' ' 'DLL CODE: '------------------------------------------------------------------------------------------------------------------------ Function CCSCabInsert(CabFileSpec As String,CAB_FILES() As Asciiz * 256 )Export As Long Local lCount As Long Local lLoop As Long 'lCount is now the array index lCount = ArrayFileCount(CAB_FILES()) Dim fciErr As ERF If IsFalse FCI_LoadLib Then MsgBox "Could not open dll FCI.DLL!", %MB_ICONSTOP, g_szCCS Exit Function End If hCabFile = FCI_Create(CabFileSpec, 0) If IsFalse hCabFile Then MsgBox "Failed to create cab file" + CabFileSpec, %MB_ICONSTOP, g_szCCS Exit Function End If For lLoop = 1 To LCount If IsFalse FCI_AddFile( hCabFile, CAB_FILES(lLoop), "", %tcompTYPE_MSZIP, 0, 0 ) Then MsgBox "Unable to insert file " & CAB_FILES(lLoop), %MB_ICONSTOP,g_szCCS Exit Function End If Next If IsFalse FCI_Close( hCabFile ) Then Function = %FALSE Else Function = %TRUE End If FCI_FreeLib End Function ' '------------------------------------------------------------------------------------------------------------------------ Function ArrayFileCount(CAB_FILES() As Asciiz * 256)Export As Long Local lLoop As Long Local lCount As Long For lLoop = 1 To 1000 If Len(CAB_FILES(lLoop)) Then Incr lCount Else Exit For Next Function = lCount End Function ' '
Declare Function CCSCabInsert Lib "CCSCAB.DLL"(CabFileSpec As String,CAB_FILES() As Asciiz * 256) As Long Declare Function CCSCabExtract Lib "CCSCAB.DLL"(CabFileSpec As String, CAB_FILES() As Asciiz * 256,DestDirectory As String,DeleteFlag As Long) As Long 'Inside of DLL, other functions have access to this, could this be the problem? Global CAB_FILES() As Asciiz * %MAX_PATH + 1 ' CabFileSpec = "C:\CABTEST\CCS.CAB" CAB_FILES(1) = "C:\CABTEST\WINLOG.EXE" CAB_FILES(2) = "C:\CABTEST\CCS.DLL" CAB_FILES(3) = "C:\CABTEST\CCSDATE.DLL" CAB_FILES(4) = "C:\CABTEST\CCSENCR.DLL" CCSCabInsert CabFileSpec, CAB_FILES() The function at the beginning ONLY gets the CAB_FILES(1).
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: