Resource Dispenser Requirements

A resource dispenser is a dynamic-link library (DLL) component which provides two interfaces. The first (IDispenserDriver) provides the holder with basic information on how to create, destroy, and enlist its own type of resources. The second is exposed to the application and can be either a COM interface or set of interfaces, or an application programming interface (API) to which a component is linked via an import library.

Resource dispensers manage non-durable shared state within a process. Although the resources managed may often be connections to a component managing a durable state, the connections themselves are not durable. A resource dispenser will often use a related resource manager to retain the durable state.

An application can call any resource dispenser, which in turn may offer any API to the application. A resource dispenser is instantiated when an application component refers to it. On start-up, a resource dispenser must register itself with DispMan.

A transactional resource dispenser must enlist in an MS DTC transaction. This implies use of either an internal or external (to the dispenser) resource manager that is OLE Transactions-compliant.