[DiscordArchive] <@283455627538333696> what for? I can use Cython with native types?
[DiscordArchive] <@283455627538333696> what for? I can use Cython with native types?
Archived author: Skarn • Posted: 2018-10-13T12:04:36.658000+00:00
Original source
<@283455627538333696> what for? I can use Cython with native types?
Archived author: Quantam • Posted: 2018-10-13T12:05:22.144000+00:00
Original source
To reiterate what others said: WINAPI indicates that it uses the default Windows API calling convention so that the DLL will export the function in a standard format. See CascPort.h for what it's defined as (if anything) for other platforms. And a HANDLE is just an opaque identifier for some object, and the actual meaning is completely implementation specific.
Archived author: Quantam • Posted: 2018-10-13T12:07:43.840000+00:00
Original source
A true HANDLE with Windows kernel functions is an index into the handle ("file descriptor") table. Other libraries may have them be pointers to internal data structures or whatever. More recently Windows has devised the concept of encoding pointers in a boot-time-specific way to prevent stack overflow attacks that access pointer HANDLES.
Archived author: Quantam • Posted: 2018-10-13T12:08:15.636000+00:00
Original source
Okay yeah, Cython works too
Archived author: Quantam • Posted: 2018-10-13T12:08:20.091000+00:00
Original source
See CascPort.h
Archived author: Quantam • Posted: 2018-10-13T12:08:54.145000+00:00
Original source
Either treat HANDLE as an intptr_t or a void *
Archived author: Quantam • Posted: 2018-10-13T12:09:20.650000+00:00
Original source
Oh right. HANDLES by definition are pointer-sized on Windows
Archived author: Skarn • Posted: 2018-10-13T12:09:50.495000+00:00
Original source
okay
Archived author: Quantam • Posted: 2018-10-13T12:10:22.608000+00:00
Original source
I'm thinking on x64 WINAPI == __cdecl, but I'm not certain about that. It's __stdcall == Pascal convention on x86
Archived author: Skarn • Posted: 2018-10-13T12:10:47.711000+00:00
Original source
let me see if that works