Access Denied -- Can't figure it out

PlausiblyDamp said:
Is the ZipFile part of the VB Resource Kit? If so I can download it and have a look tomorrow.

Yes
the one by ComponentOne

thanks for the quick response
-matt
 
Didnt get time to have a proper look unfortunately, however I noticed that in the routine
Code:
    Public Shared Sub ExtractAll(ByVal lstFiles As ListView, ByVal ExtractPath As String)
        Dim lvi As ListViewItem
        Dim ze As C1.C1Zip.C1ZipEntry
        For Each lvi In lstFiles.Items
            ze = lvi.Tag
            Zip.Entries.Extract(lvi.Index, ExtractPath)
            Declarations.Zip.Entries.Extract(lvi.Index, txtPath.Text)
        Next
    End Sub
you are extracting just to a path and IIRC you need to specify a full path and filename to extract to. Also check you are using the correct listviewitem to generate the file name.

Also you are using an awful lot of legacy VB6 syntax - you may want to consider converting to the newer .Net syntax.
 
Last edited by a moderator:
PlausiblyDamp said:
Didnt get time to have a proper look unfortunately, however I noticed that in the routine
Code:
    Public Shared Sub ExtractAll(ByVal lstFiles As ListView, ByVal ExtractPath As String)
        Dim lvi As ListViewItem
        Dim ze As C1.C1Zip.C1ZipEntry
        For Each lvi In lstFiles.Items
            ze = lvi.Tag
            Zip.Entries.Extract(lvi.Index, ExtractPath)
            Declarations.Zip.Entries.Extract(lvi.Index, txtPath.Text)
        Next
    End Sub
you are extracting just to a path and IIRC you need to specify a full path and filename to extract to. Also check you are using the correct listviewitem to generate the file name.

Also you are using an awful lot of legacy VB6 syntax - you may want to consider converting to the newer .Net syntax.


thank you for your help. this sorted this problem (access denied). i know im using a lot of vb6 syntax (im still a student and i was trained in vb6). im working on changing to .net syntax.

Also i get another error that i think is unrelated to the previous. When i close the extract form, i get an error:

An unhandled exception of type System.Runtime.InteropServices.SEHException occurred in system.windows.forms.dll

Additional information: External component has thrown an exception.

i have no idea what this means.

thanks for all your help
-matt
 
Does this exception get thrown everytime you close the form? If so does a particular line generate the error?
Is there any information to indicate which component raised this exception?
 
PlausiblyDamp said:
Does this exception get thrown everytime you close the form? If so does a particular line generate the error?
Is there any information to indicate which component raised this exception?


there is no single line of code that causes this error. on the form frmExtract, after the End Sub statement of cmdExtract_click, i get this error. when i click break, the pointer highlights the main declaration for frmMain like this:

Code:
Imports C1.C1Zip

Public Class frmMain This is where the error is (a green arrow in the where breakpoints are and green highlight)
    Inherits System.Windows.Forms.Form

   Form design code

    Dim Files() As ZipInfo.Info

this happends on a number of my programs (3 so far) and i cant figure out the problem (the error is a bit vague). also, i figured out what the visual style problem. i had to declare application.enablevisualstyles() before the initialize component in EACH form for it to work.

thanks for all your help
-matt
 
Do any of these applications have anything in common (same 3rd party components etc - are you using the Zip component in any of the others for example)?
 
PlausiblyDamp said:
Do any of these applications have anything in common (same 3rd party components etc - are you using the Zip component in any of the others for example)?


No, these applications are all different (Media catalog, zip, applicaion bar). however, they DO have something in common. all of them throw this exception when i close or get rid of a form that was shown using .showDialog(). on other apps, this doesnt happen (even with showdialog) so im confused as to the cause of this error.

once again thanks for the help (and quick responses)
-matt
 
I have the same problem

Im writing a program at the moment, and it does the exact same thing.

Do you use Application.EnableVisualStyles?
 
Use the Skybound VisualStyles control instead of Microsofts borked attempt at Application.VisualStyles, which causes the SEHException.

www.skybound.ca

The Visualstyles component is free, and incredibly easy to use. Plus, the main developer actually answers tech questions himself in the forums - usually within a few hours at most.

B.
 
i need a way to do it without using any plug-ins or anything like that. i read that theres some way to do it without using EnableVisualStyles and using a manifest instead. only problem is that i havent the faintest idea what a manifest is, or how to make one!

any help?
 
Back
Top