Re: [OT] How to use file.dll directly?

Discussion in 'C Programming' started by Bartc, Aug 11, 2013.

  1. Bartc

    Bartc Guest

    "Bertram" <> wrote in message
    news:520767a6$0$1332$...

    > It possible use file.dll of Windows with Mingw, directly, without
    > file.h and .lib?


    What do you mean by 'file.dll'; any .dll file, or Windows system .dlls?

    If it's Windows dlls, just use #include <windows.h>

    For anything else, you will usually need some documentation as to the
    functions in the file, what parameters they take and their return types.
    That would be made known to a C program via an associated header file. If
    there is no header, you will have to create it (from the docs, by hacking
    the dll file, or by any other means).

    I don't think a .lib is needed even when you're intending to use a .dll
    directly, rather than a statically linked copy of the functions (might
    depend on compiler though..) If you *have* a .lib as well as a .dll, and
    what to choose to use .dll, then I don't know; you'll probably have to
    struggle with the linker docs (or ask in a better forum...)

    Will you know the names of the dlls and functions you need at compile-time?
    If you then, under Windows you will
    need functions such as LoadLibrary and GetProcAddr (google for "msdn
    loadlibrary" etc.)

    Anyway I don't think this is anything to do with whether you're using mingw
    or not. Perhaps you can be more specific about what you're trying to do

    BTW no-one is going to get shot for replying to posts here. If they are,
    then it'll be purely coincidental.

    --
    Bartc
    Bartc, Aug 11, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. H. Simpson
    Replies:
    4
    Views:
    244
    H. Simpson
    Aug 3, 2004
  2. Kenny McCormack

    Re: [OT] How to use file.dll directly?

    Kenny McCormack, Aug 11, 2013, in forum: C Programming
    Replies:
    1
    Views:
    175
    Kenny McCormack
    Aug 11, 2013
  3. Tobias Müller

    Re: [OT] How to use file.dll directly?

    Tobias Müller, Aug 11, 2013, in forum: C++
    Replies:
    0
    Views:
    171
    Tobias Müller
    Aug 11, 2013
  4. Keith Thompson

    Re: [OT] How to use file.dll directly?

    Keith Thompson, Aug 11, 2013, in forum: C Programming
    Replies:
    3
    Views:
    181
    Keith Thompson
    Aug 12, 2013
  5. Jorgen Grahn

    Re: [OT] How to use file.dll directly?

    Jorgen Grahn, Aug 12, 2013, in forum: C Programming
    Replies:
    2
    Views:
    189
    Kenny McCormack
    Aug 12, 2013
Loading...

Share This Page