QueueUserAPC function

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

Syntax

C++

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++

PAPCFUNC Papcfunc;

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

Parameters

Parameter

Return Value

This function does not return a value.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • bochs compile 编译

    The standard compile uses the configure script, but the Windows platform cannot ...

    战神伽罗
  • vscode 调试python内置库断不下来的问题

    The Python extension supports debugging of a number of types of Python applicati...

    战神伽罗
  • PsSetCreateProcessNotifyRoutineEx STATUS_ACCESS_DENIED IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY

    PsSetCreateProcessNotifyRoutineEx 返回 STATUS_ACCESS_DENIED(0xC0000022L,即‭-1073741...

    战神伽罗
  • SAP CRM中间件错误IB_CRM_UPLOAD_MSG的解决方法

    I have one parent equipment ZJERRY0827P which contains a children equipment ZJER...

    Jerry Wang
  • 原 微服务Spring Cloud Eur

    斯武丶风晴
  • making Task<T> awaitable

    Eduasync part 5: making Task<T> awaitable In part 3 we looked at what the C# 5 c...

    阿新
  • wgpu-rs on the web

    gfx-rs is a Rust project aiming to make low-level GPU programming portable with ...

    仇诺伊
  • Schedule tasks on L

    By default cron saves the output in the user's mailbox (root in this case) on th...

    py3study
  • python socket.recv(

    感觉很是奇怪,自己没有去设置阻塞模式,也就是默认的阻塞模式,为什么不阻塞在那里,而是要一直收到空呢?

    py3study
  • 控制动态学习排名中的公平和偏差(CS IR)

    排名是许多在线平台将用户与物品(如新闻、产品、音乐、视频)进行匹配的主要界面。在这些两面性市场中,不仅用户从排名中汲取效用,而且排名也决定了物品提供者(如出版商...

    刘持诚

扫码关注云+社区

领取腾讯云代金券