I'm trying to interface to a third-party DLL to create and
process ZIP files. I can make and extract ZIP files but now
I want to display a progress bar during the processing. The DLL
provides functions to define a callback routine to receive a
message structure. When ever I make a program to process the
callbacks it crashes.
Here are the C header file structures and declares:
Here is what I'm using in PBDLL 6.0:
I've have not been able to get this to work! I must be
overlooking something but I'm not sure what. Can anyone
please help!
Thanks,
Doug Gamble
------------------
process ZIP files. I can make and extract ZIP files but now
I want to display a progress bar during the processing. The DLL
provides functions to define a callback routine to receive a
message structure. When ever I make a program to process the
callbacks it crashes.
Here are the C header file structures and declares:
Code:
#define ETCP_MAX_FILENAME_LENGTH 255 typedef struct tagCOMPINFO { UCHAR ciZipFileName[ETCP_MAX_FILENAME_LENGTH]; /* name of .ZIP file being processed */ UCHAR ciFileName[ETCP_MAX_FILENAME_LENGTH]; /* name of the file being processed (added to .ZIP, deleted from .ZIP, or whatever) */ short ciOperation; /* operation: 0 zip, 1 unzip, 2 delete, 3 test */ long ciTotalSize; /* total number of bytes to process */ long ciCurrentByte; /* current byte being processed */ long ciCompSize; /* compressed size */ short ciMethod; /* compression method */ short ciPass; /* pass number [1..n] */ long ciPassSize; /* total bytes this pass */ short ciMessageType; /* message type (status, error, query) */ short ciMessageCode; /* message number (if error message) */ short ciDiskNumber; /* disk number (for multi-volume query) */ } COMPINFO; void FAR PASCAL Et4CPrintHook (FARPROC CPrintRoutine); short CPRintRoutine(COMPINFO CPrintInfo);
Code:
TYPE COMPINFO ciZipFileName AS STRING * 255 ciFileName AS STRING * 255 ciOperation AS INTEGER ciTotalSize AS LONG ciCurrentByte AS LONG ciCompSize AS LONG ciMethod AS INTEGER ciPass AS INTEGER ciPassSize AS LONG ciMessageType AS INTEGER ciMessageCode AS INTEGER ciDiskNumber AS INTEGER END TYPE DECLARE FUNCTION ZipHook CDECL LIB "COMPPL32.DLL" ALIAS "Et4CPrintHook" (BYVAL lpCPrintInfo AS DWORD) AS INTEGER ' ' ' FUNCTION ZipStatusCallback (CInfo AS COMPINFO) AS INTEGER ' ' ' MSGBOX "Callback" & FORMAT$(CInfo.ciCurrentByte) END FUNCTION
overlooking something but I'm not sure what. Can anyone
please help!
Thanks,
Doug Gamble
------------------
Comment