{ #old API psuedo pointer handling my $pass = 1; my $hnd = "\x00" x length(pack('J', 0)); $function = new Win32::API($test_dll, 'BOOL __stdcall GetHandle(LPHANDLE pHandle)'); $pass = $pass && defined($function); #takes "\xAB\xCD\xED\x00" $pass = $pass && $function->Call($hnd) == 1; $hnd = unpack('J', $hnd); $pass = $pass && $hnd == 4000; ok($pass, 'GetHandle operates correctly'); $pass = 1; $function = new Win32::API($test_dll, 'BOOL __stdcall FreeHandle(HANDLE Handle)'); $pass = $pass && defined($function); #takes 123 $pass = $pass && $function->Call($hnd) == 1; ok($pass, 'FreeHandle operates correctly'); }