| 136 | |
| 137 | |
| 138 | static bool GetUserNameFromDokanFileInfo(PDOKAN_FILE_INFO DokanFileInfo, wstring& user, wstring& domain) |
| 139 | { |
| 140 | HANDLE handle; |
| 141 | |
| 142 | handle = DokanOpenRequestorToken(DokanFileInfo); |
| 143 | if (handle == INVALID_HANDLE_VALUE) { |
| 144 | DbgPrint(L" DokanOpenRequestorToken failed\n"); |
| 145 | return false; |
| 146 | } |
| 147 | |
| 148 | const bool bRet = GetUserNameFromToken(handle, user, domain); |
| 149 | |
| 150 | CloseHandle(handle); |
| 151 | |
| 152 | return bRet; |
| 153 | } |
| 154 | |
| 155 | static bool GetSessionIdFromDokanFileInfo(PDOKAN_FILE_INFO DokanFileInfo, DWORD& sessionid) |
| 156 | { |
nothing calls this directly
no test coverage detected