c - 如何获取 Microsoft WIndowsCE `SetEvent` 函数的序数值?

标签 c windows winapi windows-ce

我正在尝试制作一个 Shim 应用程序,它可以通知我何时何地调用 SetEvent 函数。要制作这个 shim 应用程序,我需要将我的自定义 API 注册到 的序号shim.def 中的 Setevent 函数。

下面是我的 def 文件的示例,其中左边是 API 名称,右边是 Microsoft 的标准序号

APIHook_CeSetUserNotification               @473
APIHook_CeSetUserNotificationEx             @1352
APIHook_CreateProcessW                      @493
APIHook_SetTimeZoneInformation              @28
QueryShimInfo                               @7
APIHook_SetEventData                        @1528

请告诉我如何获得 SetEvent() 的序数值?

最佳答案

在 Windows CE 上,SetEvent 在 header 中的定义如下:

_inline BOOL SetEvent(HANDLE h) {
    return EventModify(h,EVENT_SET);
}

所以你需要 Hook coredll.dll中的EventModify

你会发现序数使用:

dumpbin  /EXPORTS  coredll.dll

或者,您也可以在 CE sdk 的 coredll.def 文件中找到序号:

EventModify=xxx_EventModify @494

关于c - 如何获取 Microsoft WIndowsCE `SetEvent` 函数的序数值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34791082/

相关文章:

c++ - 当窗口设置为事件时获取通知

c - 使用 fscanf 和 while 循环来存储 char 和 int

c - -gc-sections 丢弃使用过的数据

c - 在C中反转条形图的方向

c++ - 在 ring0/kernel 中列出驱动程序?

windows - Windows中将csv导入到hdfs时出错

python - 如何使用 "Client name:"从 python 脚本获取 perforce 工作区的 "p4 info"?

c++ - 断开/连接设备时 WM_DEVICECHANGE 出现两次

c - 无法将信息写入线性链表

c++ - 如何在同一容器(C++)中显示来自不同应用程序的用户界面?