MCPcopy Create free account
hub / github.com/MrKepzie/Natron / resolveGetSpecialFolderPath

Function resolveGetSpecialFolderPath

Engine/StandardPaths.cpp:159–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157
158typedef BOOL (WINAPI * GetSpecialFolderPath)(HWND, LPWSTR, int, BOOL);
159static GetSpecialFolderPath
160resolveGetSpecialFolderPath()
161{
162 static GetSpecialFolderPath gsfp = 0;
163
164 if (!gsfp) {
165#ifndef Q_OS_WINCE
166 QString lib = QString::fromUtf8("shell32");
167#else
168 QString lib = QString::fromUtf8("coredll");
169#endif // Q_OS_WINCE
170 HINSTANCE libHandle = load( (const wchar_t*)lib.utf16() );
171 if (libHandle) {
172 gsfp = (GetSpecialFolderPath)(void*)GetProcAddress(libHandle, "SHGetSpecialFolderPathW");
173 }
174 }
175
176 return gsfp;
177}
178
179static QString
180convertCharArray(const wchar_t *path)

Callers 1

StandardPaths.cppFile · 0.85

Calls 1

loadFunction · 0.70

Tested by

no test coverage detected