diff --git a/comctl32.go b/comctl32.go index 144affa7..e9617e7a 100644 --- a/comctl32.go +++ b/comctl32.go @@ -361,7 +361,7 @@ func InitCommonControlsEx(lpInitCtrls *INITCOMMONCONTROLSEX) bool { func LoadIconMetric(hInstance HINSTANCE, lpIconName *uint16, lims int32, hicon *HICON) HRESULT { if loadIconMetric.Find() != nil { - return HRESULT(0) + return -((E_NOTIMPL ^ 0xFFFFFFFF) + 1) } ret, _, _ := syscall.Syscall6(loadIconMetric.Addr(), 4, uintptr(hInstance), @@ -376,7 +376,7 @@ func LoadIconMetric(hInstance HINSTANCE, lpIconName *uint16, lims int32, hicon * func LoadIconWithScaleDown(hInstance HINSTANCE, lpIconName *uint16, w int32, h int32, hicon *HICON) HRESULT { if loadIconWithScaleDown.Find() != nil { - return HRESULT(0) + return -((E_NOTIMPL ^ 0xFFFFFFFF) + 1) } ret, _, _ := syscall.Syscall6(loadIconWithScaleDown.Addr(), 5, uintptr(hInstance), diff --git a/shell32.go b/shell32.go index 8c683aec..cd3790dc 100644 --- a/shell32.go +++ b/shell32.go @@ -459,7 +459,7 @@ func SHParseDisplayName(pszName *uint16, pbc uintptr, ppidl *uintptr, sfgaoIn ui func SHGetStockIconInfo(stockIconId int32, uFlags uint32, stockIcon *SHSTOCKICONINFO) HRESULT { if shGetStockIconInfo.Find() != nil { - return HRESULT(0) + return -((E_NOTIMPL ^ 0xFFFFFFFF) + 1) } ret, _, _ := syscall.Syscall6(shGetStockIconInfo.Addr(), 3, uintptr(stockIconId), diff --git a/uxtheme.go b/uxtheme.go index 1f24cac9..3fe6214a 100644 --- a/uxtheme.go +++ b/uxtheme.go @@ -535,7 +535,7 @@ func DrawThemeBackground(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pRect, func DrawThemeTextEx(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pszText *uint16, iCharCount int32, dwFlags uint32, pRect *RECT, pOptions *DTTOPTS) HRESULT { if drawThemeTextEx.Find() != nil { - return HRESULT(0) + return -((E_NOTIMPL ^ 0xFFFFFFFF) + 1) } ret, _, _ := syscall.Syscall9(drawThemeTextEx.Addr(), 9, uintptr(hTheme),