Microsoft Windows CE 3.0  

XXX_Open

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function opens a device for reading and/or writing. An application indirectly invokes this function when it calls CreateFileto open special device file names.

DWORD

XXX_Open(
DWORD
hDeviceContext, 
DWORD
AccessCode, 
DWORD
ShareMode
);

Parameters

hDeviceContext
Handle to the device context. The XXX_Initfunction creates and returns this handle.
AccessCode
Specifies the requested access code of the device. The access is a combination of read and write.
ShareMode
Specifies the requested file share mode of the PC Card device. The share mode is a combination of file read and write sharing.

Return Values

This function returns a handle that identifies the open context of the device to the calling application. If your device can be opened multiple times, use this handle to identify each open context. This identifier is passed into the XXX_Read, XXX_Write, XXX_Seek, and XXX_IOControlfunctions. If the device cannot be opened, this function returns NULL.

Remarks

When this function is called, your device should allocate the resources that it needs for each open context and prepare for operation. This might involve preparing the device for reading or writing and initializing data structures it uses for operation.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later      
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.


 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.