Windows Vista/Windows 2008 Server新增API一览

    随着Windows Vista和Windows 2008 Server的推出,一堆新的Windows  API也随之出现,为了方便查找,将新增的API列在这儿(应该不全,希望大家补充)。从新增的API功能来看,主要的亮点有以下几个:
    (1)对文件和注册表操作的事务性支持,这是通过KTM(Kernel Transaction Manager)实现的;
    (2)同步机制和原语的增强:读写锁(SRW:Slim Reader/Writer (SRW) Locks)和条件变量(CV:Condition Variables);
    (3)线程池的增强(Thread Pool);
    (4)对NUMA(non-uniform memory access:非一致性内存访问)的支持;
    (5)对应用程序重启恢复的支持(ARR:Application Recovery and Restart);

    以下就是我整理的新增API一览表:

    AcquireSRWLockExclusive
    AcquireSRWLockShared
    *AddClipboardFormatListener
    AddMandatoryAce
    AddSIDToBoundaryDescriptor
    AllocateUserPhysicalPagesNuma
    ApplicationRecoveryFinished
    ApplicationRecoveryInProgress
    CallbackMayRunLong
    CancelIoEx
    CancelSynchronousIo
    CancelThreadpoolIo
    ChangeWindowMessageFilter
    ClosePrivateNamespace
    CloseThreadpool
    CloseThreadpoolCleanupGroup
    CloseThreadpoolCleanupGroupMembers
    CloseThreadpoolIo
    CloseThreadpoolTimer
    CloseThreadpoolWait
    CloseThreadpoolWork
    ControlServiceEx
    CopyFileTransacted
    CreateBoundaryDescriptor
    CreateDesktopEx
    CreateDirectoryTransacted
    CreateEventEx
    CreateFileMappingNuma
    CreateFileTransacted
    CreateHardLinkTransacted
    CreateMutexEx
    CreatePrivateNamespace
    CreateSemaphoreEx
    CreateSymbolicLink
    CreateSymbolicLinkTransacted
    CreateThreadpool
    CreateThreadpoolCleanupGroup
    CreateThreadpoolIo
    CreateThreadpoolTimer
    CreateThreadpoolWait
    CreateThreadpoolWork
    CreateWaitableTimerEx
    DeleteBoundaryDescriptor
    DeleteFileTransacted
    DeleteProcThreadAttributeList
    DisassociateCurrentThreadFromCallback
    ×EnumCalendarInfoExEx
    ×EnumDateFormatsExEx
    ×EnumDateFormatsProcExEx
    EnumProcessModulesEx
    EnumResourceLanguagesEx
    EnumResourceNamesEx
    EnumResourceTypesEx
    ×EnumSystemLocalesEx
    ×EnumTimeFormatsEx
    ×EnumTimeFormatsProcEx
    FindFirstFileNameTransactedW
    FindFirstFileNameW
    FindFirstFileTransacted
    FindNextFileNameW
    FlushProcessWriteBuffers
    FreeLibraryWhenCallbackReturns
    GetApplicationRecoveryCallback
    GetApplicationRestartSettings
    ×GetCalendarInfoEx
    GetCompressedFileSizeTransacted
    GetConsoleHistoryInfo
    GetConsoleOriginalTitle
    GetConsoleScreenBufferInfoEx
    ×GetCurrencyFormatEx
    GetCurrentConsoleFontEx
    ×GetDateFormatEx
    ×GetDurationFormat
    ×GetDurationFormatEx
    GetDynamicTimeZoneInformation
    GetErrorMode
    GetFileAttributesTransacted
    GetFileBandwidthReservation
    GetFileInformationByHandleEx
    *GetFileVersionInfoEx
    *GetFileVersionInfoSizeEx
    GetFinalPathNameByHandle
    GetFullPathNameTransacted
    GetIconInfoEx
    *GetLocaleInfoEx
    GetLongPathNameTransacted
    GetNamedPipeAttribute
    GetNamedPipeClientComputerName
    GetNamedPipeClientProcessId
    GetNamedPipeClientSessionId
    GetNamedPipeServerProcessId
    GetNamedPipeServerSessionId
    *GetNLSVersionEx
    GetNumaProximityNode
    *GetNumberFormatEx
    GetPhysicalCursorPos
    GetProductInfo
    GetQueuedCompletionStatusEx
    *GetStringScripts
    *GetSystemDefaultLocaleName
    GetTickCount64
    GetTimeFormatEx
    GetUpdatedClipboardFormats
    *GetUserDefaultLocaleName
    GetVolumeInformationByHandleW
    *IdnToAscii
    *IdnToNameprepUnicode
    *IdnToUnicode
    InitOnceBeginInitialize
    InitOnceComplete
    InitOnceExecuteOnce
    InitOnceInitialize
    InitializeConditionVariable
    InitializeCriticalSectionEx
    InitializeProcThreadAttributeList
    InitializeSRWLock
    InitiateShutdown
    *IsNormalizedString
    IsProcessDPIAware
    IsThreadAFiber
    IsThreadpoolTimerSet
    *IsValidLocaleName
    *LCIDToLocaleName
    *LCMapStringEx
    LeaveCriticalSectionWhenCallbackReturns
    *LocaleNameToLCID
    LogicalToPhysicalPoint
    MapViewOfFileExNuma
    MoveFileTransacted
    *NormalizeString
    NotifyServiceStatusChange
    OpenFileById
    OpenPrivateNamespace
    PdhAddEnglishCounter
    PdhCollectQueryDataWithTime
    PdhValidatePathEx
    PhysicalToLogicalPoint
    QueryActCtxSettingsW
    QueryFullProcessImageName
    QueryIdleProcessorCycleTime
    QueryProcessCycleTime
    QuerySecurityAccessMask
    QueryThreadCycleTime
    RegCopyTree
    RegCreateKeyTransacted
    RegDeleteKeyTransacted
    RegDeleteKeyValue
    RegDeleteTree
    RegDisablePredefinedCacheEx
    RegisterApplicationRecoveryCallback
    RegisterApplicationRestart
    RegisterPowerSettingNotification
    RegLoadAppKey
    RegLoadMUIString
    RegOpenKeyTransacted
    RegSetKeyValue
    ReleaseMutexWhenCallbackReturns
    ReleaseSRWLockExclusive
    ReleaseSRWLockShared
    ReleaseSemaphoreWhenCallbackReturns
    RemoveClipboardFormatListener
    RemoveDirectoryTransacted
    SetConsoleHistoryInfo
    SetConsoleScreenBufferInfoEx
    SetCurrentConsoleFontEx
    SetDynamicTimeZoneInformation
    SetEventWhenCallbackReturns
    SetFileAttributesTransacted
    SetFileBandwidthReservation
    SetFileCompletionNotificationModes
    SetFileInformationByHandle
    SetFileIoOverlappedRange
    SetPhysicalCursorPos
    SetProcessDPIAware
    SetSecurityAccessMask
    SetThreadpoolThreadMaximum
    SetThreadpoolThreadMinimum
    SetThreadpoolTimer
    SetThreadpoolWait
    SHAddDefaultPropertiesByExt
    SHAssocEnumHandlers
    SHBindToFolderIDListParent
    SHBindToFolderIDListParentEx
    SHBindToObject
    SHChangeNotifyRegisterThread
    SHCreateAssociationRegistration
    SHCreateDataObject
    SHCreateDefaultContextMenu
    SHCreateDefaultExtractIcon
    SHCreateDefaultPropertiesOp
    SHCreateItemFromIDList
    SHCreateItemFromParsingName
    SHCreateItemFromRelativeName
    SHCreateItemInKnownFolder
    SHCreateItemWithParent
    SHCreateShellItemArray
    SHCreateShellItemArrayFromDataObject
    SHCreateShellItemArrayFromIDLists
    SHCreateShellItemArrayFromShellItem
    SHEvaluateSystemCommandTemplate
    SHGetControlPanelPath
    SHGetDriveMedia
    SHGetIDListFromObject
    SHGetKnownFolderIDList
    SHGetKnownFolderPath
    SHGetLocalizedName
    SHGetNameFromIDList
    SHGetNameFromPropertyKey
    SHGetPathFromIDListEx
    SHGetPropertyStoreFromIDList
    SHGetPropertyStoreFromParsingName
    SHGetStockIconInfo
    SHGetTemporaryPropertyForItem
    SHLocalStrDup
    SHOpenWithDialog
    SHQueryUserNotificationState
    SHRegGetBoolValueFromHKCUHKLM
    SHRegGetValueFromHKCUHKLM
    SHRemoveLocalizedName
    SHSetDefaultProperties
    SHSetKnownFolderPath
    SHSetTemporaryPropertyForItem
    ShutdownBlockReasonCreate
    ShutdownBlockReasonDestroy
    ShutdownBlockReasonQuery
    SleepConditionVariableCS
    SleepConditionVariableSRW
    StartThreadpoolIo
    SubmitThreadpoolWork
    TrySubmitThreadpoolCallback
    UnregisterApplicationRecoveryCallback
    UnregisterApplicationRestart
    UnregisterPowerSettingNotification
    UpdateProcThreadAttribute
    UpdateLayeredWindowIndirect
    VerifyScripts
    VirtualAllocExNuma
    WaitForThreadpoolIoCallbacks
    WaitForThreadpoolTimerCallbacks
    WaitForThreadpoolWaitCallbacks
    WaitForThreadpoolWorkCallbacks
    WakeAllConditionVariable
    WakeConditionVariable
    WindowFromPhysicalPoint
    Wow64GetThreadContext
    Wow64SetThreadContext
    Wow64SuspendThread
前言: 最近学Windows shell外壳,偶然发现了SHChangeNotifyRegister这个神奇的函数,于是便用它写了个例程。 本帖不少思想来自帖子:未公开Windows API SHChangeNotifyRegister实现文件监控 基本介绍: 在Windows实现文件监控有三种方法,第一种是“虚拟文件系统驱动”方法,如windows 下的filemon,网上有很多关于他的分析。第二种方法是“HOOK API”方法,钩子技术。第三种方法是“消息机制”,从windows的文件通知消息获取系统的文件操作。但是这是文件操作完成以后,才通知的。所以只能进行监视监视,不能进行完全的控制。而消息机制当中,也有三种方法,(1)通过使用“未公开API SHChangeNotifyRegister 实现”;(2)通过 FindFirstChangeNotification 实现;(3)通过 ReadDirectoryChangesW 实现。第(2)(3)种方法只能针对一个在指定目录或子目录下发生的更改符合过滤条件时,进行监视。 而现在,易语言 中大部分消息机制监视文件使用FindFirstChangeNotification或ReadDirectoryChangesW + 线程实现的(例如:文件监控精灵 - 监控目录文件新建删除重命名修改 ),该方法效率较低,而且如果很多文件在短时间内发生变更,则有可能会丢失部分通知,且监视的文件信息有限,所以,我写了一份使用SHChangeNotifyRegister来监视文件的例程。 特性: 代码几乎是全注释,清晰明了: 程序很多命令和常量是翻译自MSDN,规范程度高: 监视多种消息(比如USB接口信息),很多问题一个命令即可解决:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值