If all you need is that one function, you can easily get at it with Inline::C:
#! perl -slw use strict; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'END_C', NAME => 'GWTPI', CLEAN_AFTER_BUILD =>0; #include <windows.h> #define IS_VARS Inline_Stack_Vars #define IS_RESET Inline_Stack_Reset #define IS_PUSHIV( iv ) Inline_Stack_Push( sv_2mortal( newSViv( iv ) ) + ) #define IS_PUSHUV( uv ) Inline_Stack_Push( sv_2mortal( newSVuv( uv ) ) + ) #define IS_DONE Inline_Stack_Done void getWindowThreadProcessId( SV* hwnd ) { IS_VARS; DWORD pid; DWORD tid = GetWindowThreadProcessId( (HWND)SvUV(hwnd), &pid ); IS_RESET; IS_PUSHUV( tid ); IS_PUSHUV( pid ); IS_DONE; return; } END_C my( $tid, $pid ) = getWindowThreadProcessId( 0 ); print "$tid $pid";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using GetWindowThreadProcessId(). Want to move to AS 5.16 64bit Perl, but Win32::GUI doesn't build. Now what?
by syphilis (Archbishop) on May 29, 2013 at 02:11 UTC | |
by bulk88 (Priest) on May 29, 2013 at 04:32 UTC |