DWORD dwRefCount;
DWORD dwState;
PWSTR pszFullName;
+ PWSTR pszProfilePath;
} PROFILEDATA, *PPROFILEDATA;
static
BOOL
OnProfileTypeInit(
- HWND hwndDlg,
- PPROFILEDATA pProfileData)
+ _In_ HWND hwndDlg,
+ _In_ PPROFILEDATA pProfileData)
{
PWSTR pszRawBuffer = NULL, pszCookedBuffer = NULL;
INT nLength;
static
BOOL
GetProfileSize(
- PWSTR pszProfilePath,
- PULONGLONG pullProfileSize)
+ _In_ PWSTR pszProfilePath,
+ _Inout_ PULONGLONG pullProfileSize)
{
HANDLE hFile = INVALID_HANDLE_VALUE;
WIN32_FIND_DATA FindData;
static
VOID
-FormatProfileSize(LPWSTR Buffer, double size)
+FormatProfileSize(
+ _Out_ LPWSTR Buffer,
+ _In_ double size)
{
const LPWSTR units[] = {L"MB", L"GB", L"TB"};
int i = 0, j;
/* Create and fill the profile data entry */
dwProfileData = sizeof(PROFILEDATA) +
- ((wcslen(szNameBuffer) + 1) * sizeof(WCHAR));
+ ((wcslen(szNameBuffer) + 1) * sizeof(WCHAR)) +
+ ((wcslen(szProfilePath) + 1) * sizeof(WCHAR));
pProfileData = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
dwProfileData);
wcscpy(pProfileData->pszFullName, szNameBuffer);
+ ptr = (PWSTR)((ULONG_PTR)ptr + ((wcslen(pProfileData->pszFullName) + 1) * sizeof(WCHAR)));
+ pProfileData->pszProfilePath = ptr;
+ wcscpy(pProfileData->pszProfilePath, szProfilePath);
+
/* Add the profile and set its name */
memset(&lvi, 0x00, sizeof(lvi));
lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_PARAM;