2012-01-05 35 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

相關問題