Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2002-08

problems with COM interfaces

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rimgaudas Laucius

Hi,

i tryed to write interface example with fpc 1.1 (02.08.10 and early snapshots) and experienced some problems.

1. I can't export ix interface to delphi program (project2.dpr line 66). (i compiled library with command line: ppc386.exe project2.dpr -Fu..\..\units\win32\rtl -Sd -WR -Xs)

2. There is problem with class fields.
I run project3 and get results:
add: 0
add: 0
release: 0
ok
release: 0

when they must be:
add: 1
add: 2
release: 1
ok
release: 0

3. GetInterface function crashes program.

I used some tricks to make program work. Maybe they can explain something more, file: working_one\project2.dpr.

Reply by email

Florian Klaempfl
to Rimgaudas Laucius
you wrote
Hi, i tryed to write interface example with fpc 1.1 (02.08.10 and early snapshots) and experienced some problems.

A first remark: inherit from tinterfacedobject instead of tobject which implements
_addref, _decref and queryinterface (even MT safe, if the rtl is compiled with mt support).

I'll look into deeper asap.

BTW: Nice to hear, that somebody plays with 1.1 :)

Reply by email