| 68 | std::string cachedDriverName = ""; |
| 69 | |
| 70 | std::wstring intel_driver::GetDriverNameW() { |
| 71 | if (cachedDriverName.empty()) { |
| 72 | //Create a random name |
| 73 | char buffer[100]{}; |
| 74 | static const char alphanum[] = |
| 75 | "abcdefghijklmnopqrstuvwxyz" |
| 76 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; |
| 77 | int len = rand() % 20 + 10; |
| 78 | for (int i = 0; i < len; ++i) |
| 79 | buffer[i] = alphanum[rand() % (sizeof(alphanum) - 1)]; |
| 80 | cachedDriverName = buffer; |
| 81 | } |
| 82 | |
| 83 | std::wstring name(cachedDriverName.begin(), cachedDriverName.end()); |
| 84 | return name; |
| 85 | } |
| 86 | |
| 87 | std::wstring intel_driver::GetDriverPath() { |
| 88 | std::wstring temp = kdmUtils::GetFullTempPath(); |