Solved

Method "~" of object "~" failed

Posted on 2002-04-23
12
178 Views
Last Modified: 2013-11-26
I have a DLL which is using "vbzip10.dll" for zipping of the files. In some of the cases if I use wildcharacters more than once it either gives a memory reference error or "Method "~" of object "~" failed".

If the file is corrupt then also it gives the same error.
I need to sort this problem urgently.

Thanx in advance.

Regards

Sudhir
0
Comment
Question by:SudhirChawla
12 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
It is difficult to say what is the cause, without seeing any code, but one thing you can do is add error handling and handle the error there.

Anthony
0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
We recently got that and it turned out to be a system that needed MDAC installed.  I don't know if it shows up for other things, too.
0
 

Author Comment

by:SudhirChawla
Comment Utility
Hi,

I have also installed a proper version of MDAC but still it is giving the problem..

I will paste the code soon..
Thanx
0
 

Author Comment

by:SudhirChawla
Comment Utility
I am using CZIP DLL Name vbZIP10.dll

This is the code

                On Error GoTo errZipHandle
               
                Do While Not fobj_rsbranch.EOF
                    With mobj_cz
                       .ZipFile = pstr_destinationfolder1 & "\" & pstr_destfilename1
                       .StoreFolderNames = False
                       .RecurseSubDirs = False
                       .ClearFileSpecs
                       For lint_ctr = 0 To UBound(str_filenamearr())
                                .AddFileSpec pstr_SourceFolder & "\" & str_filenamearr(lint_ctr)
                       Next
                       .Zip
                    End With
                    fobj_rsbranch.MoveNext
                Loop



Please help.....

Thanx
0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
And at what line is the error occurring?

I'm guessing that there is a missing dependency file which is causing that error to occur (I think that's why we got it for MDAC.)

Run a dependency walker on the czip.dll and hopefully it will tell you what it needs to operate.

0
 

Author Comment

by:SudhirChawla
Comment Utility
it gives an error on ".ZIP".
I have installed MDAC on all the machines.
But still this problem is not resolved.


0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
So the problem is occurring on

mobj_cz.ZipFile =...

What's the definition for mobj_cz.  Something like this?:

Private mobj_cz as ZipObject

I think you should check the vbZIP10.dll documentation and see if it has any information about installation issues.
0
 

Author Comment

by:SudhirChawla
Comment Utility
There is no documentation with me currently.

The def. is
public withevents mobj_cz as zipObject

It is not giving problem in most of the cases where I am using it.

If the def. would have been wrong then it would have started to give problem earlier also.

0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
Unfortunately, since I'm not familiar with that dll, I don't know what it supports, and there could be some intermittent problems with it.

Since there are other zip/unzip components, I'd suggest looking into some of them and try replacing the dll.  It may be a bit of work, but should be worth it in the end since you don't have any documents explaining how to deal with problems.
0
 

Author Comment

by:SudhirChawla
Comment Utility
Thanx for helping me
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi SudhirChawla,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

SudhirChawla, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now