Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Saturday, February 4, 2012

Perl easy extensions

Inline::C doesn't seem to be workable on Win32 with ActiveState Perl unless you have the same C compiler that your Perl build was made with. It looks like if you want to use Inline with mingw, you have to build Perl with mingw.

Win32::API does work however, certainly with simple cases like

use Win32::API;
Win32::API->Import("kernel32", "int GetCurrentProcessId()");
Win32::API->Import("kernel32", "DWORD GetTickCount()");
$PID = GetCurrentProcessId();
print "pid=$PID tick=" . GetTickCount() . "\n";

Followers

Blog Archive