1

WinAPI is focused primarily on the C family, but how do new programming languages use those features without creating their own runtime/interpreter type thing? Do they hook directly into the DLL files? kernel32.dll contains most of those functions right?

Thanks.

3

Every language (even C!) has some kind of runtime. This runtime will usually provide bindings to C or have an API usable from C (or in the case of C: from assembler). Such C bindings can then be used to access libraries written for C. There will usually be a translation layer that converts between different data representations in C and in the target language.

  • 1
    Thanks! What is a binding? – Jake Sep 1 '14 at 20:04
  • 3
    @Jake for more information, please see these Wikipedia articles: Foreign Function Interface, Language Binding. – amon Sep 1 '14 at 21:13
  • The "Foreign Function Interface" is exactly what I was looking for, thank you! – Jake Sep 3 '14 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.