2012-01-05 78 views

回答

7

有一个在功能上没有建立这样做,但你可以问的Windows。

的WINAPI getFileTime函数返回一个filetime结构。然而,参数和返回值有一点难以接口(查看AX WinAPI类中的其他函数)。

要容易得多是接口到.NET getCreationTime方法(不要在WinAPI的定义):

client static UTCDateTime getFileCreationTime(str name) 
{ 
    return CLRSystemDateTime2UtcDateTime(System.IO.File::GetCreationTime(name)); 
} 

要被使用,如:

static void Job1(Args _args) 
{; 
    info(strFmt("%1", WinAPi::getFileCreationTime(@"C:\Users\zjbk\My Documents\ActionTool_SysFlushDictionaryServer.xpo"))); 
} 

要使用打开PDF或任何文件默认查看器:

WinAPI::ShellExecute(@"C:\test.pdf"); 
+0

谢谢..它工作正常.. – Revathi 2012-01-05 08:56:29

相关问题