About how Delphi calls *. H files written in C

Source: Internet
Author: User
How does delphi call *. h file written in C? Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiAPI/html/delphi_20061130134905146.html
The younger brother has just learned about Delphi and has just encountered a problem. He wants to use Delphi to call the API functions in the library in the development environment (written in C). How can he set *. h. I am introducing it to Delphi. Thank you very much for your help. If you may give me an actual example, thank you again.

Translate the. h file into a PAS file.

It must be translated into a PAS unit. There are many examples, typical of which is windows. PAS of Delphi source code.

Delphi cannot directly use the c h header file in the project.

You can use a tool named c2pas.exe to convert an H file into a PAS file and add it to the project.

Http://c2pas.sourceforge.net/
Https://sourceforge.net/project/showfiles.php? Group_id = 50975
Http://www.programmersheaven.com/download/4171/download.aspx

Use BCB to convert to a PAS File

C2pas.exe can be used to convert the. c file. Can I convert the *. h file?
In addition, after the conversion is completed and added to the project, can the function defined in the conversion be called directly? Thank you!

The. Pas file generated after the c2pas.exe software is used is different from the one we wrote. Please tell me how to do it. Thank you! Hurry up ~~~~~~~~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.