Skip to content

Commit

Permalink
code gen
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 16, 2025
1 parent 6bab320 commit ff1878c
Show file tree
Hide file tree
Showing 70 changed files with 717 additions and 717 deletions.
2 changes: 1 addition & 1 deletion crates/libs/core/src/imp/com_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub unsafe fn CoCreateGuid() -> windows_core::Result<windows_core::GUID> {
windows_link::link!("ole32.dll" "system" fn CoCreateGuid(pguid : *mut windows_core::GUID) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
CoCreateGuid(&mut result__).map(|| core::mem::transmute(result__))
CoCreateGuid(&mut result__).map(|| result__)
}
}
#[inline]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3657,7 +3657,7 @@ pub unsafe fn VerifySignature(phcontext: *const SecHandle, pmessage: *const SecB
windows_link::link!("secur32.dll" "system" fn VerifySignature(phcontext : *const SecHandle, pmessage : *const SecBufferDesc, messageseqno : u32, pfqop : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
VerifySignature(phcontext, pmessage, messageseqno, &mut result__).map(|| core::mem::transmute(result__))
VerifySignature(phcontext, pmessage, messageseqno, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Security")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub unsafe fn WinBioGetCredentialState(identity: WINBIO_IDENTITY, r#type: WINBIO
windows_link::link!("winbio.dll" "system" fn WinBioGetCredentialState(identity : WINBIO_IDENTITY, r#type : WINBIO_CREDENTIAL_TYPE, credentialstate : *mut WINBIO_CREDENTIAL_STATE) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
WinBioGetCredentialState(core::mem::transmute(identity), r#type, &mut result__).map(|| core::mem::transmute(result__))
WinBioGetCredentialState(core::mem::transmute(identity), r#type, &mut result__).map(|| result__)
}
}
#[inline]
Expand All @@ -168,7 +168,7 @@ pub unsafe fn WinBioGetEnrolledFactors(accountowner: *const WINBIO_IDENTITY) ->
windows_link::link!("winbio.dll" "system" fn WinBioGetEnrolledFactors(accountowner : *const WINBIO_IDENTITY, enrolledfactors : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
WinBioGetEnrolledFactors(accountowner, &mut result__).map(|| core::mem::transmute(result__))
WinBioGetEnrolledFactors(accountowner, &mut result__).map(|| result__)
}
}
#[inline]
Expand Down Expand Up @@ -231,7 +231,7 @@ pub unsafe fn WinBioOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: u32,
windows_link::link!("winbio.dll" "system" fn WinBioOpenSession(factor : u32, pooltype : WINBIO_POOL, flags : u32, unitarray : *const u32, unitcount : usize, databaseid : *const windows_core::GUID, sessionhandle : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
WinBioOpenSession(factor, pooltype, flags, core::mem::transmute(unitarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), databaseid.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__))
WinBioOpenSession(factor, pooltype, flags, core::mem::transmute(unitarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), databaseid.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__)
}
}
#[inline]
Expand Down
12 changes: 6 additions & 6 deletions crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub unsafe fn DevCreateObjectQuery(objecttype: DEV_OBJECT_TYPE, queryflags: u32,
windows_link::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQuery(objecttype : DEV_OBJECT_TYPE, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__))
DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Devices_Properties")]
Expand All @@ -31,7 +31,7 @@ pub unsafe fn DevCreateObjectQueryEx(objecttype: DEV_OBJECT_TYPE, queryflags: u3
pcontext.unwrap_or(core::mem::zeroed()) as _,
&mut result__,
)
.map(|| core::mem::transmute(result__))
.map(|| result__)
}
}
#[cfg(feature = "Win32_Devices_Properties")]
Expand All @@ -43,7 +43,7 @@ where
windows_link::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQueryFromId(objecttype : DEV_OBJECT_TYPE, pszobjectid : windows_core::PCWSTR, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
DevCreateObjectQueryFromId(objecttype, pszobjectid.param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__))
DevCreateObjectQueryFromId(objecttype, pszobjectid.param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Devices_Properties")]
Expand All @@ -69,7 +69,7 @@ where
pcontext.unwrap_or(core::mem::zeroed()) as _,
&mut result__,
)
.map(|| core::mem::transmute(result__))
.map(|| result__)
}
}
#[cfg(feature = "Win32_Devices_Properties")]
Expand All @@ -81,7 +81,7 @@ where
windows_link::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQueryFromIds(objecttype : DEV_OBJECT_TYPE, pszzobjectids : windows_core::PCWSTR, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
DevCreateObjectQueryFromIds(objecttype, pszzobjectids.param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__))
DevCreateObjectQueryFromIds(objecttype, pszzobjectids.param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Devices_Properties")]
Expand All @@ -107,7 +107,7 @@ where
pcontext.unwrap_or(core::mem::zeroed()) as _,
&mut result__,
)
.map(|| core::mem::transmute(result__))
.map(|| result__)
}
}
#[cfg(feature = "Win32_Devices_Properties")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ where
windows_link::link!("dxva2.dll" "system" fn GetNumberOfPhysicalMonitorsFromIDirect3DDevice9(pdirect3ddevice9 : * mut core::ffi::c_void, pdwnumberofphysicalmonitors : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
GetNumberOfPhysicalMonitorsFromIDirect3DDevice9(pdirect3ddevice9.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
GetNumberOfPhysicalMonitorsFromIDirect3DDevice9(pdirect3ddevice9.param().abi(), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Graphics_Gdi")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ where
windows_link::link!("cfgmgr32.dll" "system" fn SwDeviceCreate(pszenumeratorname : windows_core::PCWSTR, pszparentdeviceinstance : windows_core::PCWSTR, pcreateinfo : *const SW_DEVICE_CREATE_INFO, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, pcallback : SW_DEVICE_CREATE_CALLBACK, pcontext : *const core::ffi::c_void, phswdevice : *mut HSWDEVICE) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
SwDeviceCreate(pszenumeratorname.param().abi(), pszparentdeviceinstance.param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| core::mem::transmute(result__))
SwDeviceCreate(pszenumeratorname.param().abi(), pszparentdeviceinstance.param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, pcontext.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn SwDeviceGetLifetime(hswdevice: HSWDEVICE) -> windows_core::Result<SW_DEVICE_LIFETIME> {
windows_link::link!("cfgmgr32.dll" "system" fn SwDeviceGetLifetime(hswdevice : HSWDEVICE, plifetime : *mut SW_DEVICE_LIFETIME) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
SwDeviceGetLifetime(hswdevice, &mut result__).map(|| core::mem::transmute(result__))
SwDeviceGetLifetime(hswdevice, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Devices_Properties")]
Expand All @@ -42,7 +42,7 @@ where
windows_link::link!("cfgmgr32.dll" "system" fn SwDeviceInterfaceRegister(hswdevice : HSWDEVICE, pinterfaceclassguid : *const windows_core::GUID, pszreferencestring : windows_core::PCWSTR, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, fenabled : windows_core::BOOL, ppszdeviceinterfaceid : *mut windows_core::PWSTR) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
SwDeviceInterfaceRegister(hswdevice, pinterfaceclassguid, pszreferencestring.param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fenabled.into(), &mut result__).map(|| core::mem::transmute(result__))
SwDeviceInterfaceRegister(hswdevice, pinterfaceclassguid, pszreferencestring.param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fenabled.into(), &mut result__).map(|| result__)
}
}
#[inline]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ where
windows_link::link!("wsdapi.dll" "system" fn WSDGenerateFault(pszcode : windows_core::PCWSTR, pszsubcode : windows_core::PCWSTR, pszreason : windows_core::PCWSTR, pszdetail : windows_core::PCWSTR, pcontext : * mut core::ffi::c_void, ppfault : *mut *mut WSD_SOAP_FAULT) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
WSDGenerateFault(pszcode.param().abi(), pszsubcode.param().abi(), pszreason.param().abi(), pszdetail.param().abi(), pcontext.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
WSDGenerateFault(pszcode.param().abi(), pszsubcode.param().abi(), pszreason.param().abi(), pszdetail.param().abi(), pcontext.param().abi(), &mut result__).map(|| result__)
}
}
#[inline]
Expand All @@ -201,7 +201,7 @@ where
windows_link::link!("wsdapi.dll" "system" fn WSDGenerateFaultEx(pcode : *const WSDXML_NAME, psubcode : *const WSDXML_NAME, preasons : *const WSD_LOCALIZED_STRING_LIST, pszdetail : windows_core::PCWSTR, ppfault : *mut *mut WSD_SOAP_FAULT) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
WSDGenerateFaultEx(pcode, psubcode.unwrap_or(core::mem::zeroed()) as _, preasons, pszdetail.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
WSDGenerateFaultEx(pcode, psubcode.unwrap_or(core::mem::zeroed()) as _, preasons, pszdetail.param().abi(), &mut result__).map(|| result__)
}
}
#[inline]
Expand Down Expand Up @@ -264,7 +264,7 @@ where
windows_link::link!("wsdapi.dll" "system" fn WSDXMLGetNameFromBuiltinNamespace(psznamespace : windows_core::PCWSTR, pszname : windows_core::PCWSTR, ppname : *mut *mut WSDXML_NAME) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
WSDXMLGetNameFromBuiltinNamespace(psznamespace.param().abi(), pszname.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
WSDXMLGetNameFromBuiltinNamespace(psznamespace.param().abi(), pszname.param().abi(), &mut result__).map(|| result__)
}
}
#[inline]
Expand Down
10 changes: 5 additions & 5 deletions crates/libs/windows/src/Windows/Win32/Gaming/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pub unsafe fn CheckGamingPrivilegeSilently(privilegeid: u32, scope: &windows_cor
windows_link::link!("api-ms-win-gaming-tcui-l1-1-1.dll" "system" fn CheckGamingPrivilegeSilently(privilegeid : u32, scope : * mut core::ffi::c_void, policy : * mut core::ffi::c_void, hasprivilege : *mut windows_core::BOOL) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
CheckGamingPrivilegeSilently(privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), &mut result__).map(|| core::mem::transmute(result__))
CheckGamingPrivilegeSilently(privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), &mut result__).map(|| result__)
}
}
#[inline]
Expand All @@ -14,7 +14,7 @@ where
windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn CheckGamingPrivilegeSilentlyForUser(user : * mut core::ffi::c_void, privilegeid : u32, scope : * mut core::ffi::c_void, policy : * mut core::ffi::c_void, hasprivilege : *mut windows_core::BOOL) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
CheckGamingPrivilegeSilentlyForUser(user.param().abi(), privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), &mut result__).map(|| core::mem::transmute(result__))
CheckGamingPrivilegeSilentlyForUser(user.param().abi(), privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), &mut result__).map(|| result__)
}
}
#[inline]
Expand All @@ -35,23 +35,23 @@ pub unsafe fn GetExpandedResourceExclusiveCpuCount() -> windows_core::Result<u32
windows_link::link!("api-ms-win-gaming-expandedresources-l1-1-0.dll" "system" fn GetExpandedResourceExclusiveCpuCount(exclusivecpucount : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
GetExpandedResourceExclusiveCpuCount(&mut result__).map(|| core::mem::transmute(result__))
GetExpandedResourceExclusiveCpuCount(&mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn GetGamingDeviceModelInformation() -> windows_core::Result<GAMING_DEVICE_MODEL_INFORMATION> {
windows_link::link!("api-ms-win-gaming-deviceinformation-l1-1-0.dll" "system" fn GetGamingDeviceModelInformation(information : *mut GAMING_DEVICE_MODEL_INFORMATION) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
GetGamingDeviceModelInformation(&mut result__).map(|| core::mem::transmute(result__))
GetGamingDeviceModelInformation(&mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn HasExpandedResources() -> windows_core::Result<windows_core::BOOL> {
windows_link::link!("api-ms-win-gaming-expandedresources-l1-1-0.dll" "system" fn HasExpandedResources(hasexpandedresources : *mut windows_core::BOOL) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
HasExpandedResources(&mut result__).map(|| core::mem::transmute(result__))
HasExpandedResources(&mut result__).map(|| result__)
}
}
#[inline]
Expand Down
6 changes: 3 additions & 3 deletions crates/libs/windows/src/Windows/Win32/Globalization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ where
windows_link::link!("bcp47mrm.dll" "system" fn GetDistanceOfClosestLanguageInList(pszlanguage : windows_core::PCWSTR, pszlanguageslist : windows_core::PCWSTR, wchlistdelimiter : u16, pclosestdistance : *mut f64) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
GetDistanceOfClosestLanguageInList(pszlanguage.param().abi(), pszlanguageslist.param().abi(), wchlistdelimiter, &mut result__).map(|| core::mem::transmute(result__))
GetDistanceOfClosestLanguageInList(pszlanguage.param().abi(), pszlanguageslist.param().abi(), wchlistdelimiter, &mut result__).map(|| result__)
}
}
#[inline]
Expand Down Expand Up @@ -912,7 +912,7 @@ pub unsafe fn ScriptRecordDigitSubstitution(locale: u32) -> windows_core::Result
windows_link::link!("usp10.dll" "system" fn ScriptRecordDigitSubstitution(locale : u32, psds : *mut SCRIPT_DIGITSUBSTITUTE) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
ScriptRecordDigitSubstitution(locale, &mut result__).map(|| core::mem::transmute(result__))
ScriptRecordDigitSubstitution(locale, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Graphics_Gdi")]
Expand Down Expand Up @@ -944,7 +944,7 @@ pub unsafe fn ScriptStringCPtoX(ssa: *const core::ffi::c_void, icp: i32, ftraili
windows_link::link!("usp10.dll" "system" fn ScriptStringCPtoX(ssa : *const core::ffi::c_void, icp : i32, ftrailing : windows_core::BOOL, px : *mut i32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
ScriptStringCPtoX(ssa, icp, ftrailing.into(), &mut result__).map(|| core::mem::transmute(result__))
ScriptStringCPtoX(ssa, icp, ftrailing.into(), &mut result__).map(|| result__)
}
}
#[inline]
Expand Down
Loading

0 comments on commit ff1878c

Please sign in to comment.