ReactOS 0.4.17-dev-684-ga6524ef
api.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: subsys/system/dhcp/api.c
5 * PURPOSE: DHCP client api handlers
6 * PROGRAMMER: arty
7 */
8
9#include <rosdhcp.h>
10
11#define NDEBUG
12#include <reactos/debug.h>
13
15
17
20}
21
24}
25
28}
29
32}
33
37 LPVOID lpParameter)
38{
40
41 Status = RpcServerUseProtseqEpW(L"ncacn_np", 20, L"\\pipe\\dhcpcsvc", NULL);
42 if (Status != RPC_S_OK)
43 {
44 DPRINT1("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
45 return 0;
46 }
47
48 Status = RpcServerRegisterIf(Server_dhcpcsvc_v0_0_s_ifspec, NULL, NULL);
49 if (Status != RPC_S_OK)
50 {
51 DPRINT1("RpcServerRegisterIf() failed (Status %lx)\n", Status);
52 return 0;
53 }
54
56 if (Status != RPC_S_OK)
57 {
58 DPRINT1("RpcServerListen() failed (Status %lx)\n", Status);
59 }
60
61 return 0;
62}
63
66{
68}
69
70VOID
72{
74}
75
76static
81 _In_ ULONG OptionId)
82{
83 DWORD Offset, OptionLength;
84 PBYTE Ptr;
85
86 Ptr = Data;
87 Offset = 0;
88 while (Offset < Length)
89 {
90 if ((DWORD)*Ptr == OptionId)
91 return Ptr;
92
93 OptionLength = (DWORD)*(Ptr + 1);
94 Offset += (OptionLength + 2);
95 Ptr += (OptionLength + 2);
96 }
97
98 return NULL;
99}
100
101/* This represents the service portion of the DHCP client API */
102
103/* Function 0 */
104DWORD
107 _In_ PDHCP_SERVER_NAME ServerName,
110{
111 PDHCP_ADAPTER Adapter;
112 struct protocol* proto;
114
115 DPRINT1("Server_EnableDhcp(%S %u)\n", AdapterName, Enable);
116
117 ApiLock();
118
119 Adapter = AdapterFindName(AdapterName);
120 if (Adapter == NULL)
121 {
123 goto done;
124 }
125
126 DPRINT1("Adapter: %p\n", Adapter);
127
128 if (Enable)
129 {
130 DPRINT1("Enable DHCP for Adapter: %p\n", Adapter);
131
132 if (Adapter->DhclientState.state != S_STATIC)
133 {
134 DPRINT1("The Adapter is already enabled!\n");
135 goto done;
136 }
137
138 add_protocol(Adapter->DhclientInfo.name,
139 Adapter->DhclientInfo.rfdesc, got_one,
140 &Adapter->DhclientInfo);
141
142 Adapter->DhclientInfo.client->state = S_INIT;
143 state_reboot(&Adapter->DhclientInfo);
144 }
145 else
146 {
147 DPRINT1("Disable DHCP for Adapter: %p\n", Adapter);
148
149 if (Adapter->DhclientState.state == S_STATIC)
150 {
151 DPRINT1("The Adapter is already disabled!\n");
152 goto done;
153 }
154
155 Adapter->DhclientState.state = S_STATIC;
157 if (proto)
159 }
160
163
164done:
165 ApiUnlock();
166
167 return ret;
168}
169
170/* Function 1 */
171DWORD
174 _In_ PDHCP_SERVER_NAME ServerName,
176{
177 PDHCP_ADAPTER Adapter;
178 struct protocol* proto;
180
181 DPRINT("Server_AcquireParameters(%S)\n", AdapterName);
182
183 ApiLock();
184
185 Adapter = AdapterFindName(AdapterName);
186 if (Adapter == NULL || Adapter->DhclientState.state == S_STATIC)
187 {
189 goto done;
190 }
191
192 DPRINT("Adapter: %p\n", Adapter);
193
195 if (proto)
197
198 add_protocol(Adapter->DhclientInfo.name,
199 Adapter->DhclientInfo.rfdesc, got_one,
200 &Adapter->DhclientInfo);
201
202 Adapter->DhclientInfo.client->state = S_INIT;
203 state_reboot(&Adapter->DhclientInfo);
204
207
208done:
209 ApiUnlock();
210
211 return ret;
212}
213
214/* Function 2 */
215DWORD
218 _In_ PDHCP_SERVER_NAME ServerName,
220{
221 DPRINT1("Server_AcquireParametersByBroadcast(%S) is unimplemented!\n", AdapterName);
222 return ERROR_SUCCESS;
223}
224
225/* Function 3 */
226DWORD
229 _In_ PDHCP_SERVER_NAME ServerName,
231{
232 PDHCP_ADAPTER Adapter;
233 struct protocol* proto;
235
236 DPRINT("Server_ReleaseParameters(%S)\n", AdapterName);
237
238 ApiLock();
239
240 Adapter = AdapterFindName(AdapterName);
241 if (Adapter == NULL)
242 {
244 goto done;
245 }
246
247 DPRINT("Adapter: %p\n", Adapter);
248
249 state_release(&Adapter->DhclientInfo);
250
252 if (proto)
254
257
258done:
259 ApiUnlock();
260
261 return ret;
262}
263
264/* Function 4 */
265DWORD
268 _In_ PDHCP_SERVER_NAME ServerName,
270{
271 PDHCP_ADAPTER Adapter;
272 HKEY hAdapterKey;
274
275 DPRINT("Server_FallbackRefreshParams(%S)\n", AdapterName);
276
277 ApiLock();
278
279 Adapter = AdapterFindName(AdapterName);
280 if (Adapter == NULL)
281 {
283 goto done;
284 }
285
286 DPRINT("Adapter: %p\n", Adapter);
287
288 if (Adapter->AlternateConfiguration)
289 {
291 Adapter->AlternateConfiguration = NULL;
292 }
293
294 hAdapterKey = FindAdapterKey(Adapter);
295 if (hAdapterKey)
296 {
297 ret = LoadAlternateConfiguration(Adapter, hAdapterKey);
298 RegCloseKey(hAdapterKey);
299 }
300
301done:
302 ApiUnlock();
303
304 return ret;
305}
306
307
308/* Function 5 */
309DWORD
312 _In_ PDHCP_SERVER_NAME ServerName,
313 _In_ DWORD AdapterIndex,
315 _In_ DWORD Netmask)
316{
317 PDHCP_ADAPTER Adapter;
318 struct protocol* proto;
320
321 DPRINT("Server_StaticRefreshParams()\n");
322
323 ApiLock();
324
325 Adapter = AdapterFindIndex(AdapterIndex);
326 if (Adapter == NULL)
327 {
329 goto done;
330 }
331
332 DPRINT("Adapter: %p\n", Adapter);
333
334 if (Adapter->NteContext)
335 {
336 DeleteIPAddress(Adapter->NteContext);
337 Adapter->NteContext = 0;
338 }
339 if (Adapter->RouterMib.dwForwardNextHop)
340 {
342 Adapter->RouterMib.dwForwardNextHop = 0;
343 }
344
345 Adapter->DhclientState.state = S_STATIC;
347 if (proto)
349
351 Netmask,
352 AdapterIndex,
353 &Adapter->NteContext,
354 &Adapter->NteInstance);
355
358
359done:
360 ApiUnlock();
361
362 return ret;
363}
364
365/* Function 6 */
366DWORD
369 _In_ PDHCP_SERVER_NAME ServerName)
370{
371 DPRINT1("Server_RemoveDNSRegistrations()\n");
372 /* FIXME: Call dnsapi.DnsRemoveRegistrations() */
373 return ERROR_SUCCESS;
374}
375
376/* Function 7 */
377DWORD
380 _In_ PDHCP_SERVER_NAME ServerName,
382 _In_ DHCPCAPI_CLASSID *ClassId,
383 _In_ DHCPCAPI_PARAMS_ARRAY *SendParams,
384 _In_ DHCPCAPI_PARAMS_ARRAY *RecdParams,
385 _Inout_ LPDHCPCAPI_RESULT_ARRAY *RecdResults)
386{
387 PDHCP_ADAPTER Adapter;
388 DHCPCAPI_RESULT_ARRAY *Results = NULL;
389 DWORD i, dwReturnCount, dwReturnLength;
390 DWORD OptionId, DataSize, Offset, Index;
391 PBYTE Data, OptionPtr;
392 struct option_data *Options;
394
395 DPRINT("Server_RequestParams(%S %p %p %p %p)\n",
396 AdapterName, ClassId, SendParams, RecdParams, RecdResults);
397
398#if 0
399 if (SendParams != NULL)
400 {
401 DPRINT1("SendParams nParams %lu Params %p\n", SendParams->nParams, SendParams->Params);
402 for (i = 0; i < SendParams->nParams; i++)
403 {
404 DPRINT1("SendParam %lu: Option %lu Vendor %u\n", i, SendParams->Params[i].OptionId, SendParams->Params[i].IsVendor);
405 }
406 }
407
408 if (RecdParams != NULL)
409 {
410 DPRINT1("RecdParams nParams %lu Params %p\n", RecdParams->nParams, RecdParams->Params);
411 for (i = 0; i < RecdParams->nParams; i++)
412 {
413 DPRINT1("RecdParam %lu: Option %lu Vendor %u\n", i, RecdParams->Params[i].OptionId, RecdParams->Params[i].IsVendor);
414 }
415 }
416#endif
417
418 ApiLock();
419
420 Adapter = AdapterFindName(AdapterName);
421 if (Adapter == NULL)
422 {
423 DPRINT1("Adapter not found\n");
425 goto done;
426 }
427
428 DPRINT("Adapter: %p\n", Adapter);
429
430 if (Adapter->DhclientState.state != S_BOUND)
431 {
432 DPRINT1("Adapter is not in S_BOUND state!\n");
434 goto done;
435 }
436
437 dwReturnCount = 0;
438 dwReturnLength = 0;
439
440 DPRINT("ActiveLease: %p \n", Adapter->DhclientState.active);
441 if (Adapter->DhclientState.active)
442 {
443 Options = Adapter->DhclientState.active->options;
444 for (i = 0; i < RecdParams->nParams; i++)
445 {
446 OptionId = RecdParams->Params[i].OptionId;
447 if (RecdParams->Params[i].IsVendor == FALSE)
448 {
449 DPRINT("Option %u: Length %d \n", OptionId, Options[OptionId].len);
450 if (Options[OptionId].len != 0)
451 {
452 dwReturnLength += Options[OptionId].len;
453 dwReturnCount++;
454 }
455 }
456 else
457 {
459 {
460 DPRINT("Have vendor options!\n");
463 OptionId);
464 if (OptionPtr)
465 {
466 DPRINT("Vendor option %lu: Length %lu\n", OptionId, (DWORD)*(OptionPtr + 1));
467 dwReturnLength += (DWORD)*(OptionPtr + 1);
468 dwReturnCount++;
469 }
470 }
471 }
472 }
473
474 DPRINT("Return count: %lu Return length: %lu\n", dwReturnCount, dwReturnLength);
475
476 Results = MIDL_user_allocate(sizeof(DHCPCAPI_RESULT_ARRAY));
477 if (Results == NULL)
478 {
479 DPRINT1("Result allocation failed!\n");
481 goto done;
482 }
483
484 Results->ResultsCount = dwReturnCount;
485 Results->Results = MIDL_user_allocate(dwReturnCount * sizeof(DHCPCAPI_RESULTS));
486 if (Results->Results == NULL)
487 {
488 DPRINT1("Results allocation failed!\n");
490 goto done;
491 }
492
493 Results->DataSize = dwReturnLength;
494 Results->Data = MIDL_user_allocate(dwReturnLength);
495 if (Results->Data == NULL)
496 {
497 DPRINT1("Data allocation failed!\n");
499 goto done;
500 }
501
502 Offset = 0;
503 Index = 0;
504 for (i = 0; i < RecdParams->nParams; i++)
505 {
506 OptionId = RecdParams->Params[i].OptionId;
507
508 if (RecdParams->Params[i].IsVendor == FALSE)
509 {
510 DataSize = Options[OptionId].len;
511 Data = Options[OptionId].data;
512
513 DPRINT("Option %u: Length %d \n", OptionId, DataSize);
514
515 if (DataSize != 0)
516 {
517 Results->Results[Index].OptionId = OptionId;
518 Results->Results[Index].IsVendor = FALSE;
519 Results->Results[Index].DataSize = DataSize;
520 Results->Results[Index].DataOffset = Offset;
521
522 CopyMemory(&Results->Data[Offset], Data, DataSize);
523
524 Index++;
525 Offset += DataSize;
526 }
527 }
528 else
529 {
531 {
532 DPRINT1("Have vendor options!\n");
535 OptionId);
536 if (OptionPtr)
537 {
538 DataSize = (DWORD)*(OptionPtr + 1);
539 Data = (OptionPtr + 2);
540
541 DPRINT1("Vendor option %u: Length %d\n", OptionId, DataSize);
542
543 Results->Results[Index].OptionId = OptionId;
544 Results->Results[Index].IsVendor = TRUE;
545 Results->Results[Index].DataSize = DataSize;
546 Results->Results[Index].DataOffset = Offset;
547
548 CopyMemory(&Results->Data[Offset], Data, DataSize);
549
550 Index++;
551 Offset += DataSize;
552 }
553 }
554 }
555 }
556
557 *RecdResults = Results;
558 }
559
560done:
561 ApiUnlock();
562
563 return ret;
564}
#define DPRINT1
Definition: precomp.h:8
PDHCP_ADAPTER AdapterFindIndex(unsigned int indx)
Definition: adapter.c:608
PDHCP_ADAPTER AdapterFindName(const WCHAR *name)
Definition: adapter.c:622
HKEY FindAdapterKey(PDHCP_ADAPTER Adapter)
Definition: adapter.c:105
DWORD LoadAlternateConfiguration(PDHCP_ADAPTER Adapter, HKEY hAdapterKey)
Definition: adapter.c:154
DWORD __stdcall Server_AcquireParametersByBroadcast(_In_ PDHCP_SERVER_NAME ServerName, _In_ LPWSTR AdapterName)
Definition: api.c:217
DWORD __stdcall Server_RequestParams(_In_ PDHCP_SERVER_NAME ServerName, _In_ LPWSTR AdapterName, _In_ DHCPCAPI_CLASSID *ClassId, _In_ DHCPCAPI_PARAMS_ARRAY *SendParams, _In_ DHCPCAPI_PARAMS_ARRAY *RecdParams, _Inout_ LPDHCPCAPI_RESULT_ARRAY *RecdResults)
Definition: api.c:379
DWORD __stdcall Server_ReleaseParameters(_In_ PDHCP_SERVER_NAME ServerName, _In_ LPWSTR AdapterName)
Definition: api.c:228
HANDLE hAdapterStateChangedEvent
Definition: dhcpcsvc.c:21
VOID ShutdownRpc(VOID)
Definition: api.c:71
VOID ApiFree()
Definition: api.c:30
DWORD __stdcall Server_EnableDhcp(_In_ PDHCP_SERVER_NAME ServerName, _In_ LPWSTR AdapterName, _In_ BOOL Enable)
Definition: api.c:106
VOID ApiLock()
Definition: api.c:22
VOID ApiInit()
Definition: api.c:18
DWORD __stdcall Server_FallbackRefreshParams(_In_ PDHCP_SERVER_NAME ServerName, _In_ LPWSTR AdapterName)
Definition: api.c:267
DWORD __stdcall Server_RemoveDNSRegistrations(_In_ PDHCP_SERVER_NAME ServerName)
Definition: api.c:368
DWORD __stdcall Server_StaticRefreshParams(_In_ PDHCP_SERVER_NAME ServerName, _In_ DWORD AdapterIndex, _In_ DWORD Address, _In_ DWORD Netmask)
Definition: api.c:311
DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter)
Definition: api.c:36
DWORD __stdcall Server_AcquireParameters(_In_ PDHCP_SERVER_NAME ServerName, _In_ LPWSTR AdapterName)
Definition: api.c:173
static PBYTE GetVendorOption(_In_ PBYTE Data, _In_ ULONG Length, _In_ ULONG OptionId)
Definition: api.c:78
static CRITICAL_SECTION ApiCriticalSection
Definition: api.c:14
VOID ApiUnlock()
Definition: api.c:26
HANDLE InitRpc(VOID)
Definition: api.c:65
void add_protocol(char *name, int fd, void(*handler)(struct protocol *), void *local)
Definition: dispatch.c:342
void remove_protocol(struct protocol *proto)
Definition: dispatch.c:359
void got_one(struct protocol *l)
Definition: dispatch.c:194
struct protocol * find_protocol_by_adapter(struct interface_info *info)
Definition: dispatch.c:412
#define DHO_VENDOR_ENCAPSULATED_OPTIONS
Definition: dhcp.h:139
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define free
Definition: debug_ros.c:5
#define ERROR_SUCCESS
Definition: deptool.c:10
void state_release(void *ipp)
Definition: dhclient.c:231
void state_reboot(void *ipp)
Definition: dhclient.c:172
void __RPC_FAR *__RPC_USER MIDL_user_allocate(SIZE_T len)
Definition: dhcpcsvc.c:26
wchar_t * PDHCP_SERVER_NAME
Definition: dhcpcsvc.idl:7
@ S_BOUND
Definition: dhcpd.h:176
@ S_INIT
Definition: dhcpd.h:173
@ S_STATIC
Definition: dhcpd.h:179
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
#define __stdcall
Definition: corecrt.h:120
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
Status
Definition: gdiplustypes.h:24
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
DWORD WINAPI AddIPAddress(IPAddr Address, IPMask Netmask, DWORD IfIndex, PULONG NteContext, PULONG NteInstance)
Definition: iphlpapi_main.c:67
DWORD WINAPI DeleteIpForwardEntry(PMIB_IPFORWARDROW pRoute)
DWORD WINAPI DeleteIPAddress(ULONG NTEContext)
#define CopyMemory
Definition: minwinbase.h:29
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4755
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE _In_ PNDIS_STRING AdapterName
Definition: ndis.h:6016
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
#define DWORD
Definition: nt_native.h:44
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
BYTE * PBYTE
Definition: pedump.c:66
static WCHAR Address[46]
Definition: ping.c:68
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1520
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1116
RPC_STATUS WINAPI RpcServerUseProtseqEpW(RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:927
RPC_STATUS WINAPI RpcMgmtStopServerListening(RPC_BINDING_HANDLE Binding)
Definition: rpc_server.c:1596
#define RPC_C_LISTEN_MAX_CALLS_DEFAULT
Definition: rpcdce.h:122
#define RPC_S_OK
Definition: rpcnterr.h:22
long RPC_STATUS
Definition: rpc.h:48
#define DPRINT
Definition: sndvol32.h:73
LPDHCPCAPI_RESULTS Results
Definition: dhcpcsvc.idl:63
ULONG NteContext
Definition: rosdhcp.h:85
ULONG NteInstance
Definition: rosdhcp.h:85
MIB_IPFORWARDROW RouterMib
Definition: rosdhcp.h:82
PALTERNATE_CONFIGURATION AlternateConfiguration
Definition: rosdhcp.h:80
struct interface_info DhclientInfo
Definition: rosdhcp.h:86
struct client_state DhclientState
Definition: rosdhcp.h:87
DWORD dwForwardNextHop
Definition: ipmib.h:74
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:687
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:669
uint16_t * LPWSTR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3540
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define WINAPI
Definition: msvc.h:6