Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <stdio.h>
- int main()
- {
- LPCWSTR g_fileName = L"C:\\hello\\world\\file.ext";
- WCHAR *fileExt;
- WCHAR szDestDir[256];
- WCHAR szDir[256];
- GetFullPathNameW(g_fileName,256, szDir,&fileExt);
- swprintf(szDestDir, L"C:\\Example\\%s", fileExt);
- MessageBoxW(NULL,szDestDir,L"Debug",MB_OK);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement