I think you are working outside my knowledge and experience and I may be misunderstanding your problem but here are my thoughts. It sounds like you have registered a shell extension (something I've never tried). In that case, the zipmaster code is being called by Windows (not by your program) whenever a context menu for a file is requested. An exception is being raised by ZipMaster/Windows when it encounters a file that is not a zip file. That exception is probably being reported by the shell extension code rather than by the calling program. If I am right, you will have to modify the shell extension code and reinstall it. If you require code to identify a valid EndOfDirRec in a file (i.e. quickly test if a file may be a valid zip archive) email me directly and I'll throw something simple together. Hope this is of some help, James Turner ----- Original Message ----- From: "Gerard" <gslurink@xxxxxx> To: <delphizip@xxxxxxxxxxxxx> Sent: Thursday, September 19, 2002 2:22 PM Subject: [delphizip] weird EZipMasterError > > I have a very weird error. > > I have a list which contains filenames. For this list I have > created a shell contextmenu which shows the contextmenu > like in Explorer. (create a pidl and query the contextmenu). > At this point I have no zip dll's loaded and made no references > to zipmaster. It has worked well for more than a week. > Now suddenly an error pops up when I activate the > contextmenu: class EZipMaster: 'This archive is not valid > zip archive'. This happens not when I select a zip file but with any > other file. After this the program continues normally. > Note that I am not working here with a zip file at all. > The error occurs when I perform the call ContextMenu3.QueryContextMenu > (Contextmenu = IContextMenu3). > > I am absolute baffled because I have not loaded the zip dll's > at this point, not assigned anything to the zipmaster > component and there are no references > to ZipMstr in the unit where the error seems to occur. > > I also noticed that this error only comes when I run the application within > the Delphi IDE. When I start it from Explorer it does not show up. > > I have the feeling that the IDE is making some mix up with resources > or so, I have no clue. I have put on all compiler checking but I get > no overflow or range errors. > > I don't have a clue how the program can reach this this error message, > since there is no code called from ZipMstr yet. > > Does anyone have any idea what could be the problem ? > > Gerard > >