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