I triede with fpc 2.4.4 but nothing changes. Would you mind having a look a the full dll with your more recent fpc? By the way, how do I install fpc 2.5.x ?? I might send it to you privately; the only trouble is that you don't have a real hardware to connect it, even if the transducers class are created during the main device creation and their count and status are (should) always be available even if not connected.
A test case would simply: 1) createoleobject //OK 2) object.transducers.count // OK, always 8 3) object.transducers(1).Status // ???? should be an integer, not a crash !!! R# 2011/5/31 Roberto Padovani <padovan...@gmail.com>: > Thanks, I'll try installing a more recent fpc and lazarus... > > > > 2011/5/30 Ludo Brands <ludo.bra...@free.fr>: >> I created a small automation object with following IDL (part of it): >> >> interface ItestAX: IDispatch >> { >> [ >> propget, >> id(0x00000001) >> ] >> HRESULT _stdcall Devices([out, retval] IDevices ** Value ); >> }; >> >> interface IIDevices: IDispatch >> { >> [ >> propget, >> id(0x00000000) >> ] >> HRESULT _stdcall Device([in] long Idx, [out, retval] IDevice ** Value ); >> [ >> propget, >> id(0x00000002) >> ] >> HRESULT _stdcall Count([out, retval] long * Value ); >> }; >> >> interface IIDevice: IDispatch >> { >> [ >> propget, >> id(0x00000001) >> ] >> HRESULT _stdcall Name([out, retval] BSTR * Value ); >> }; >> >> This matches pretty much the interface you described earlier. Note the >> id(0x00000000) which makes Device the default member of IIDevices. This is >> the same as id(DISPID_VALUE) in your case. >> >> Now, the following lines do work for me to get the Name member of IIDevice >> (ActX,a,b:variant;s:string): >> >> ActX:=CreateOleObject(MyTestControl); >> a:=ActX.Devices; >> b:=a.Device[3]; >> s:=b.Name; >> b:=ActX.Devices.Device[3]; >> s:=b.Name; >> b:=ActX.Devices[3]; >> s:=b.Name; >> >> Note that the default member does work correctly: >> Devices.Device[3]===Devices[3]. >> >> I'm using fpc 2.5.1 svn 17599. >> >> Ludo >> >> _______________________________________________ >> fpc-pascal maillist - fpc-pascal@lists.freepascal.org >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> > _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal