Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return E_NOTIMPL for not-yet-implemented system functions #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions comctl32.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion shell32.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion uxtheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down