Hi, I'm trying to wrap a function of BASS sound library so I can learn how it works. My code is: #{. emit: """#include "bass.h" """ .} type dword {. importc: "DWORD" .} = uint32 type hwnd {. importc: "HWND" .} = uint32 type guid {. importc: "struct GUID" .}= object type cbool {. importc: "BOOL" .} = uint32
proc BASS_Init* (device: cint, frequency, flags: cuint, win: hwnd, guid: ptr guid): cbool {. importc, cdecl, header: "bass.h" .} echo $int(BASS_Init(-1, 44100, 0, 0, nil)) The function I'm wrapping is: BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, HWND win, const GUID *dsguid); The reason I'm passing a nil pointer in the call to BASS_Init is because BASS will use the default value if it's null. Any hints?