msd 5 Posted April 4 Hi there, The most recent libraries I have for certain APIs are three C libraries; however, Delphi libraries are not offered. To work with apps, all libraries require DDL files; therefore, I need someone with expertise in Delphi to convert those libraries to native Delphi Pascal files. Many thanks in advance to all the specialists... CelikApi.h eVehicleRegistrationAPI.h eVehicleRegistrationCOM.h Share this post Link to post
Brandon Staggs 275 Posted April 4 (edited) In case you can't find someone who wants to do this for you, here is a good starting point on learning to do it yourself: http://www.rvelthuis.de/articles/articles-dlls.html http://www.rvelthuis.de/articles/articles-convert.html Edited April 4 by Brandon Staggs 1 Share this post Link to post
mitch.terpak 5 Posted April 8 On 4/4/2024 at 4:39 PM, msd said: To work with apps, all libraries require DDL files; therefore, I need someone with expertise in Delphi to convert those libraries to native Delphi Pascal files. Yea the articles linked by Brandon are on the spot. What you need is to make a C-style interface to the DLL's. The header files just tell you how you can implement the functions. I'd estimate an experienced programmer can easily do this within a week. For example struct _DATA_REGISTRATION: typedef struct _REGISTRATION_DATA { VARIANT registrationData; VARIANT signatureData; VARIANT issuingAuthority; } REGISTRATION_DATA; becomes type REGISTRATION_DATA = record registrationData: Variant; signatureData: Variant; issuingAuthority: Variant; end; Some of the IRegistration: #ifndef __IRegistration_INTERFACE_DEFINED__ #define __IRegistration_INTERFACE_DEFINED__ /* interface IRegistration */ /* [unique][helpstring][uuid][dual][object] */ EXTERN_C const IID IID_IRegistration; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0BE1D001-A538-476B-8F59-6594741D7720") IRegistration : public IUnknown { public: virtual /* [source][helpstring] */ HRESULT STDMETHODCALLTYPE Initialize( /* [retval][out] */ LONG *result) = 0; virtual /* [source][helpstring] */ HRESULT STDMETHODCALLTYPE Finalize( /* [retval][out] */ LONG *result) = 0; virtual /* [source][helpstring] */ HRESULT STDMETHODCALLTYPE GetReaderName( /* [in] */ LONG index, /* [out] */ BSTR *readerName, /* [retval][out] */ LONG *result) = 0; Becomes: IRegistration = interface(IUnknown) ['{0BE1D001-A538-476B-8F59-6594741D7720}'] function Initialize(out result: LongInt): HRESULT; stdcall; function Finalize(out result: LongInt): HRESULT; stdcall; function GetReaderName(index: LongInt; out readerName: WideString; out result: LongInt): HRESULT; stdcall; end; I just quickly scrabbled these together to give you an impression. Share this post Link to post
Die Holländer 45 Posted April 8 19 minutes ago, mitch.terpak said: I just quickly scrabbled these together to give you an impression. Yes, try Chat-GPT to translate sourcecode. It is quite good in it.. Share this post Link to post
pyscripter 689 Posted April 8 (edited) This may be worth a look: neslib/Chet: C Header Translator for Delphi (github.com). From @Erik@Grijjy Edited April 8 by pyscripter 1 Share this post Link to post
mitch.terpak 5 Posted April 8 (edited) 24 minutes ago, Die Holländer said: Yes, try Chat-GPT to translate sourcecode. It is quite good in it.. Yeah, the header files seem easy enough that it can probably do a quite good job. But if you don't know what you're doing and make type mistakes you get an external error that will be very hard to track down. It will probably be a bit stubborn since it's so much code, so you'll have to step through it Edited April 8 by mitch.terpak Share this post Link to post
Die Holländer 45 Posted April 8 Yes, but the use is not to get a clean 100% translation. It will give you a lot of insight of the differences between Delphi/Pascal and C keywords/declarations etc.. >It will probably be a bit stubborn since it's so much code, so you'll have to step through it Yes, like the programmer that has to translate the code.. Share this post Link to post
mitch.terpak 5 Posted April 8 10 minutes ago, Die Holländer said: Yes, but the use is not to get a clean 100% translation. It will give you a lot of insight of the differences between Delphi/Pascal and C keywords/declarations etc.. >It will probably be a bit stubborn since it's so much code, so you'll have to step through it Yes, like the programmer that has to translate the code.. Large spectrum between unpaid intern translating or well paid software engineer of course Share this post Link to post
David Heffernan 2345 Posted April 8 On 4/4/2024 at 3:39 PM, msd said: therefore, I need someone with expertise in Delphi to convert those libraries to native Delphi Pascal files I'm not quite sure what you are saying here? Are you looking to hire somebody? Share this post Link to post
David Schwartz 426 Posted April 9 Is this code running in C++ Builder? If so, you may just need an interface unit, not a full DLL. I can probably help if you'd like to discuss it. Share this post Link to post
msd 5 Posted April 10 Hello, Google Gemini (please don't even give it a try). ChatGPT 3.5: Correct Translation ChatGPT 4.0: Pro Translation Thanks to all the advice. 1 Share this post Link to post
David Heffernan 2345 Posted April 10 3 hours ago, msd said: Google Gemini (please don't even give it a try). ChatGPT 3.5: Correct Translation ChatGPT 4.0: Pro Translation This is pretty epic, let's be honest. Take all the drudge out, and let us work on the brain stuff. Share this post Link to post