c# dl EIntfCastError with message "Interface not supported"

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
Kullanıcı avatarı
doctorfunks
Üye
Mesajlar: 105
Kayıt: 26 Oca 2005 10:37
Konum: İstanbul

c# dl EIntfCastError with message "Interface not supported"

Mesaj gönderen doctorfunks »

Selamlar
c# ile hazırladığım bir dll ' i delphi 7 ile import ettikten sonra oluşan tlb dosyasındaki functionları create ederken EIntfCastError with message "Interface not supported" hatası alıyorum. aramalarımda sanki bu iş delphi 7'de değilde delphi 8 den itibaren uyumlu olur gibi yazılarda buldum. bu işi visual studio2005-2008 de dll yaparak delphide kullanan arkadaşlar varsa yardımcı olabilirse sevinirim.
teşekkürler iyi çalışmalar


unit :
var
w_x: IServiceOperations;
w_r: string;
begin
try
w_x := CreateComObject(class_ServiceOperations) as IServiceOperations; ==> hata satırı
w_r := w_x.HelloWorld();
edit1.Text := w_r;



tlb.pas:
const
CLASS_ServiceOperations: TGUID = '{7F10F688-C06A-31C0-9FA2-A3497573C647}';

IServiceOperations = interface(IDispatch)type

IServiceOperations = interface;
IServiceOperationsDisp = dispinterface;
_ServiceOperations = interface;
_ServiceOperationsDisp = dispinterface;


['{31B263B3-B161-3EFC-8FFD-CDCBA8DBD764}']
function HelloWorld: WideString; safecall;
end;
IServiceOperationsDisp = dispinterface
['{31B263B3-B161-3EFC-8FFD-CDCBA8DBD764}']
function HelloWorld: WideString; dispid 1610743808;
end;
Cevapla