The IWiaMiniDrv::drvInitializeWia method initializes the minidriver and builds the driver item tree representing the device.
HRESULT drvInitializeWia( BYTE *__MIDL__IWiaMiniDrv0000, LONG __MIDL__IWiaMiniDrv0001, BSTR __MIDL__IWiaMiniDrv0002, BSTR __MIDL__IWiaMiniDrv0003, IUnknown *__MIDL__IWiaMiniDrv0004, IUnknown *__MIDL__IWiaMiniDrv0005, IWiaDrvItem **__MIDL__IWiaMiniDrv0006, IUnknown **__MIDL__IWiaMiniDrv0007, LONG *__MIDL__IWiaMiniDrv0008 );
- Specifies a string containing the device's unique identifier.
- Specifies a string containing the full name of the root item.
- Is reserved. Set to zero.
pIUnknownOuter [in, optional]
- (Optional) Points to a memory location that can receive the address of an IUnknown interface.
pStiDevice [in, optional]
- Points to an IStiDevice COM Interface.
- Pointer to a WIA item context.
- Points to a memory location that will receive a status code for this method. If this method returns S_OK, the value stored will be zero. Otherwise, a minidriver-specific error code will be stored at the location pointed to by this parameter.
ppIDrvItemRoot [out, optional]
- Points to a memory location that will receive the address of a IWiaDrvItem Interface, the interface of the root item.
ppIUnknownInner [out, optional]
- (Optional) Points to a memory location that can receive the address of an IUnknown interface. If the minidriver has functionality that is not accessible through the IWiaMiniDrv interface, the vendor can create a separate interface on the minidriver. This parameter provides access to that functionality.
On success, the method should return S_OK and clear the device error value pointed to by plDevErrVal. If the method fails, it should return a standard COM error code and place a minidriver-specific error code value in the memory pointed to by plDevErrVal.
The value pointed to by plDevErrVal can be converted to a string by calling IWiaMiniDrv::drvGetDeviceErrorStr.
This method should initialize any private structures and create the driver item tree. For detailed information about the steps that minidrivers typically perform in this method, see Initializing the WIA Minidriver and Creating the WIA Driver Item Tree.
The WIA service calls the IWiaMiniDrv::drvInitializeWia method in response to a client's call to the CreateDevice function, which means that this method is called once for each new client connection.
For example, if the user right-clicks a WIA scanner icon in My Computer, the shell calls CreateDevice, which generates a call to the minidriver's IWiaMiniDrv::drvInitializeWia method. If the user then runs the WIA Acquisition Wizard, it also calls CreateDevice. Each time that CreateDevice is called, there is a corresponding call to the IWiaMiniDrv::drvInitializeWia method on the minidriver.
|Header||wiamindr_lh.h (include Wiamindr.h)|