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

Function resolveGetSpecialFolderPath

Engine/StandardPaths.cpp:161–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

StandardPaths.cppFile · 0.85

Calls 1

loadFunction · 0.70

Tested by

no test coverage detected