Поделиться через


CCmdTarget::IsResultExpected

Use IsResultExpected to ascertain whether a client expects a return value from its call to an automation function.

BOOL IsResultExpected( );

Возвращаемое значение

Nonzero if an automation function should return a value; otherwise 0.

Заметки

The OLE interface supplies information to MFC about whether the client is using or ignoring the result of a function call, and MFC in turn uses this information to determine the result of a call to IsResultExpected. If production of a return value is time- or resource-intensive, you can increase efficiency by calling this function before computing the return value.

This function returns 0 only once so that you will get valid return values from other automation functions if you call them from the automation function that the client has called.

IsResultExpected returns a nonzero value if called when an automation function call is not in progress.

Требования

Header: afxwin.h

См. также

Основные понятия

CCmdTarget Class

CCmdTarget Members

Hierarchy Chart

CCmdTarget::GetIDispatch

CCmdTarget::EnableAutomation