PathRemoveFileSpec

来源:互联网 发布:unix远程登录软件 编辑:程序博客网 时间:2024/09/21 06:34
</pre><pre name="code" class="cpp">#include <stdio.h>#include <Shlwapi.h>#pragma comment(lib,"Shlwapi.lib")int main(int argc, char *argv[]){wchar_t self[MAX_PATH] = L" ";GetModuleFileName(NULL, self, MAX_PATH);PathRemoveFileSpec(self);printf("↓获得文件所在盘符,本文件所在盘符为\n");printf("%s盘\n", self);system("pause");return 0;}


0 0