S
S
Stanislav Martynov2017-07-16 02:29:48
linux
Stanislav Martynov, 2017-07-16 02:29:48

How to access Linux API in C#?

If I am writing an application on dotnet core, how can I access the Linux API? In Windows, for example, there are libs like user.dll and interop, but in Linux (Ubunt 14.04), then what? I understand that it is written on the same pluses, but I can’t google how to apply.
For example, I need a FindWindow type method that is in WINAPI, but Linux has a different API

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Martynov, 2017-07-16
@Win332

https://filippo.io/linux-syscall-table/

A
ATauenis, 2017-07-20
@ATauenis

Linux has a lot of different APIs. There are libc, gtk, libncurses, libcrypt, etc. Everything is installed from the packages, so make sure that everything you need (even if it is primitive) is written in the dependencies for your program package. Here is a good article about them: https://losst.ru/biblioteki-linux . Called in the same way as Windows DLLs:
[DllImport("libc")]
static extern int read(int handle, byte[] buf, int n);
The API of Linux libraries is well documented, it is enough to know the names of so-files. You can peek at them in the package manager by filtering the names by lib* .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question