wince獲取當前路徑

2022-09-04 12:15:10 字數 301 閱讀 6893

在wince開發中,若要獲取程式的當前路徑,方法如下:

m_currentpath = path.getdirectoryname(assembly.getexecutingassembly().getname().codebase);

directory.getcurrentdirectory 方法在 .net compact framework 中可用,但是當前並不支援,呼叫該方法會丟擲乙個 notsupportedexception 異常。在 windows ce 下程式設計,所有的檔名都是從智慧型手機的根目錄算起的。

wince獲取當前路徑

在evc下沒有getcurrentdirectory 這個函式能方便地獲取當前工作路徑,所以我們只能通過getmodulefilename 函式的返回值來獲取當前的工作路徑.szpath 獲取的當前工作路徑 void getcurrentdirectory cstring szpath const ...

Wince 獲取當前路徑

在wince開發中,若要獲取程式的當前路徑,方法如下 m currentpath path.getdirectoryname assembly.getexecutingassembly getname codebase directory.getcurrentdirectory 方法在 net co...

C C 獲取當前路徑

獲取當前工作目錄是使用函式 getcwd。cwd指的是 current working directory 這樣就好記憶了。函式說明 函式原型 char getcwd char buffer,int len 引數 buffer是指將當前工作目錄的絕對路徑copy到buffer所指的記憶體空間,len...