Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

KERNEL32.InterlockedDecrement problem

127 views
Skip to first unread message

Christakis John

unread,
Aug 11, 2004, 9:18:58 PM8/11/04
to
Hi,

This is a hard one and I don't expect anyone can solve it, but any
suggestions are greatly appreciated. I have an external DLL that I am
connecting to like this:

var
myDLL : Variant;
begin
myDLL:=UnAssigned;
myDLL:=CreateOLEObject('DLLName.This part is OK');

then I call a funtion in the DLL:

myDLL.Function('valid function input string');

then I clean up with

myDLL:=UnAssigned;

and the function works - it prints something from an MSAccess database to
the default printer. The paper comes out and it all looks lovely, but...
At the time that the printing happens (that is, if I use a 'print to file'
printer driver then it's all good until I select the dest filename) the
Delphi IDE returns and the CPU Debug window appears.

It has stopped on the KERNEL32.InterlockedDecrement function at the
instruction xadd [ecx],eax. eax is FFFFFFFF and ecx is 08db1ee8. When I
run this app on another computer I get an Application Error. I have tried
stepping through the Delphi code and pressing F8 on the .Function works -
that is, the print job comes out ok. I can then step through all the rest
of the app until the code dissapears again (like when all the end; commands
have finished and the computer goes back into an event checking loop (I
don't know all the jargon ok)) and then the exception appears.

How can I find what is causing this error? Is there a way to find where
this is coming from?

thanks,
cj


Christakis John

unread,
Aug 11, 2004, 9:23:56 PM8/11/04
to
Oh, the actual exception error is

Project c:\...blah faulted with message: 'access violation at 0x7c5737ec:
write of address 0x0d2e1ee8'. Process Stopped etc

0x7c5737ec is the address of the xadd instruction
0x0d2e1ee8 is ecx

Pressing F7 or F8 shows the ntdll.KiUserExceptionDispatcher and F9 repeats
the aforementioned error with the same details. I have pressed F9 dozens of
times and nothing changes that I can see in the CPU window.

ta,
cj


Christakis John

unread,
Aug 11, 2004, 9:24:58 PM8/11/04
to
Oh, and I can call the same function from a .VBS script and get no errors

cj


Christakis John

unread,
Aug 30, 2004, 8:52:02 PM8/30/04
to
I found the problem - the VB DLL was reading an access database and causing
the error.

cj


"Christakis John" <dont...@me.please.ok> wrote in message
news:KFzSc.52801$K53....@news-server.bigpond.net.au...

0 new messages