Use DynamicWrapper:
- Download
dynwrap.dll
http://techsupt.winbatch.com/techsupt/dynawrapNt.zip (or other version from here DynaWrap - DynaCall Wrapper): - Unpack and register:
regsvr32 dynwrap.dll /c
(you can also recompile it if you like)
Now this code below should work (it works for me):
$com = new COM("DynamicWrapper");
$com->Register("KERNEL32.DLL", "GetTickCount", "i=l", "f=s", "r=l");
echo $com->GetTickCount(0);
Description of the input parameters is in Readme.txt
.