converting delphi interface files to c++ header files?

Good day all

If you would all be so kind and bear with me: i'm rather new in this and i've never worked with Delphi.

I have a project in c++ that uses a bunch of dll-s written in delphi. Those dll.s came with a bunch of .INT files, who are aparently pascal(delphi) interface files.

Now. Is there a way to convert them to something remotely looking like c++ header files?

Thank you very much
Best regards
0
Luka
11/22/2012 2:25:47 PM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

5 Replies
1481 Views

Similar Articles

[PageSpeed] 10

> {quote:title=Luka Sostar wrote:}{quote}
> Good day all
> 
> If you would all be so kind and bear with me: i'm rather new in this and i've never worked with Delphi.
> 
> I have a project in c++ that uses a bunch of dll-s written in delphi. Those dll.s came with a bunch of .INT files, who are aparently pascal(delphi) interface files.
> 
> Now. Is there a way to convert them to something remotely looking like c++ header files?

C++ Builder, the partner program of Delphi can use Delphi units, so the command line compiler of Delphi is able to
produce the needed C++ header files. So ask the producer of the DLL's to do the conversion for you.

Regards from Germany

Franz-Leo
0
Franz
11/22/2012 3:21:54 PM
> {quote:title=Franz-Leo Chomse wrote:}{quote}
> > {quote:title=Luka Sostar wrote:}{quote}
> > Good day all
> > 
> > If you would all be so kind and bear with me: i'm rather new in this and i've never worked with Delphi.
> > 
> > I have a project in c++ that uses a bunch of dll-s written in delphi. Those dll.s came with a bunch of .INT files, who are aparently pascal(delphi) interface files.
> > 
> > Now. Is there a way to convert them to something remotely looking like c++ header files?
> 
> C++ Builder, the partner program of Delphi can use Delphi units, so the command line compiler of Delphi is able to
> produce the needed C++ header files. So ask the producer of the DLL's to do the conversion for you.
> 
> Regards from Germany
> 
> Franz-Leo
Thank you, but sadly, that is going to be quite hard.
I've been reading around, with you pushing me in the right direction, so correct me if i'm wrong:
i'm supposed to run delphi compiler with interface file as input (with -JPHNE optinon) ?
Is it possible to do it from IDE? because XE3 version of dbb refuses to work from command line...
thanks in advance
Best regards
Luka
0
Luka
11/22/2012 3:58:43 PM
> I've been reading around, with you pushing me in the right direction,
> so correct me if i'm wrong:  i'm supposed to run delphi compiler with
> interface file as input (with -JPHNE optinon) ?  Is it possible to do

That won't work, the full source is needed, so only the maker of the
DLL can create C++ headers for you.

-- 
Eivind Bakkestuen [NDD]
0
Eivind
11/23/2012 12:05:12 AM
> {quote:title=Eivind Bakkestuen wrote:}{quote}
> > I've been reading around, with you pushing me in the right direction,
> > so correct me if i'm wrong:  i'm supposed to run delphi compiler with
> > interface file as input (with -JPHNE optinon) ?  Is it possible to do
> 
> That won't work, the full source is needed, so only the maker of the
> DLL can create C++ headers for you.
> 
> -- 
> Eivind Bakkestuen [NDD]
thank you very much

I think i'll try to write some kind of interpreter to try to 'translate' them to .hpp files

Once again, thank you.
Best regards
0
Luka
11/23/2012 8:49:36 AM
Luka Sostar wrote:

> > That won't work, the full source is needed, so only the maker of the
> > DLL can create C++ headers for you.
>
> I think i'll try to write some kind of interpreter to try to
> 'translate' them to .hpp files

If .int file has not so many declarations you can try adding "stubs" of
functions (functions with empty bodies) to make the source "complete".
After that you can add this file to CB project, compile, and get
autogenerated .hpp.

-- 
Alex
0
Alex
11/23/2012 11:04:02 AM
Reply:

Similar Artilces:

Delphi 2010: how to convert .idl files to .TLB files?
Delphi 2010 ships many IDL files under the folder Embarcadero\RAD Studio\7.0\include\idl I searched the online help, but found no clue how to convert .IDL into the .TLB format, so that I can import the type library. I tried gentlb.exe, but it didn't work. Matt Hall Hi Matt, > I searched the online help, but found no clue how to convert .IDL into the .TLB format, so that I can import the type library. Since Delphi 2009, the Type Library doesn't work with TLB files anymore, but instead with .ridl files (Reduced IDL files). You can also find some imported typ...

Delphi 2010: how to convert .idl files to .TLB files? #2
Delphi 2010 contains many idl files in the \include\idl folder. How can we import these files into an application? In RAD Studio, each .idl file has an associated .h file in the /include folder. So C++ Builder users can import these type libraries. There must be a way for the Delphi users to do the same. But how??????? Unfortunately the Help files don't provide any clue! Can you help?? {quote:title=lcd877 lcd877 wrote:} Delphi 2010 contains many idl files in the \include\idl folder. How can we import these files into an application? In RAD Studio, each .idl file has an ...

delphi can create .obj or C++ header files too?
the question is the topic. im inside delphi > Dynamic Link Library > http://dl.dropbox.com/u/1802543/shots/delphi.png Goga Goge wrote: > the question is the topic. > > im inside delphi > Dynamic Link Library > > http://dl.dropbox.com/u/1802543/shots/delphi.png Yes, for use with C++Builder. It is not C++Builder or its compiler that generates headers and .obj files, it is the Delphi compiler that does this. If you look at the command line options for DCC32, you'll see, among many other options, something like: -JPHNE = Generate C++ .obj file, ....

Convert C Struct to Delphi (with "file" member)
I'm not sure where to post this question. Someone suggested I post it here. I need to convert the following C struct to Delphi. I think I have the right record, but I can't use the "file" member name. The C struct is: typedef struct { char file[MAX_PATH]; int index; } fileinfo; Thanks for the help. - Jeff Registered User wrote: > I'm not sure where to post this question. Someone suggested I post it here. > > I need to convert the following C struct to Delphi. I think I have the right record, but I can't use the "file" member n...

Convert a Static Library ".a" header file to Delphi
Hi, I have bough the RedPark serial cable to connect my iPad to one of our product. I have very little knowledge of XCode and I am trying to interface the static library with Delphi Mobile and the Fire Monkey. I spent 2 days trying to understand how the conversion works but it seems I am missing something. Is there someone who can help me with an example on how to proceed. I believe I have the header file converted to delphi unit. The 2 files compile without error. I have a class for the delegate and I have the manager (see below). I have instantiate TRscMgr class but it seems th...

Mixed project C++/Delphi compiles all C++ files (XE5)
I just wonder if I am doing something wrong, but it seems like XE5 compiles too many files all the time... If I make a small change in one of the Delphi units in my mixed project and then want to check it out so I hit debug run (F9), then instead of just compiling the Delphi unit and link it all, XE5 always builds the complete project, which takes a good minute or more. The change could be as small as making a line break after a then statement, which does not even need to be recompiled since there is no active code change... Debugging in this environment makes me nervous, I am forge...

convert .doc file to .pdf file in C#
Hello,I need to convert a .doc file to .pdf file in dot net using C# . Any help will be highly appreciated. Thanks Hello, Please check the link below. http://www.codeproject.com/KB/cs/sertf2pdf.aspx Hope it will help you, do let me know if it helps you.S.SRIRAM Thanks for your reply but it is not working.  Hello, What problem you r facing?.. Alternate links are here. .... http://dotnetf1.blogspot.com/2008/07/convert-word-doc-into-pdf-using-c-code.html Please let me know if you still face issues,  S.SRIRAM Hi, Based on my understanding, you should belon...

How to convert excel file to the text file in c#?
Hi all,  I have a application that need save excel file to the database. I need convert excel file to the text file and then use the bulk insert in t-sql. Can someone give me some ideas about how to convert the excel file to the text file.     Thanks in advance!   bjcanada: Can someone give me some ideas about how to convert the excel file to the text file. You can treat an Excel file as a database to extract information.  This sample binds it to a GridView but you could loop with the DataReader to extract the data and write it to a file.   //...

Converting c header to delphi
Hi: In my c header file I have: #pragma pack(1) before a number of c structures. would using a packed record give the same memory layout or should I use {$align 1}? Any help apreciated.Cheers Sean. Sean Farrow wrote: > Hi: > In my c header file I have: > #pragma pack(1) > before a number of c structures. > would using a packed record give the same memory layout or should I > use {$align 1}? Both will do, since a packed record is the same as one aligned on 1. I would prefer the {$ALIGN 1} approach, though. -- Rudy Velthuis (TeamB) http://www.te...

How to convert a word .doc file into .tif file in c#?
Thank you for answer. this.brain=null;MSN+EMAIL: vincent90152900@gmail.com...

How to use a delphi XE3 obj file in delphi 2007?
Hi, I'm migrating an application from delphi 2007 to delphi XE3 and I would like to do it in several steps. To do this I need to use a part of my new code (XE3) in the current delphi 2007 application. So I want to use the .obj file from my XE3 file. I know I have to use the {$L 'Filename'} and I know that I have to declare the functions that I want to use in external in my D2007 project. I wanted to make an easy and simple example to see how it works with only 1 function 'hello world' compiled in obj with XE3 but I can't find the way to use it in D2007. In D200...

COnverting image file into PDF file in C#.NET
hi friends, i have a problem in creating a PDF file from an image file. first of all pls clarify what is the internal concept in converting to PDF file. if nay one knows pls mail me the related code if you find any solution pls mail me at spend5mins@yahoo.com thank u all hari babu...

to file:// or not to file://
(Firefox 1.5.0.6) I'm having trouble with HTML Anchors (links) using the file: protocol. The URL I'm trying to get at looks something like this file://///Host.Domain/Share/Dir1/Dir2/File.Ext If I click on the link, /nothing/ happens but, if I "Copy Link Location" and paste exactly the same thing into the "address bar" in FireFox, FireFox is perfectly happy to show me the file. Why the difference? Am I tripping over some security restriction here? Any suggestions? TIA, Phill W. Phill W. wrote: > (Firefox 1.5.0.6) > I'm ...

How Convert MHT File To HTML File(c# source code)
I Have Big Problem, Please Help Me!! I want Convert a MHT File To HTML File. I Search In Many Of Sites But All Off Them Only Convert HTML TO MHT!!! I Have C# Code(with source code) For Solve This Problem. (I Have Almost Function Similar TO function(mht,html) Meanse MHT filename -->HTML file and contents ) Please Ansewer To My Question Quickly . Very Thank My Mail : MAHDI_FAHMIDEH@YAHOO.COM ...

Web resources about - converting delphi interface files to c++ header files? - embarcadero.delphi.non-tech

PastBook’s Filepicker.io Integration Eases Process Of Converting Facebook Content To Books
PastBook , one of several companies that allow Facebook users to publish their content on the social network in actual books , announced the ...

Facebook No Longer Converting Groups Into Pages
Back when Facebook first launched Facebook Pages, many businesses and brands who had built up substantial audiences in their Facebook Groups ...

Zwartz Laminating-Converting B.V. on the App Store on iTunes
Get Zwartz Laminating-Converting B.V. on the App Store. See screenshots and ratings, and read customer reviews.


"Occupier" Thanked Former Soviet Citizen for "Converting" Him to Capitalism, Pro-Israel, Pro-USA - YouTube ...
May Day Demonstration on Union Square in New York City Zionism & Birth of Modern Israel in 1948: Former Soviet Citizen Pays Tribute to Ben-Gurion ...

Click go fears of converting print files
Is there a way to convert a print queue item to a .RTF or .PDF file? I like to save or email them. - The Sydney Morning Herald

Sudanese woman ordered to hang under sharia law for converting to Christianity gives birth
Khartoum, Sudan: A Christian Sudanese woman sentenced to hang for apostasy has given birth in jail, a Western diplomat said on Tuesday.

Imams warn against radicalism to Aboriginal inmates converting to Islam
The prison system has enlisted the help of ASIO to crack down on radicalisation behind bars amid revelations that Aboriginals are converting ...

Converting the world's companies one by one - The Science Show - ABC Radio National (Australian Broadcasting ...
Image: Trucks carrying logs make their way up a road in Jambi, Indonesia. A vast area of the Sumatran forest, and orangutan habitat, is being ...

Converting Churches Into Homes Is The Latest Hollywood Trend
You don't have to be a believer to be moved by the beauty of a church.

Resources last updated: 11/27/2015 8:52:58 AM