Access violation after GetInterface/QueryInterface in Delphi
Posted
by W55tKQbuRu28Q4xv
on Stack Overflow
See other posts from Stack Overflow
or by W55tKQbuRu28Q4xv
Published on 2010-04-23T11:19:09Z
Indexed on
2010/04/23
11:23 UTC
Read the original article
Hit count: 572
Hi everyone!
First, I'm very new in Delphi and COM, but I should build COM application in Delphi. I read a lot of articles and notes on the internets, but COM and COM in Delphi are still not clear to me.
My sources - http://www.everfall.com/paste/id.php?wisdn8hyhzkt (about 80 lines).
I try to make a COM Interface and Impl class - it works if I call an interface method from Delphi (I create an impl object via TestClient.Create), but if I try to create an object from outer world (from Java, via com4j) my application crashed with following exception:
Project Kernel.exe raised exception class $C0000005 with
message 'access violation at 0x00000002: read of address 0x00000002'.
If I set a breakpoint in QueryInterface - it breaks, but when I come out from function - all crashes.
What I'm doing wrong? What I still missing? What I can/should read about COM (in Delphi) to avoid dumb questions like this?
© Stack Overflow or respective owner