Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: internal dynalock tag overwrite error fileitemize
RHCode = DllCall(HUnRAR,long:"RARReadHeader",long:hArcData,lpbinary:HeaderData)the first time it works fine, I get the proper data, the second time I call it, I immediately get a window that pops up saying:
INTERNAL DYNALLOC ERROR Tag Overwrite 1With an OK button, WinBatch basically hangs, as pressing OK just brings back the window.
The DLL call you have in the code you supplied is correct. I suspect a pointer in your structure is either bad or the structure size is too small, and data is being written semi-randomly in the WinBatch data space.
Oftentimes I do a:
BinaryWrite(dabuffer,"C:\DEBUG.TXT")And then look at a hex dump of the resulting file (perhaps with Browser...) to ensure the buffer is properly set up.
The reason is, sometimes people pass a string, like lpstr, and they try to modify that string variable. You can't do that, because it doesn't work right with Winbatch. In a string space variable, when you do any operation with WinBatch that has a string, we have a chunk of memory that we store that string in. For example, if you have a 30 byte string, we allocate maybe 38 bytes to allow for tags on either side of the string. If the tag is destroyed by messing with the string, Winbatch thinks that something has come through and corrupted the data space memory (our internal string space buffer).
If you are having problems with the DllCall, you can always e-mail us the DLL specs and your DllCall statement, and we can take a look at how you have it set up.
-A dialog comes up that has the title "INTERNAL DYNALLOC ERROR" and the text "Tag Overwrite 1"
- Then a dialog comes up that has the title "3096:Memory Allocation Error. Out of memory for strings", and the line the error occored on which is a StrCat.
This happens in a loop that has already gone through many times. The number of times doesn't seem to matter because it will get 400+ files on one machine, and only 150 or so on another.
The same variables are redefined over and over in the loop. Do they re-allocate each time? Do I need to drop them each pass through the loop?
In general the only way you could possibly cause them are:
The error is reported when the tags are missing.
I have tried setting debugtrace on to see if I could see where it was failing.
Here are two sections of log just before a dynalloc error and the section of code (sorry, a bit long):
Any suggestions of what may be causing the errors?
I have quite a few if/endif statements.
Those errors generally indicate that the WinBatch string storage area's are getting trashed.
Re-read the section on if-else-Endif statements. You seem to be combining two incompatible forms, and this may be triggering the problem.
Actually, nothing is clear at this point, but it looks like a good suspect.
You can have:
If (expression) then (statement) Else (statement)or you can have:
if (expression) (statements) else (statements) endifHowever:
If (expression) then (statement) else (statements) endifmay not be doing what you think it should be, and it is comprises of two incompatible if type expressions. You have to go for either single line mode or structured mode. Mixing them tends to run, but not with what most people might consider obvious results.
Article ID: W12978
Filename: Internal Dynalloc Tag Overwrite Error.txt
File Created: 2001:07:26:16:49:28
Last Updated: 2001:07:26:16:49:28