PrjWritePlaceholderInfo returns access denied as a result [ProjFS]

0

My code:

HRESULT GetPlaceholderInfoCallback(const PRJ_CALLBACK_DATA* CallbackData)
{
    auto sourcePath = GetSourcePath(CallbackData->FilePathName);

    std:shared_ptr<PRJ_PLACEHOLDER_INFO> p_placeholder = createPlaceholderInfo(sourcePath);
    if (p_placeholder == NULL)
    {
        return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
    }

    auto hr = PrjWritePlaceholderInfo(namespaceVirtualizationContext, CallbackData->FilePathName,
                                               p_placeholder.get(), sizeof(PRJ_PLACEHOLDER_INFO));

    if (S_OK != hr)
    {
        // failed
    }

    return hr;
}

Most of times it works as expected but on some files/dirs PrjWritePlaceholderInfo returns GENERIC_ACCESS_DENIED error (0x80070005).

Files have same DACL/SACL/Owner

I tried even with SYSTEM privileges but still getting same error.

windows
winapi
filesystems
virtualization
projfs
asked on Stack Overflow Apr 30, 2019 by J. Doe • edited May 2, 2019 by J. Doe

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0