ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you are trying to convert something that gives you a specific type of HANDLE you are going to have to be a LOT more specific, because for obvious reasons, the Win32 API calls do not work under Linux.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
A void* works equally fine under linux or any other O/S, even when called HANDLE.
The problem is not with this type name, but with the rest of the code you want to port.
Instead of trying that, one way to explore could be using Wine to make your program directly run under linux.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
no, a file descriptor directly map to a kernel per process table allowing read an write operations to files and sockets, while a handle is working at libray level to access things like windows, fonts, nothing about kernel nor I/O ...
Originally posted by jlliagre no, a file descriptor directly map to a kernel per process table allowing read an write operations to files and sockets, while a handle is working at libray level to access things like windows, fonts, nothing about kernel nor I/O ...
That's not completely accurate. There is an HANDLE in Win32 that is returned and used by functions like CreateFile, WriteFile, ReadFile, etc.
Anyway, unless the original poster tells us EXACTLY what functions he's trying to get to work in Linux there is no way anyone can tell him what the equivalent would be in Linux. My suggestion to him would be to learn one of the GUI APIs for linux like GDK+, then try to learn at least enough about the Win32 API that he can understand how he needs to port it. (Or whatever his app is currently using, be it MFC, OWL, etc..) It's either that or trying to get it working with wine, as someone else already mentioned.
Just knowing that a HANDLE is really a void* likely isn't going to be enough...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.