1 lstrcatW(pszpath, "\\..\\..\\"); 2 DWORD dwlen = GetFullPathNameW(pszpath, 0u, null, null); 3 void* pv = malloc((size_t)(uint)dwlen); 4 GetFullPathNameW(pszpath, dwlen, (char*)pv, null); 5 string sz = new string((char*)pv); 6 free(pv);
1 lstrcatW(pszpath, "\\..\\..\\"); 2 DWORD dwlen = GetFullPathNameW(pszpath, 0u, null, null); 3 void* pv = malloc((size_t)(uint)dwlen); 4 GetFullPathNameW(pszpath, dwlen, (char*)pv, null); 5 string sz = new string((char*)pv); 6 free(pv);
转载于:https://www.cnblogs.com/shitekudasai/p/9093170.html