tsplitpath s函式的使用

2021-07-16 08:58:12 字數 1269 閱讀 4669

[譯]_tsplitpath_s(分解路徑)

函式原型:

errno_t _splitpath_s(

const char * path,

char * drive,

size_t drivenumberofelements,

char * dir,

size_t dirnumberofelements,

char * fname,

size_t namenumberofelements,

char * ext,

size_t extnumberofelements

);errno_t _wsplitpath_s(

const wchar_t * path,

wchar_t * drive,

size_t drivenumberofelements,

wchar_t *dir,

size_t dirnumberofelements,

wchar_t * fname,

size_t namenumberofelements,

wchar_t * ext,

size_t extnumberofelements

);  

引數:[in] path

全路徑[out] drive

驅動器號,後跟乙個冒號(:),如果你不需要驅動器號,可以傳遞null

[in] drivenumberofelements

drive的緩衝區大小(單位元組或款位元組),如果drive為null,該引數必須為0

[out] dir

目錄路徑,包括尾部的斜槓,可以使用「\」,「/」或者都使用,如果不需要目錄路徑,可以傳遞null

[in] dirnumberofelements

dir的緩衝區大小(單位元組或者款位元組),如果dir為null,該引數必須為0

[out] fname

不帶副檔名的檔名,如果不需要檔名,可以傳遞null

[in] namenumberofelements

fname的緩衝區大小(單位元組或者寬位元組),如果fname為null,該引數必須為0

[out] ext

檔案的副檔名,包括「.」,如果不需要副檔名,可以傳遞null

[in] extnumberofelements

ext的緩衝區大小(單位元組或者寬位元組),如果ext為null,該引數必須為0

返回值:

成功返回0,失敗返回錯誤** einval

錯誤的情況有:

Sql Server REPLACE函式的使用

replace 用第三個表示式替換第乙個字串表示式中出現的所有第二個給定字串表示式。語法replace string replace1 string replace2 string replace3 引數 string replace1 待搜尋的字串表示式。string replace1 可以是字元...

Sql Server REPLACE函式的使用

replace 更新替換資料庫某個欄位的的部分的值,比如替換資料庫中url欄位的網域名稱,語法 replace cloum string old string old 引數 cloum 待替換欄位的字串表示式。string old 待查詢的字串表示式。string old 替換用的字串表示式。示列 ...

如何使EnableMenuItem函式的呼叫有效

在mfc環境下menu的修改在預設的情況下是通過ccmdui來改變的,呼叫enablemenuitem函式無效 不管是全域性api還是 cmenu類的成員函式 但是只要修改cframewnd類的乙個成員變數m bautomenuenable就可以使呼叫的函式有效.m bautomenuenable在...