Skip to content

Commit d47a4c8

Browse files
Add new Retained attribute to OVERLAPPED parameters (#1792)
* Add new Retained attribute to OVERLAPPED parameters * Retained DeviceIoControl --------- Co-authored-by: Mike Battista <[email protected]>
1 parent 07ac08e commit d47a4c8

File tree

3 files changed

+889
-566
lines changed

3 files changed

+889
-566
lines changed

generation/WinSDK/emitter.settings.rsp

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -985,30 +985,30 @@ IWICImagingFactory::CreateDecoderFromFilename::pguidVendor=[Optional]
985985
DCompositionCreateDevice::dcompositionDevice=[ComOutPtr]
986986
DCompositionCreateDevice2::dcompositionDevice=[ComOutPtr]
987987
DCompositionCreateDevice3::dcompositionDevice=[ComOutPtr]
988-
HttpAddFragmentToCache::Overlapped=[Optional]
989-
HttpCancelHttpRequest::Overlapped=[Optional]
988+
HttpAddFragmentToCache::Overlapped=[In][Out][Optional][Retained]
989+
HttpCancelHttpRequest::Overlapped=[In][Out][Optional][Retained]
990990
HttpCreateRequestQueue::Flags=[Optional]
991991
HttpCreateRequestQueue::Name=[Optional]
992992
HttpCreateRequestQueue::SecurityAttributes=[Optional]
993-
HttpFlushResponseCache::Overlapped=[Optional]
993+
HttpFlushResponseCache::Overlapped=[In][Out][Optional][Retained]
994994
HttpReadFragmentFromCache::ByteRange=[Optional]
995-
HttpReadFragmentFromCache::Overlapped=[Optional]
996-
HttpReceiveClientCertificate::Overlapped=[Optional]
997-
HttpReceiveHttpRequest::Overlapped=[Optional]
998-
HttpReceiveRequestEntityBody::Overlapped=[Optional]
995+
HttpReadFragmentFromCache::Overlapped=[In][Out][Optional][Retained]
996+
HttpReceiveClientCertificate::Overlapped=[In][Out][Optional][Retained]
997+
HttpReceiveHttpRequest::Overlapped=[In][Out][Optional][Retained]
998+
HttpReceiveRequestEntityBody::Overlapped=[In][Out][Optional][Retained]
999999
HttpSendHttpResponse::BytesSent=[Optional]
10001000
HttpSendHttpResponse::CachePolicy=[Optional]
10011001
HttpSendHttpResponse::LogData=[Optional]
1002-
HttpSendHttpResponse::Overlapped=[Optional]
1002+
HttpSendHttpResponse::Overlapped=[In][Out][Optional][Retained]
10031003
HttpSendResponseEntityBody::BytesSent=[Optional]
10041004
HttpSendResponseEntityBody::EntityChunkCount=[Optional]
10051005
HttpSendResponseEntityBody::LogData=[Optional]
1006-
HttpSendResponseEntityBody::Overlapped=[Optional]
1006+
HttpSendResponseEntityBody::Overlapped=[In][Out][Optional][Retained]
10071007
HttpSendResponseEntityBody::Reserved1=[Optional]
10081008
HttpSendResponseEntityBody::Reserved2=[Optional]
1009-
HttpWaitForDemandStart::Overlapped=[Optional]
1010-
HttpWaitForDisconnect::Overlapped=[Optional]
1011-
HttpWaitForDisconnectEx::Overlapped=[Optional]
1009+
HttpWaitForDemandStart::Overlapped=[In][Out][Optional][Retained]
1010+
HttpWaitForDisconnect::Overlapped=[In][Out][Optional][Retained]
1011+
HttpWaitForDisconnectEx::Overlapped=[In][Out][Optional][Retained]
10121012
HttpWaitForDisconnectEx::Reserved=[Optional]
10131013
IDCompositionSurface::BeginDraw::updateObject=[ComOutPtr]
10141014
# powerbase.h
@@ -1078,7 +1078,7 @@ FNCERTSRVBACKUPGETDYNAMICFILELISTW::pcbSize=[Out]
10781078
SetLogFileSizeWithPolicy::pDesiredSize=[In]
10791079
SetLogFileSizeWithPolicy::pResultingSize=[Out]
10801080
FlushLogBuffers::pvMarshal=[In]
1081-
FlushLogBuffers::pOverlapped=[In][Out][Optional]
1081+
FlushLogBuffers::pOverlapped=[In][Out][Optional][Retained]
10821082
GetMessageA=[CanReturnMultipleSuccessValuesAttribute]
10831083
GetMessageW=[CanReturnMultipleSuccessValuesAttribute]
10841084
GetNumberOfPhysicalMonitorsFromHMONITOR::return=BOOL
@@ -1751,7 +1751,7 @@ WNetUseConnection4A::return=WIN32_ERROR
17511751
WNetUseConnection4W::return=WIN32_ERROR
17521752
WNetUseConnectionA::return=WIN32_ERROR
17531753
WNetUseConnectionW::return=WIN32_ERROR
1754-
HttpReceiveHttpRequest::Overlapped=[Out]
1754+
HttpReceiveHttpRequest::Overlapped=[In][Out][Optional][Retained]
17551755
PFTASKDIALOGCALLBACK::msg=[AssociatedEnum("TASKDIALOG_NOTIFICATIONS")]
17561756
GlobalMemoryStatusEx::lpBuffer=[In]
17571757
SHCreateItemInKnownFolder::dwKFFlags=[AssociatedEnum("KNOWN_FOLDER_FLAG")]
@@ -1814,6 +1814,7 @@ GetFileAttributesW=[CanReturnMultipleSuccessValues]
18141814
GetFileVersionInfoSizeA=[CanReturnMultipleSuccessValues]
18151815
GetFileVersionInfoSizeW=[CanReturnMultipleSuccessValues]
18161816
CertCreateCertificateContext=[CanReturnMultipleSuccessValues]
1817+
DeviceIoControl::lpOverlapped=[In][Out][Optional][Retained]
18171818
DXGI_ADAPTER_DESC1::Flags=[AssociatedEnum("DXGI_ADAPTER_FLAG")]
18181819
DXGI_ADAPTER_DESC2::Flags=[AssociatedEnum("DXGI_ADAPTER_FLAG")]
18191820
DXGI_DECODE_SWAP_CHAIN_DESC::Flags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
@@ -1836,4 +1837,4 @@ IDXGIOutputDuplication::GetDesc::pDesc=[RetVal]
18361837
IDXGISurface::GetDesc::pDesc=[RetVal]
18371838
IDXGISwapChain::GetDesc::pDesc=[RetVal]
18381839
IDXGISwapChain1::GetDesc1::pDesc=[RetVal]
1839-
IDXGISwapChain1::GetFullscreenDesc::pDesc=[RetVal]
1840+
IDXGISwapChain1::GetFullscreenDesc::pDesc=[RetVal]

generation/WinSDK/manual/Metadata.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,18 @@ public ReservedAttribute()
260260
}
261261
}
262262

263+
/// <summary>
264+
/// Indicates that the attributed parameter must point to a structure that remains allocated
265+
/// throughout the lifetime of the asynchronous operation.
266+
/// </summary>
267+
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
268+
public class RetainedAttribute : Attribute
269+
{
270+
public RetainedAttribute()
271+
{
272+
}
273+
}
274+
263275
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
264276
public class RetValAttribute : Attribute
265277
{

0 commit comments

Comments
 (0)