mirror of https://github.com/buggins/dlangui.git
fix win32 build with older compiler (w/o core.sys.windows)
This commit is contained in:
parent
84895abfb2
commit
56658e2802
|
@ -349,11 +349,16 @@ private:
|
||||||
version(Windows)
|
version(Windows)
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
import core.sys.windows.windows;
|
//import core.sys.windows.windows;
|
||||||
import core.sys.windows.shlobj;
|
//import core.sys.windows.shlobj;
|
||||||
import core.sys.windows.wtypes;
|
//import core.sys.windows.wtypes;
|
||||||
import core.sys.windows.objbase;
|
//import core.sys.windows.objbase;
|
||||||
import core.sys.windows.objidl;
|
//import core.sys.windows.objidl;
|
||||||
|
import win32.windows;
|
||||||
|
import win32.shlobj;
|
||||||
|
import win32.wtypes;
|
||||||
|
import win32.objbase;
|
||||||
|
import win32.objidl;
|
||||||
|
|
||||||
pragma(lib, "Ole32");
|
pragma(lib, "Ole32");
|
||||||
|
|
||||||
|
@ -456,7 +461,7 @@ RootEntry[] getBookmarkPaths() nothrow
|
||||||
|
|
||||||
IPersistFile ppf;
|
IPersistFile ppf;
|
||||||
auto iidPersistFile = IID_IPersistFile;
|
auto iidPersistFile = IID_IPersistFile;
|
||||||
hres = psl.QueryInterface(&iidPersistFile, cast(void**)&ppf);
|
hres = psl.QueryInterface(cast(GUID*)&iidPersistFile, cast(void**)&ppf);
|
||||||
enforce(SUCCEEDED(hres), "Failed to query IPersistFile interface");
|
enforce(SUCCEEDED(hres), "Failed to query IPersistFile interface");
|
||||||
scope(exit) ppf.Release();
|
scope(exit) ppf.Release();
|
||||||
|
|
||||||
|
@ -479,7 +484,7 @@ RootEntry[] getBookmarkPaths() nothrow
|
||||||
|
|
||||||
auto path = szGotPath[0..wcslen(szGotPath.ptr)];
|
auto path = szGotPath[0..wcslen(szGotPath.ptr)];
|
||||||
|
|
||||||
if (path.length && path.isDir) {
|
if (path.length && path.toUTF8.isDir) {
|
||||||
res ~= RootEntry(RootEntryType.BOOKMARK, path.toUTF8, linkFile.name.baseName.stripExtension.toUTF32);
|
res ~= RootEntry(RootEntryType.BOOKMARK, path.toUTF8, linkFile.name.baseName.stripExtension.toUTF32);
|
||||||
}
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
@ -506,7 +511,8 @@ bool isRoot(in string path) pure nothrow {
|
||||||
*/
|
*/
|
||||||
bool isHidden(in string path) nothrow {
|
bool isHidden(in string path) nothrow {
|
||||||
version(Windows) {
|
version(Windows) {
|
||||||
import core.sys.windows.winnt : FILE_ATTRIBUTE_HIDDEN;
|
//import core.sys.windows.winnt : FILE_ATTRIBUTE_HIDDEN;
|
||||||
|
import win32.winnt : FILE_ATTRIBUTE_HIDDEN;
|
||||||
import std.exception : collectException;
|
import std.exception : collectException;
|
||||||
uint attrs;
|
uint attrs;
|
||||||
if (collectException(path.getAttributes(), attrs) is null) {
|
if (collectException(path.getAttributes(), attrs) is null) {
|
||||||
|
|
Loading…
Reference in New Issue