如何使用PHP COM调用kernel32.GetTickCount?
我试图通过PHP COM扩展从KERNEL32.DLL执行GetTickCount,但没有成功。我应该使用什么ProgID或Class ID来执行GetTickCount如何使用PHP COM调用kernel32.GetTickCount?,php,windows,dll,Php,Windows,Dll,我试图通过PHP COM扩展从KERNEL32.DLL执行GetTickCount,但没有成功。我应该使用什么ProgID或Class ID来执行GetTickCount $com = new COM("?WhatProgID.ID?"); $time = $com->GetTickCount(); 在C++中,它看起来是这样的: #include <windows.h> #include <iostream> int main(void) { std:
$com = new COM("?WhatProgID.ID?");
$time = $com->GetTickCount();
在C++中,它看起来是这样的:
#include <windows.h>
#include <iostream>
int main(void)
{
std::cout << GetTickCount() << std::endl;
}
#包括
#包括
内部主(空)
{
std::cout使用DynamicRapper:
下载dynwrap.dll
(或从此处下载其他版本):
解包并注册:regsvr32 dynwrap.dll/c
(如果愿意,也可以重新编译)
现在,下面的代码应该可以工作了(它适合我):
输入参数的说明见Readme.txt
$com = new COM("DynamicWrapper");
$com->Register("KERNEL32.DLL", "GetTickCount", "i=l", "f=s", "r=l");
echo $com->GetTickCount(0);