notify

[notify] ... ;

Example

[notify] ProcedureFoo; 
 

Remarks

The notify attribute instructs the MIDL compiler to generate a server stub that contains a call to a specially-named procedure on the server side of the application. This procedure is called the notify procedure. It is called after all the output arguments have been marshalled and any memory associated with the parameters is freed.

The notify attribute is useful to develop applications acquiring resources in the server manager routine. These resources are then freed in the notify procedure after the output parameters are fully marshalled.

The notify procedure name is the name of the remote procedure suffixed by _notify. The notify procedure does not require any parameters and does not return a result. A prototype of this procedure is also generated in the header file. For example, if the IDL file contains the following:

ProcedureFoo [in] short S); 
 

Specify the following in the ACF for MIDL to generate the notify call:

[notify] ProcedureFoo(); 
 

The generated code will contain the following call to the notify procedure:

ProcedureFoo_notify(); 
 

The header file will contain a prototype:

HRESULT ProcedureFoo_notify(void); 
 

See Also

ACF