Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unzip to Mem using Dynazip ActiveX Control
Message
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01321133
Message ID:
01321144
Views:
14
It seems that you mistyped the name of control. 'Ole_uznip' should be 'Ole_unzip'.


>I'm having trouble unzipping files from a zip file into memory. I first get a count of the available files I wish to extract from the zip then I loop through the number of reports, unzipping them to memory and then checking the content of the file. The first file in the loop works fine but when I attempt to do the same procedure on the next report I get the following error message "OLE exception error: Exception code c00000005. OLE object may be corrupt". I put some sample code below to show you what I'm trying to do. Any help is greatly appreciated.
>
>Sample Code:
>m.zip_list = ";"
>
>ThisForm.Ole_unzip.zipfile  = bck_path + m.bck_file
>ThisForm.Ole_unzip.filespec = file2get
>
>ThisForm.Ole_uznip.noDirectoryItemsFlag = .T.
>ThisForm.Ole_uznip.nodirectoryNamesFlag = .T.
>ThisForm.Ole_uznip.recurseFlag = .T.
>ThisForm.Ole_uznip.actiondz = 3  && UNZIP_COUNTNAMEDZIPMEMBERS
>
>zip_cnt = ThisForm.Ole_uznip.ReturnCount
>FOR zz=1 TO zip_cnt
>	ThisForm.Ole_uznip.actiondz = 4  && UNZIP_GETNEXTNAMEDZIPINFO
>
>	m.zip_file = (ThisForm.Ole_uznip.zi_FileName
>	
>	m.zip_list = m.zip_list + m.zip_file + ";"
>ENDFOR
>&& ===== GET FILE COUNT FROM ZIP ===== &&
>
>
>&& ===== SEARCH FILES FOR SEARCH CRITERIA ===== &&
>unzip_cnt = OCCURS(";", m.zip_list)-1
>FOR zz=1 TO unzip_cnt
>	m.zip_file = STREXTRACT(m.zip_list, ";", ";", zz)
>
>	ThisForm.Ole_uznip.Refresh
>	ThisForm.Ole_uznip.zipfile  = bck_path + m.bck_file
>	ThisForm.Ole_uznip.filespec = m.zip_file
>	ThisForm.Ole_uznip.UnZIPString = ""
>	
>	ThisForm.Ole_uznip.UnZIPStringSize   = 100000000
>	ThisForm.Ole_uznip.UnZIPStringOffset = 0
>	
>	_VFP.AUTOYIELD = .F.
>	ThisForm.Ole_uznip.QuietFlag = .T.
>	ThisForm.Ole_uznip.AllQuiet = .T.
>	ThisForm.Ole_uznip.OverwriteFlag = .T.
>	ThisForm.Ole_uznip.noDirectoryItemsFlag = .T.
>	ThisForm.Ole_uznip.nodirectoryNamesFlag = .T.
>	ThisForm.Ole_uznip.recurseFlag = .T.
>	ThisForm.Ole_uznip.actiondz = 9  && UNZIP_FILETOMEM
>	_VFP.AUTOYIELD = .T.
>
>	m.chk_file = ThisForm.Ole_uznip.UnZIPString
>	
>	IF ATCC(m.srch_item, m.chk_file) > 0
>		COPY FILE(m.work_dir + m.zip_file) TO ALLTRIM(m.rvw_dir + m.review_name)
>				
>		INSERT INTO C_RESULTS FROM MEMVAR
>	ENDIF
>ENDFOR
>&& ===== SEARCH FILES FOR SEARCH CRITERIA ===== &&
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform