前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >QueueUserAPC function

QueueUserAPC function

作者头像
战神伽罗
发布2019-11-04 11:18:44
1.1K0
发布2019-11-04 11:18:44
举报

Adds a user-mode asynchronous procedure call (APC) object to the APC queue of the specified thread.

Syntax

C++

代码语言:javascript
复制
DWORD QueueUserAPC(
  PAPCFUNC  pfnAPC,
  HANDLE    hThread,
  ULONG_PTR dwData
);

Parameters

pfnAPC

A pointer to the application-supplied APC function to be called when the specified thread performs an alertable wait operation. For more information, see APCProc.

hThread

A handle to the thread. The handle must have the THREAD_SET_CONTEXT access right. For more information, see Synchronization Object Security and Access Rights.

dwData

A single value that is passed to the APC function pointed to by the pfnAPC parameter.

Return Value

If the function succeeds, the return value is nonzero.

关于PAPCFUNC要用stdcall,

关于SleepEx(dwMilliseconds: DWORD; bAlertable: BOOL)如果QueueUserAPC会导致其立即返回而不再等待。

PAPCFUNC callback function

  • 2018/12/05
  • 2 分钟阅读时长

An application-defined completion routine. Specify this address when calling the QueueUserAPC function. The PAPCFUNC type defines a pointer to this callback function. APCProc is a placeholder for the application-defined function name.

Syntax

C++

代码语言:javascript
复制
PAPCFUNC Papcfunc;

void _stdcall Papcfunc(
  ULONG_PTR Parameter
)
{...}

Parameters

Parameter

Return Value

This function does not return a value.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Syntax
  • Parameters
  • Return Value
  • 关于PAPCFUNC要用stdcall,
  • 关于SleepEx(dwMilliseconds: DWORD; bAlertable: BOOL)如果QueueUserAPC会导致其立即返回而不再等待。
    • Syntax
      • Parameters
        • Return Value
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档