FreeRDP
|
#include <winpr/config.h>
#include <winpr/io.h>
#include "io.h"
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <winpr/crt.h>
#include <winpr/path.h>
#include <winpr/file.h>
Macros | |
#define | DEVICE_FILE_PREFIX_PATH "\\Device\\" |
Functions | |
static char * | GetDeviceFileNameWithoutPrefixA (LPCSTR lpName) |
static char * | GetDeviceFileUnixDomainSocketBaseFilePathA (void) |
static char * | GetDeviceFileUnixDomainSocketFilePathA (LPCSTR lpName) |
NTSTATUS | _IoCreateDeviceEx (PDRIVER_OBJECT_EX DriverObject, ULONG DeviceExtensionSize, PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType, ULONG DeviceCharacteristics, BOOLEAN Exclusive, PDEVICE_OBJECT_EX *DeviceObject) |
VOID | _IoDeleteDeviceEx (PDEVICE_OBJECT_EX DeviceObject) |
#define DEVICE_FILE_PREFIX_PATH "\\Device\\" |
WinPR: Windows Portable Runtime Asynchronous I/O Functions
Copyright 2012 Marc-Andre Moreau marca ndre .more au@g mail. com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. I/O Manager Routines http://msdn.microsoft.com/en-us/library/windows/hardware/ff551797/
These routines are only accessible to kernel drivers, but we need similar functionality in WinPR in user space.
This is a best effort non-conflicting port of this API meant for non-Windows, WinPR usage only.
References:
Device Objects and Device Stacks: http://msdn.microsoft.com/en-us/library/windows/hardware/ff543153/
Driver Development Part 1: Introduction to Drivers: http://www.codeproject.com/Articles/9504/Driver-Development-Part-1-Introduction-to-Drivers/
NTSTATUS _IoCreateDeviceEx | ( | PDRIVER_OBJECT_EX | DriverObject, |
ULONG | DeviceExtensionSize, | ||
PUNICODE_STRING | DeviceName, | ||
DEVICE_TYPE | DeviceType, | ||
ULONG | DeviceCharacteristics, | ||
BOOLEAN | Exclusive, | ||
PDEVICE_OBJECT_EX * | DeviceObject | ||
) |
IoCreateDevice: http://msdn.microsoft.com/en-us/library/windows/hardware/ff548397/
VOID _IoDeleteDeviceEx | ( | PDEVICE_OBJECT_EX | DeviceObject | ) |
|
static |
|
static |
|
static |