microsoft / win32metadata

Tooling to generate metadata for Win32 APIs in the Windows SDK.
Other
1.34k stars 119 forks source link

CoRevokeDeviceCatalog not mapped to correct library #1928

Open riverar opened 5 months ago

riverar commented 5 months ago

CoRevokeDeviceCatalog lives in combase, not ole32.

C:\Windows\System32>dumpbin /exports combase.dll | findstr /i CoRevoke
        307   76 00108940 CoRevokeClassObject
        308   77 001B6BF0 CoRevokeConsoleHandles
        309   78 001EFD40 CoRevokeDeviceCatalog
        310   79 00121BC0 CoRevokeInitializeSpy
        311   7A 001B4250 CoRevokeMallocSpy
        312   7B 001B6C20 CoRevokeRacActivationToken

C:\Windows\System32>dumpbin /exports ole32.dll | findstr /i CoRevoke
        954   7F          CoRevokeClassObject (forwarded to api-ms-win-core-com-l1-1-0.CoRevokeClassObject)
        955   80          CoRevokeInitializeSpy (forwarded to api-ms-win-core-com-private-l1-1-1.CoRevokeInitializeSpy)
        956   81          CoRevokeMallocSpy (forwarded to api-ms-win-core-com-private-l1-1-1.CoRevokeMallocSpy)

Will investigate testing the entire mappings list shortly.

ChrisDenton commented 5 months ago

OneCore.Lib, OneCoreUAP.Lib and windowscoreheadless.Lib do list CoRevokeDeviceCatalog as being exported from ole32.dll. Other libs use the apiset api-ms-win-core-com-l1-1-3.dll (that is mincore.lib, mmos.lib, OneCoreUAP_apiset.Lib, OneCore_apiset.Lib, windowscoreheadless_apiset.Lib).

riverar commented 5 months ago

22621 SDK (onecoreuap.lib)

  DLL name     : ole32.dll
  Symbol name  : CoRevokeDeviceCatalog

26100 SDK (onecoreuap.lib)

  DLL name     : api-ms-win-core-com-l1-1-3.dll
  Symbol name  : CoRevokeDeviceCatalog
kennykerr commented 5 months ago

Those libs appear to be wrong. I only see it in combase.dll

kennykerr commented 5 months ago

https://github.com/microsoft/windows-rs/compare/check-imports?expand=1

Some of these may be false positives but there's clearly a problem with the authenticity of many functions in the Win32 metadata.

function not found: advapi32.dll.OpenTraceFromBufferStream
function not found: advapi32.dll.OpenTraceFromFile
function not found: advapi32.dll.OpenTraceFromRealTimeLogger
function not found: advapi32.dll.OpenTraceFromRealTimeLoggerWithAllocationOptions
function not found: advapi32.dll.ProcessTraceAddBufferToBufferStream
function not found: advapi32.dll.ProcessTraceBufferDecrementReference
function not found: advapi32.dll.ProcessTraceBufferIncrementReference
function not found: api-ms-win-core-util-l1-1-1.dll.DecodeRemotePointer
function not found: api-ms-win-core-util-l1-1-1.dll.EncodeRemotePointer
function not found: bcryptprimitives.dll.SystemPrng
library not found: certadm.dll
library not found: clfs.sys
function not found: comctl32.dll.DPA_GetSize
function not found: comctl32.dll.DSA_Clone
function not found: comctl32.dll.DSA_GetSize
function not found: comctl32.dll.DSA_Sort
function not found: comctl32.dll.DrawShadowText
function not found: comctl32.dll.GetWindowSubclass
function not found: comctl32.dll.HIMAGELIST_QueryInterface
function not found: comctl32.dll.ImageList_CoCreateInstance
function not found: comctl32.dll.ImageList_ReadEx
function not found: comctl32.dll.ImageList_WriteEx
function not found: comctl32.dll.LoadIconMetric
function not found: comctl32.dll.LoadIconWithScaleDown
function not found: comctl32.dll.TaskDialog
function not found: comctl32.dll.TaskDialogIndirect
library not found: d3dcsx.dll
library not found: dflayout.dll
library not found: drt.dll
library not found: drtprov.dll
library not found: drttransport.dll
library not found: dxcompiler.dll
library not found: fltmgr.sys
library not found: fwpkclnt.sys
library not found: fxsutility.dll
function not found: gdi32.dll.D3DKMTChangeSurfacePointer
function not found: hal.dll.HalAcquireDisplayOwnership
function not found: hal.dll.HalAllocateAdapterChannel
function not found: hal.dll.HalAllocateCommonBuffer
function not found: hal.dll.HalAllocateCrashDumpRegisters
function not found: hal.dll.HalAllocateHardwareCounters
function not found: hal.dll.HalAssignSlotResources
function not found: hal.dll.HalBugCheckSystem
function not found: hal.dll.HalDmaAllocateCrashDumpRegistersEx
function not found: hal.dll.HalDmaFreeCrashDumpRegistersEx
function not found: hal.dll.HalFreeCommonBuffer
function not found: hal.dll.HalFreeHardwareCounters
function not found: hal.dll.HalGetAdapter
function not found: hal.dll.HalGetBusData
function not found: hal.dll.HalGetBusDataByOffset
function not found: hal.dll.HalGetInterruptVector
function not found: hal.dll.HalMakeBeep
function not found: hal.dll.HalReadDmaCounter
function not found: hal.dll.HalSetBusData
function not found: hal.dll.HalSetBusDataByOffset
function not found: hal.dll.HalTranslateBusAddress
function not found: hal.dll.IoFlushAdapterBuffers
function not found: hal.dll.IoFreeAdapterChannel
function not found: hal.dll.IoFreeMapRegisters
function not found: hal.dll.IoMapTransfer
function not found: hal.dll.KeFlushWriteBuffer
function not found: hal.dll.KeQueryPerformanceCounter
function not found: hal.dll.KeStallExecutionProcessor
function not found: ieframe.dll.IEGetWriteableLowHKCU
library not found: infocardapi.dll
library not found: isolatedwindowsenvironmentutils.dll
function not found: kernel32.dll.CheckIsMSIXPackage
function not found: kernel32.dll.GetCurrentPackageInfo3
function not found: kernel32.dll.GetSystemLeapSecondInformation
function not found: kernel32.dll.RestoreThreadPreferredUILanguages
function not found: kernel32.dll.RtlCaptureContext2
function not found: kernel32.dll.SetThreadPreferredUILanguages2
library not found: ksecdd.sys
library not found: mqrt.dll
library not found: mrmsupport.dll
library not found: msajapi.dll
function not found: mscoree.dll.CorLaunchApplication
function not found: mscoree.dll.GetCLRIdentityManager
library not found: ndis.sys
library not found: netsh.dll
library not found: ntdllk.dll
function not found: offreg.dll.ORShutdown
function not found: offreg.dll.ORStart
function not found: ole32.dll.CoRegisterDeviceCatalog
function not found: ole32.dll.CoRevokeDeviceCatalog
library not found: opmxbox.dll
library not found: p2p.dll
library not found: p2pgraph.dll
library not found: projectedfslib.dll
library not found: pshed.dll
library not found: rpcproxy.dll
function not found: shlwapi.dll.SHGlobalCounterDecrement
function not found: shlwapi.dll.SHGlobalCounterGetValue
function not found: shlwapi.dll.SHGlobalCounterIncrement
library not found: ualapi.dll
library not found: vmsavedstatedumpprovider.dll
library not found: wdsbp.dll
library not found: wdsclientapi.dll
library not found: wdsmc.dll
library not found: wdspxe.dll
library not found: wdstptc.dll
function not found: windows.ui.xaml.dll.InitializeXamlDiagnostic
library not found: winfax.dll
function not found: wininet.dll.DoConnectoidsExist
function not found: wininet.dll.ExportCookieFileA
function not found: wininet.dll.ExportCookieFileW
function not found: wininet.dll.FindP3PPolicySymbol
function not found: wininet.dll.GetDiskInfoA
function not found: wininet.dll.HttpCheckDavComplianceA
function not found: wininet.dll.HttpCheckDavComplianceW
function not found: wininet.dll.ImportCookieFileA
function not found: wininet.dll.ImportCookieFileW
function not found: wininet.dll.InternalInternetGetCookie
function not found: wininet.dll.IsDomainLegalCookieDomainA
function not found: wininet.dll.IsDomainLegalCookieDomainW
function not found: wininet.dll.IsProfilesEnabled
function not found: wininet.dll.PerformOperationOverUrlCacheA
function not found: wininet.dll.ReadGuidsForConnectedNetworks
function not found: winspool.drv.RouterFreeBidiResponseContainer
function not found: wlanapi.dll.WlanConnect2
library not found: wnvapi.dll
mikebattista commented 5 months ago

22621 SDK (onecoreuap.lib)

  DLL name     : ole32.dll
  Symbol name  : CoRevokeDeviceCatalog

26100 SDK (onecoreuap.lib)

  DLL name     : api-ms-win-core-com-l1-1-3.dll
  Symbol name  : CoRevokeDeviceCatalog

Looks like things may have changed with the latest SDK released a few weeks back. I can update to the latest SDK and see if that improves things.

mikebattista commented 5 months ago

The new SDK didn't help with the exports and also the Hypervisor headers were changed to add AMD64 conditionals which requires some changes. It's confusing the cross-arch build of the partition and needs to be investigated.

mikebattista commented 5 months ago

Is it just this one function blocking your update or are there others?