Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XZIP--Does it work?

Status
Not open for further replies.

jadams0173

Technical User
Joined
Feb 18, 2005
Messages
1,210
Can I use Xzip.dll from within VB6? I've tried this and get no errors but no results either.
I've registered the DLL.

Code:
Dim objZip As ZIP


Set objZip = CreateObject("Xstandard.ZIP")

objZip.Pack "c:\test.mdb", "c:\stenciltest.zip"

Set objZip = Nothing

End Sub
 
I use it in one of my VB6 apps, no problems.

Bob
 
Should the code I provided above work? Could you provide a sample snippet?
 
I looked at the code, and mine says
Code:
Dim z as XZip.Zip
Set z = New XZip.Zip
So, it would seem that the name of the component is XZip, rather than XStandard. Try replacing
Code:
Set objZip = CreateObject("Xstandard.ZIP")
with
Code:
Set objZip = CreateObject("XZip.ZIP")
If you're not sure on this, try looking in HKEY_CLASSES_ROOT in the registry (run regedit) for each component name.

HTH

Bob
 
Thanks for looking that up Bob! I still can't get it to work and I can't run RegEdit due to system administrator being a.....well, you get the picture. Here's what I have now.

Code:
Sub ZIP()
Dim objZip As XZip.ZIP


Set objZip = New XZip.ZIP

objZip.Pack "C:\DBBackup\stencil_master_be_test.mdb", "C:\DBBackup\stenciltest.zip"
objZip.Pack "C:\dbbackup\stencil_master_be_test.mdb", "C:\Stenciltest.zip"

Set objZip = Nothing

End Sub

I get no errors but no zip file either. I tried this too.
Code:
Set objZip=CreateObject("XZip.ZIP")
and I get an error stating that the ActiveX Component Can't Creat Object. Run time error 429.

I've also emailed XStandards tech support.

Can you suggest anything else? I'm using Win2000 Pro, VB6 and A2K.
 
Bob,

Sorry to put you through some un-necassary research. Had I checked the simple things first and not assumed that something else was wrong I would have found that:

Code:
objZip.Pack "C:\dbbackup\stencil_master_be_test.mdb", "C:\Stenciltest.zip"

should have read....(I hate making stupid mistakes!)

Code:
objZip.Pack "C:\dbbackup\stencil[b][red]s[/red][/b]_master_be_test.mdb", "C:\Stenciltest.zip"

Geeze...wasn't that easy! :~/
 
Well, there ya go. We still had to fix the XStandard thing, so the research wasn't unnecessary.

Anyway, it's a good straightforward program for creating zip files.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top