void pass_handle(SV * handle) { HANDLE h = (HANDLE)SvUV(handle); /* Do stuff with the handle */ }