CreateFile
Description:
Opens an ARCNET device. The function returns a handle that is used to access the device
Syntax:
Parameters:
Parameter | Description |
lpFileName | The name of ARCNET network controller to be opened. This name is build from prefix "\\.\" and device name that
is specified under RAW driver properties as "AccessName". Note: For SH ARCALYZER-PCMCIA this name is fixed to "SHARCALY" |
dwDesiredAccess | The requested access to the file or device, which can be summarized as read, write, both or neither zero). |
dwShareMode | The requested sharing mode of the file or device, which can be read, write, both or none
(see MSDN Library) for more details. Possible values:
|
lpSecurityAttributes | A pointer to a SECURITY_ATTRIBUTES structure that contains two separate but related data members: an optional security descriptor,
and a Boolean value that determines whether the returned handle can be inherited by child processes. This parameter can be NULL. |
dwCreationDisposition | An action to take on the device that exists or does not exist.
This value must be set to OPEN_EXISTING (3) |
dwFlagsAndAttributes | The device attributes and flags. Possible values:
|
hTemplateFile | A valid handle to a template file with the GENERIC_READ access right.
The template file supplies file attributes and extended attributes for the file that is being created. This parameter must be to NULL |
Return Value:
If the function succeeds, the return value is an open handle to the specified file, device, named pipe, or mail slot.
If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
Possible errors (see also Error codes ):
E_FARC_DRIVER_NOT_STARTED
Example:
Opening device with access name "FARC" in asynchron mode. Note, that the following example is only a fragment.
Back to Programming Guide | Contact | Copyright and Disclaimer |