#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcMacSetYieldInfo(
MACYIELDCALLBACK pfnCallback
);
The RpcMacSetYieldInfo function configures Macintosh client applications to yield to other applications during remote procedure calls.
If a yielding function is not registered, an RPC will not yield on the Mac. Register a yielding function by calling RpcMacSetYieldInfo.
The yielding function must yield until *pStatus is not equal to 1. For example:
void RPC_ENTRY MacCallbackFunc (short *pStatus)
{
MSG msg;
while (*pStatus == 1)
{
if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
}
Note that rpc.h must be included before winerror.h (or any files that include it, such as winbase.h, windows.h, and so on).
Value | Meaning |
---|---|
RPC_S_OK | The information was set successfully. |
Windows CE: Unsupported.
Import Library: Link with rpcrt4.lib.