|
Post by Randy on May 14, 2006 12:59:17 GMT -5
I am using Delphi V6 and VCLZip 306
My exe is heavily built on unziping to a tMemoryStream.
I am converting part of my application to a DLL.
I am getting address errors when trying to execute the UnZipToStream method.
It looks like it has something with the actual creation of the MemoryStream instance.
Does anyone know if there are issues with using memory streams in DLLs?
|
|
|
Post by Kevin on May 17, 2006 21:40:24 GMT -5
Are the errors occuring in your code where a TMemoryStream is created or within VCLZip?
Kevin
|
|
|
Post by Randy on May 18, 2006 21:41:12 GMT -5
Global variable RvMemoryStream : TFixedMemoryStream;
var uzrc : integer; BaseMemoryStreamSize, RVMemoryStreamSize : integer; begin BaseMemoryStream := TMemoryStream.Create; BaseMemoryStreamSize := BaseMemoryStream.Size; RvMemoryStream := TFixedMemoryStream.Create(BaseMemoryStream.Memory, BaseMemoryStreamSize); RVMemoryStreamSize := RVMemoryStream.Size; VCLZip1.ZipName := rvUnZipFile;
uzrc := VCLZip1.UnZipToStream(BaseMemoryStream, RvFileName);
Above is the code. There exception is being thrown on the uzrc := VCLZip1.UnZipToStream(BaseMemoryStream, RvFileName);
But what I notice is if I pause the execution before this statement and put my mouse over either of the memorystream variables, that Delphi does not return an address where in the executable version, I get an address returned.
|
|
|
Post by Kevin on May 19, 2006 6:43:40 GMT -5
Does this code work when it's not in a DLL?
Kevin
|
|
|
Post by Randy on May 20, 2006 12:50:30 GMT -5
Yes. It works in the exe from which I am trying to convert a portion to the DLL.
The code is in a form procedure that I am accessing and not directly in the DLL main source.
I am going to build a clean test Exe/DLL a mimic what I am doing to see if I can duplicate the problem. If I can, I will email you the code.
Randy
|
|
|
Post by Randy on May 21, 2006 13:28:12 GMT -5
I have created a test exe and dll that I am emailing to you.
It looks like the problem is in VCLZip.
I throw an exception even when I try to set the ZipName to 'C:\?'.
Please look into this and get back to me as soon as possible.
I have a partner in Australia waiting on me to deliver the DLL..
|
|
|
Post by Kevin on May 30, 2006 16:54:06 GMT -5
Just to report the results, the problem was not in VCLZip. The DataModule that contained the VCLZip object was not being created prior to calling VCLZip methods.
Kevin
|
|