summaryrefslogtreecommitdiff
path: root/specs
diff options
context:
space:
mode:
Diffstat (limited to 'specs')
-rw-r--r--specs/d3d11.py2
-rw-r--r--specs/dxgi.py4
-rw-r--r--specs/winapi.py5
3 files changed, 8 insertions, 3 deletions
diff --git a/specs/d3d11.py b/specs/d3d11.py
index bbbaaf6b..cec92941 100644
--- a/specs/d3d11.py
+++ b/specs/d3d11.py
@@ -1383,7 +1383,7 @@ ID3D11Device.methods += [
StdMethod(HRESULT, "CreatePredicate", [(Pointer(Const(D3D11_QUERY_DESC)), "pPredicateDesc"), Out(Pointer(ObjPointer(ID3D11Predicate)), "ppPredicate")]),
StdMethod(HRESULT, "CreateCounter", [(Pointer(Const(D3D11_COUNTER_DESC)), "pCounterDesc"), Out(Pointer(ObjPointer(ID3D11Counter)), "ppCounter")]),
StdMethod(HRESULT, "CreateDeferredContext", [(UINT, "ContextFlags"), Out(Pointer(ObjPointer(ID3D11DeviceContext)), "ppDeferredContext")]),
- StdMethod(HRESULT, "OpenSharedResource", [(HANDLE, "hResource"), (REFIID, "ReturnedInterface"), Out(Pointer(ObjPointer(Void)), "ppResource")]),
+ StdMethod(HRESULT, "OpenSharedResource", [(RAW_HANDLE, "hResource"), (REFIID, "ReturnedInterface"), Out(Pointer(ObjPointer(Void)), "ppResource")]),
StdMethod(HRESULT, "CheckFormatSupport", [(DXGI_FORMAT, "Format"), Out(Pointer(D3D11_FORMAT_SUPPORT), "pFormatSupport")], sideeffects=False),
StdMethod(HRESULT, "CheckMultisampleQualityLevels", [(DXGI_FORMAT, "Format"), (UINT, "SampleCount"), Out(Pointer(UINT), "pNumQualityLevels")], sideeffects=False),
StdMethod(Void, "CheckCounterInfo", [Out(Pointer(D3D11_COUNTER_INFO), "pCounterInfo")], sideeffects=False),
diff --git a/specs/dxgi.py b/specs/dxgi.py
index 7349e25a..b79e15cf 100644
--- a/specs/dxgi.py
+++ b/specs/dxgi.py
@@ -375,8 +375,10 @@ IDXGIDeviceSubObject.methods += [
StdMethod(HRESULT, "GetDevice", [(REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppDevice")]),
]
+SHARED_HANDLE = Handle("shared_handle", RAW_HANDLE)
+
IDXGIResource.methods += [
- StdMethod(HRESULT, "GetSharedHandle", [Out(Pointer(HANDLE), "pSharedHandle")]),
+ StdMethod(HRESULT, "GetSharedHandle", [Out(Pointer(SHARED_HANDLE), "pSharedHandle")]),
StdMethod(HRESULT, "GetUsage", [Out(Pointer(DXGI_USAGE), "pUsage")], sideeffects=False),
StdMethod(HRESULT, "SetEvictionPriority", [(DXGI_RESOURCE_PRIORITY, "EvictionPriority")]),
StdMethod(HRESULT, "GetEvictionPriority", [Out(Pointer(DXGI_RESOURCE_PRIORITY), "pEvictionPriority")], sideeffects=False),
diff --git a/specs/winapi.py b/specs/winapi.py
index f4e6ba0c..3697f858 100644
--- a/specs/winapi.py
+++ b/specs/winapi.py
@@ -85,7 +85,10 @@ LPCVOID = OpaquePointer(Const(VOID))
def DECLARE_HANDLE(expr):
return Handle(expr, IntPointer(expr))
-HANDLE = DECLARE_HANDLE("HANDLE")
+# XXX: HANDLE type is often used for disjoint handle namespaces
+RAW_HANDLE = IntPointer("HANDLE")
+HANDLE = Handle("HANDLE", RAW_HANDLE)
+
HWND = DECLARE_HANDLE("HWND")
HDC = DECLARE_HANDLE("HDC")
HMONITOR = DECLARE_HANDLE("HMONITOR")