Advertisement
Guest User

Untitled

a guest
Jul 13th, 2013
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <stdio.h>
  3.  
  4.  
  5. int main()
  6. {
  7.     LPCWSTR g_fileName = L"C:\\hello\\world\\file.ext";
  8.  
  9.     WCHAR *fileExt;
  10.     WCHAR szDestDir[256];
  11.     WCHAR szDir[256];
  12.     GetFullPathNameW(g_fileName,256, szDir,&fileExt);
  13.     swprintf(szDestDir, L"C:\\Example\\%s", fileExt);
  14.     MessageBoxW(NULL,szDestDir,L"Debug",MB_OK);
  15.  
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement