Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
COM
id
in
int
odl
out
ptr
ref
Expand Minimize

enable_allocate attribute

The [enable_allocate] ACF attribute specifies that the server stub code should enable the stub memory management environment.

Note  The [enable_allocate] attribute is obsolete and is no longer supported.

[
    enable_allocate
  [ , optional-attribute-list]
]
interface interface-name
{
    . . .
};

Parameters

optional-attribute-list

Specifies a list of zero or more additional MIDL attributes.

interface-name

The name of the interface to which the [enable_allcoate] attribute will be applied.

Remarks

In default mode, the server stub enables the memory environment only when the [enable_allocate] attribute is used. The memory management environment must be enabled before memory can be allocated using RpcSmAllocate. In osf mode (when you compile using the /osf switch), the stub enables this environment automatically, or on request when the [enable_allocate] attribute is used.

The client side stub may be sensitive to the Rpcss memory management environment. If a sensitive client stub is executed when the Rpcss package is disabled, the default user allocator/deallocators are called (for example, midl_user_allocate/ midl_user_free). When enabled, the Rpcss package uses the allocator/deallocator pair from the package. In the default mode, the client is sensitive only when the [enable_allocate] attribute is used. Typically, the client side stub operates in the disabled environment. In osf mode (when you compile using the /osf switch), the client is always sensitive to the Rpcss memory management environment and, therefore, the [enable_allocate] attribute will not affect the client stubs.

See also

Application Configuration File (ACF)
midl_user_allocate
midl_user_free
/osf
RpcSmDisableAllocate
RpcSmEnableAllocate
RpcSmFree

 

 

Community Additions

ADD
Show:
© 2015 Microsoft