Thread: Calling raw windows API using borland

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    2

    Calling raw windows API using borland

    Im a bit of a noobie... I know what API I want to call. But I don't know how to call it. I want to call CreatePen, LineTo, and TextoutA, which are all located in GDI32.dll. I use a borland compiler, and I have converted the GDI32 dll into a lib and put it in my lib directory.
    Here's the thing.
    I don't know how to call the API. I don't know if I should call it the same way you would in visual C++ or a totally different way..
    Do I need to directly import the DLL instead of using the library? (if so how?)
    Is the library I have created in borland a static library, or a dynamic library that will link to GDI when I am done?
    Do I need a specific header file to do all this?
    How do I know what the functions should be initialised as?

    Sorry to bombard you with questions, but I would like some answers so as to understand how I can use raw API instead of using a limiting header command.

    I've looked at header files but they only give a minor clue. Looking at the .lib files shows (among alot of unreadable chars) what API's are in it, but not how to declare it..

  2. #2
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    I am fairly certain that borland provides both the headers and the libraries for the windows api functions.

  3. #3
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    why not just #include <windows.h>?

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    2
    windows.h doesn't appear to have GDI headers?

    maybe i didnt look hard enough, but I am certain that I had to make gdi.lib because it wasn't in the .lib folder... however it might be referenced to in windows.h

    ill take another look.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. windows api functions, not working. requirements?
    By Mr.Bit in forum Windows Programming
    Replies: 5
    Last Post: 10-10-2007, 08:20 AM
  2. Borland C++ Editor, Where to start a Windows Application?
    By Mythic Fr0st in forum Windows Programming
    Replies: 2
    Last Post: 03-26-2007, 08:40 PM
  3. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  4. Windows API: Edit Box Help
    By Frantic- in forum Windows Programming
    Replies: 2
    Last Post: 08-30-2005, 07:00 PM
  5. MFC or Windows API
    By aresashura in forum Windows Programming
    Replies: 7
    Last Post: 12-01-2001, 10:21 PM