- or download this
use warnings;
use strict;
...
# Restore original foreground/background colours.
set_attr($h, $current);
print "\n All Done\n";
- or download this
SV * OpenDevice() {
HANDLE handle;
/* Do stuff that creates the handle */
return newSVuv(handle);
- or download this
void pass_handle(SV * handle) {
HANDLE h = (HANDLE)SvUV(handle);
/* Do stuff with the handle */
}
- or download this
unsigned long OpenDevice() {
HANDLE handle;
/* Do stuff that creates the handle */
return (unsigned long)handle;
- or download this
void pass_handle(unsigned long handle) {
HANDLE h = (HANDLE)handle;
/* Do stuff with the handle */
}