Dökümantasyonu Olmayan OCX ve Dll dosyalar

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
Kullanıcı avatarı
VooDoo
Üye
Mesajlar: 126
Kayıt: 22 Haz 2005 10:25
Konum: Bursa & ANKARA
İletişim:

Dökümantasyonu Olmayan OCX ve Dll dosyalar

Mesaj gönderen VooDoo »

merhabalar,
ilginc bir sorum olcak,
elimde bir cihaz var, hani parmak izi taniyan cihazlardan, bu cihazin programlamasina yonelik hicbir dökümanı elimde yok, sadece cihazi yoneten yazılımın kullandığı ocx ler ve dll ler var.

Bu dosyalardan unitleri elde edebiliyorum, ama iclerinden pek birsey anladigim soylenemez, deneme yanilma yolu ile de olcak is degil.
cihazin ureticisinin web sitesinde de ne sdk ne de programlama yonelik birseyler mevcut. cihazin programi vb ile yapilmis.

sizce bu cihaz ile haberlesmek icin bu dosyalar yeter mi, yani bir sekilde cok kassam ki biraz zor olacak ise yarar mi sizce?

yada nasil bir yol izlemeliyim, tavsiyede bulunacaklara cok tesekkur ederim
herkeze kolay gelsin
Kullanıcı avatarı
lazio
Moderator
Mesajlar: 1527
Kayıt: 11 Tem 2003 04:55
Konum: İstanbul

Mesaj gönderen lazio »

*.ocx i delphi de ActiveX komponent olarak yüklemeyi denedinmi?. belki bu şekilde önünü biraz daha fazla görebilirsin.
DeveloperToolKit

..::|YeşilMavi|::..
doganzorlu
Kıdemli Üye
Mesajlar: 395
Kayıt: 22 Tem 2004 09:15
Konum: İzmir
İletişim:

Mesaj gönderen doganzorlu »

Selam,

Eğer ActiveX ise member metod ve property lerini görebilirsin. Bunun için hazır bir tool var mı dersen evet, Borland Reflection işini görecektir.
Doğan Zorlu, İzmir

------------------------
"Bu Kitap'ı sana yalnız şunun için indirdik: Hakkında ayrılığa düştükleri şeyi onlara iyice açıklayasın ve Kitap, iman eden bir topluluk için kılavuz ve rahmet olsun." (NAHL 64)
Kullanıcı avatarı
VooDoo
Üye
Mesajlar: 126
Kayıt: 22 Haz 2005 10:25
Konum: Bursa & ANKARA
İletişim:

Mesaj gönderen VooDoo »

ocx i evet yuklemeyi denedim, yukledim de fakat her yerde analtildigi gibi birsey olmadi, yani activeX sekmesinde yer almadi yukledigim ve derledigim unit, zaten unit olarak elde edebiliyorum ama olusan kodtan dokumantasyon filan olmadigi icin birsey anlamak cok zor.


Borland Reflection sanirim dll lerdeki sinif hiyerarsisini gostermek icin kullaniliyor, yada sizin ne icin kullanabilirsiniz dediniz?

tesekkur ederim
Kullanıcı avatarı
VooDoo
Üye
Mesajlar: 126
Kayıt: 22 Haz 2005 10:25
Konum: Bursa & ANKARA
İletişim:

Mesaj gönderen VooDoo »

Borland Reflection delphi 2005 te var olan birsey sanirim? yaniliyormuyum? 7 de goremedim de?
doganzorlu
Kıdemli Üye
Mesajlar: 395
Kayıt: 22 Tem 2004 09:15
Konum: İzmir
İletişim:

Mesaj gönderen doganzorlu »

Selam,

Reflection (haklısınız 2005 le geliyor) benzeri ürünleri freeware olarak bulabilirsiniz shareware sitelerine bir bakın isterseniz. Böyle bir durumda zaten ActiveX den bir dökümantasyon çıkarmak mümkün olmadığından, property ve method lara bakarak kendiniz çıkaracaksınız nasıl kullanıldığını. Deneme-yanılma dan başkaca bir yöntemi yok bunun.

Kolay gelsin,
Doğan Zorlu, İzmir

------------------------
"Bu Kitap'ı sana yalnız şunun için indirdik: Hakkında ayrılığa düştükleri şeyi onlara iyice açıklayasın ve Kitap, iman eden bir topluluk için kılavuz ve rahmet olsun." (NAHL 64)
Kullanıcı avatarı
kelaynak2
Üye
Mesajlar: 135
Kayıt: 30 Haz 2003 02:18

Belki bu döküman işinizi görür.

Mesaj gönderen kelaynak2 »

???ı yazdı:Using a C++ DLL in Delphi (ActiveX control)
Question:

I have this DLL TblAnalysis.DLL that is written in C++, how can I use it in Delphi? I have a list of exported functions as a .h header file, but when I try to define them in Delphi as 'external', I get runtime errors. The documentation speaks about an object that publishes those functions as methods.

Answer:

Very likely this TblAnalysis.DLL could be an Active-X control - which technically is a DLL with a well-defined interface. To verify this, you can either

Try to register it from the commandline with
regsvr32 TblAnalysis.DLL

If this works, then you are looking at an ActiveX control.

or - better:

Get a list of all functions with ordinals exported from the DLL. From the commandline, use Borland's TDump tool to get such a list.

tdump -ee tblanalysis.dll

The output:

c:\temp> tdump -ee tblanalysis.dll
Turbo Dump Version 5.0.16.12 Copyright (c) 1988, 2000 Inprise Corporation
Display of File TBLANALYIS.DLL

Export ord:0001 = 'DLLConUnloadNow'
Export ord:0002 = 'DLLGetClassObject'
Export ord:0003 = 'DLLRegisterServer'
Export ord:0004 = 'DLLUnregisterServer'

Again, if the output looks like this, then the you are looking at an ActiveX control.

So now you hopefully verified that you're looking at an ActiveX control, not at a regular DLL. How do you deal with it then?

Instead of importing and calling functions, you will have to create an instance of that ActiveX control and then you can call its methods.

1-Make sure to register it on your machine. This also has to be done on any computer where the application will run - so make this part of your install program:
regsvr32.exe TBLANALYSIS.DLL
A messagebox should appear saying that the registration succeeded. Unregistering an ActiveX control goes with the /U option:

regsvr32.exe /u TBLANALYSIS.DLL

2-Convert the type library that should be included in the DLL to a Delphi stub. In Delphi, close your project, start a new project and select Import Type Library from the project menu. A dialog will show up containing a list of all registered ActiveX libraries on your system.
Locate the one that belongs the the DLL (the name should be in your
documents) and select it. You can then click install (make sure
generate component wrapper is checked) and a new component will be
installed on your component palette. You use this component in your application and use its methods as described in the DLL's documentation.

http://www.delphifaq.com dan alınmıştır.
Cevapla