ReactOS 0.4.16-dev-1401-gf1332c7
autodial.c File Reference
#include "precomp.h"
#include <ndk/iofuncs.h>
#include <ndk/rtltypes.h>
Include dependency graph for autodial.c:

Go to the source code of this file.

Functions

BOOLEAN WINAPI AcsHlpSendCommand (IN PAUTODIAL_COMMAND Command)
 
BOOLEAN WINAPI AcsHlpAttemptConnection (IN PAUTODIAL_ADDR ConnectionAddress)
 
BOOLEAN WINAPI AcsHlpNoteNewConnection (IN PAUTODIAL_ADDR ConnectionAddress, IN PAUTODIAL_CONN Connection)
 

Function Documentation

◆ AcsHlpAttemptConnection()

BOOLEAN WINAPI AcsHlpAttemptConnection ( IN PAUTODIAL_ADDR  ConnectionAddress)

Definition at line 89 of file autodial.c.

90{
92
93 /* Clear the command packet */
95
96 /* Copy the address into the command packet */
97 RtlCopyMemory(&Command.Address, ConnectionAddress, sizeof(AUTODIAL_ADDR));
98
99 /* Send it to the driver */
100 return AcsHlpSendCommand(&Command);
101}
BOOLEAN WINAPI AcsHlpSendCommand(IN PAUTODIAL_COMMAND Command)
Definition: autodial.c:17
Definition: shell.h:41
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by WSAttemptAutodialAddr(), and WSAttemptAutodialName().

◆ AcsHlpNoteNewConnection()

BOOLEAN WINAPI AcsHlpNoteNewConnection ( IN PAUTODIAL_ADDR  ConnectionAddress,
IN PAUTODIAL_CONN  Connection 
)

Definition at line 108 of file autodial.c.

110{
112
113 /* Copy the address into the command packet */
114 RtlCopyMemory(&Command.Address, ConnectionAddress, sizeof(AUTODIAL_ADDR));
115
116 /* Set the New Connection flag and copy the connection data */
117 Command.NewConnection = TRUE;
118 RtlCopyMemory(&Command.Connection, Connection, sizeof(AUTODIAL_CONN));
119
120 /* Send it to the driver */
121 return AcsHlpSendCommand(&Command);
122}
#define TRUE
Definition: types.h:120

Referenced by WSNoteSuccessfulHostentLookup().

◆ AcsHlpSendCommand()

BOOLEAN WINAPI AcsHlpSendCommand ( IN PAUTODIAL_COMMAND  Command)

Definition at line 17 of file autodial.c.

18{
19 UNICODE_STRING DriverName = RTL_CONSTANT_STRING(L"\\Device\\RasAcd");
25
26 /* Initialize the object attributes */
28 &DriverName,
30 NULL,
31 NULL);
32
33 /* Open a handle to it */
38 NULL,
42 0,
43 NULL,
44 0);
45 if (!NT_SUCCESS(Status)) return FALSE;
46
47 /* Create an event */
49 if (!EventHandle)
50 {
51 /* Event failed, fail us */
53 return FALSE;
54 }
55
56 /* Connect to the driver */
59 NULL,
60 NULL,
63 Command,
64 sizeof(AUTODIAL_COMMAND),
65 NULL,
66 0);
67
68 /* Check if we need to wait */
70 {
71 /* Wait for the driver */
73
74 /* Update status */
76 }
77
78 /* Close handles and return */
81 return NT_SUCCESS(Status);
82}
static NDIS_HANDLE DriverHandle
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define STATUS_PENDING
Definition: d3dkmdt.h:43
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define CloseHandle
Definition: compat.h:739
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define FILE_SHARE_READ
Definition: compat.h:136
#define IOCTL_ACD_CONNECT_ADDRESS
Definition: precomp.h:34
#define L(x)
Definition: resources.c:13
#define INFINITE
Definition: serial.h:102
#define FILE_OPEN_IF
Definition: from_kernel.h:56
Status
Definition: gdiplustypes.h:25
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_WRITE_DATA
Definition: nt_native.h:631
#define FILE_READ_DATA
Definition: nt_native.h:628
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
NTSTATUS NTAPI NtCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define CreateEvent
Definition: winbase.h:3789
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:857

Referenced by AcsHlpAttemptConnection(), and AcsHlpNoteNewConnection().