ReactOS 0.4.15-dev-7953-g1f49173
nscatalo.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WinSock 2 API
4 * FILE: dll/win32/ws2_32/src/nscatalo.c
5 * PURPOSE: Namespace Catalog Object
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9/* INCLUDES ******************************************************************/
10
11#include <ws2_32.h>
12
13#define NDEBUG
14#include <debug.h>
15
16/* DATA **********************************************************************/
17
18#define WsNcLock() EnterCriticalSection(&Catalog->Lock)
19#define WsNcUnlock() LeaveCriticalSection(&Catalog->Lock)
20
21/* FUNCTIONS *****************************************************************/
22
26{
27 PNSCATALOG Catalog;
28
29 /* Allocate the catalog */
30 Catalog = HeapAlloc(WsSockHeap, HEAP_ZERO_MEMORY, sizeof(*Catalog));
31
32 /* Return it */
33 return Catalog;
34}
35
40{
43 HKEY CatalogKey, NewKey;
44 DWORD RegType = REG_DWORD;
45 DWORD RegSize = sizeof(DWORD);
46 DWORD UniqueId = 0;
47 DWORD NewData = 0;
48 CHAR* CatalogKeyName;
49
50 /* Initialize the catalog lock and namespace list */
51 InitializeCriticalSection(&Catalog->Lock);
52 InitializeListHead(&Catalog->CatalogList);
53
54 /* Read the catalog name */
56 "Current_NameSpace_Catalog",
57 0,
58 &RegType,
59 NULL,
60 &RegSize);
62 {
63 static const CHAR DefaultCatalogName[] = "NameSpace_Catalog5";
64 RegSize = sizeof(DefaultCatalogName);
65 CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize);
66 memcpy(CatalogKeyName, DefaultCatalogName, RegSize);
67 }
68 else
69 {
71 {
72 DPRINT1("Failed to get namespace catalog name: %d.\n", ErrorCode);
73 return FALSE;
74 }
75
76 if (RegType != REG_SZ)
77 {
78 DPRINT1("Namespace catalog name is not a string (Type %d).\n", RegType);
79 return FALSE;
80 }
81
82 CatalogKeyName = HeapAlloc(WsSockHeap, 0, RegSize);
83
84 /* Read the catalog name */
86 "Current_NameSpace_Catalog",
87 0,
88 &RegType,
89 (LPBYTE)CatalogKeyName,
90 &RegSize);
91
92 /* Open the Catalog Key */
94 CatalogKeyName,
95 0,
97 &CatalogKey);
98 }
99
100 /* If we didn't find the key, create it */
102 {
103 /* Fake that we opened an existing key */
105 }
107 {
108 /* Create the Catalog Name */
110 CatalogKeyName,
111 0,
112 NULL,
115 NULL,
116 &CatalogKey,
118 }
119
120 HeapFree(WsSockHeap, 0, CatalogKeyName);
121 RegType = REG_DWORD;
122 RegSize = sizeof(DWORD);
123
124 /* Fail if that didn't work */
125 if (ErrorCode != ERROR_SUCCESS) return FALSE;
126
127 /* Check if we had to create the key */
129 {
130 /* Write the count of entries (0 now) */
131 ErrorCode = RegSetValueEx(CatalogKey,
132 "Num_Catalog_Entries",
133 0,
134 REG_DWORD,
135 (LPBYTE)&NewData,
136 sizeof(NewData));
138 {
139 /* Close the key and fail */
140 RegCloseKey(CatalogKey);
141 return FALSE;
142 }
143
144 /* Write the first catalog entry Uniqe ID */
145 NewData = 1;
146 ErrorCode = RegSetValueEx(CatalogKey,
147 "Serial_Access_Num",
148 0,
149 REG_DWORD,
150 (LPBYTE)&NewData,
151 sizeof(NewData));
153 {
154 /* Close the key and fail */
155 RegCloseKey(CatalogKey);
156 return FALSE;
157 }
158
159 /* Create a key for this entry */
160 ErrorCode = RegCreateKeyEx(CatalogKey,
161 "Catalog_Entries",
162 0,
163 NULL,
166 NULL,
167 &NewKey,
170 {
171 /* Close the key and fail */
172 RegCloseKey(CatalogKey);
173 return FALSE;
174 }
175
176 /* Close the key since we don't need it */
177 RegCloseKey(NewKey);
178 }
179 else
180 {
181 RegSize = sizeof(UniqueId);
182 /* Read the serial number */
183 ErrorCode = RegQueryValueEx(CatalogKey,
184 "Serial_Access_Num",
185 0,
186 &RegType,
187 (LPBYTE)&UniqueId,
188 &RegSize);
189
190 /* Check if it's missing for some reason */
192 {
193 /* Write the first catalog entry Unique ID */
194 NewData = 1;
195 ErrorCode = RegSetValueEx(CatalogKey,
196 "Serial_Access_Num",
197 0,
198 REG_DWORD,
199 (LPBYTE)&NewData,
200 sizeof(NewData));
201 }
202 }
203
204 /* Set the Catalog Key */
205 Catalog->CatalogKey = CatalogKey;
206 return TRUE;
207}
208
209INT
210WSAAPI
213 IN HANDLE CatalogEvent)
214{
216
217 /* Open the catalog */
218 if (WsNcOpen(Catalog, ParentKey))
219 {
220 /* Refresh it */
221 ErrorCode = WsNcRefreshFromRegistry(Catalog, CatalogEvent);
222 }
223
224 /* Return the status */
225 return ErrorCode;
226}
227
228INT
229WSAAPI
231 IN HANDLE CatalogEvent)
232{
234 BOOLEAN LocalEvent = FALSE;
235 LIST_ENTRY LocalList;
236 DWORD UniqueId;
237 HKEY EntriesKey;
238 DWORD CatalogEntries;
239 PNSCATALOG_ENTRY CatalogEntry;
240 BOOL NewChangesMade;
242 DWORD RegType = REG_DWORD;
243 DWORD RegSize = sizeof(DWORD);
244 DWORD i;
245
246 /* Check if we got an event */
247 if (!CatalogEvent)
248 {
249 /* Create an event ourselves */
250 CatalogEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
251 if (!CatalogEvent) return WSASYSCALLFAILURE;
252 LocalEvent = TRUE;
253 }
254
255 /* Lock the catalog */
256 WsNcLock();
257
258 /* Initialize our local list for the loop */
259 InitializeListHead(&LocalList);
260
261 /* Start looping */
262 do
263 {
264 /* Setup notifications for the catalog entry */
265 ErrorCode = WsSetupCatalogProtection(Catalog->CatalogKey,
266 CatalogEvent,
267 &UniqueId);
268 if (ErrorCode != ERROR_SUCCESS) break;
269
270 /* Check if we've changed till now */
271 if (UniqueId == Catalog->UniqueId)
272 {
273 /* We haven't, so return */
275 break;
276 }
277
278 /* Now Open the Entries */
279 ErrorCode = RegOpenKeyEx(Catalog->CatalogKey,
280 "Catalog_Entries",
281 0,
283 &EntriesKey);
285 {
286 /* Critical failure */
288 break;
289 }
290
291 /* Find out how many there are */
292 ErrorCode = RegQueryValueEx(Catalog->CatalogKey,
293 "Num_Catalog_Entries",
294 0,
295 &RegType,
296 (LPBYTE)&CatalogEntries,
297 &RegSize);
299 {
300 /* Critical failure */
302 break;
303 }
304
305 /* Initialize them all */
306 for (i = 1; i <= CatalogEntries; i++)
307 {
308 /* Allocate a Catalog Entry Structure */
309 CatalogEntry = WsNcEntryAllocate();
310 if (!CatalogEntry)
311 {
312 /* Not enough memory, fail */
314 break;
315 }
316
317 /* Initialize it from the Registry Key */
319 EntriesKey,
320 i);
322 {
323 /* We failed to get it, dereference the entry and leave */
324 WsNcEntryDereference(CatalogEntry);
325 break;
326 }
327
328 /* Insert it to our List */
329 InsertTailList(&LocalList, &CatalogEntry->CatalogLink);
330 }
331
332 /* Close the catalog key */
333 RegCloseKey(EntriesKey);
334
335 /* Check if we changed during our read and if we have success */
336 NewChangesMade = WsCheckCatalogState(CatalogEvent);
337 if (!NewChangesMade && ErrorCode == ERROR_SUCCESS)
338 {
339 /* All is good, update the protocol list */
340 WsNcUpdateNamespaceList(Catalog, &LocalList);
341
342 /* Update and return */
343 Catalog->UniqueId = UniqueId;
344 break;
345 }
346
347 /* We failed and/or catalog data changed, free what we did till now */
348 while (!IsListEmpty(&LocalList))
349 {
350 /* Get the LP Catalog Item */
351 Entry = RemoveHeadList(&LocalList);
352 CatalogEntry = CONTAINING_RECORD(Entry, NSCATALOG_ENTRY, CatalogLink);
353
354 /* Dereference it */
355 WsNcEntryDereference(CatalogEntry);
356 }
357 } while (NewChangesMade);
358
359 /* Release the lock */
360 WsNcUnlock();
361
362 /* Close the event, if any was created by us */
363 if (LocalEvent) CloseHandle(CatalogEvent);
364
365 /* All Done */
366 return ErrorCode;
367}
368
369VOID
370WSAAPI
374{
376 PNSCATALOG_ENTRY CatalogEntry;
377 BOOL GoOn = TRUE;
378
379 /* Lock the catalog */
380 WsNcLock();
381
382 /* Loop the entries */
383 Entry = Catalog->CatalogList.Flink;
384 while (GoOn && (Entry != &Catalog->CatalogList))
385 {
386 /* Get the entry */
387 CatalogEntry = CONTAINING_RECORD(Entry, NSCATALOG_ENTRY, CatalogLink);
388
389 /* Move to the next one and call the callback */
390 Entry = Entry->Flink;
391 GoOn = Callback(Context, CatalogEntry);
392 }
393
394 /* Release the lock */
395 WsNcUnlock();
396}
397
398INT
399WSAAPI
401 IN PNSCATALOG_ENTRY CatalogEntry)
402{
405
406 /* Lock the catalog */
407 WsNcLock();
408
409 /* Check if we have a provider already */
410 if (!CatalogEntry->Provider)
411 {
412 /* Allocate a provider */
413 if ((Provider = WsNpAllocate()))
414 {
415 /* Initialize it */
417 CatalogEntry->DllPath,
418 &CatalogEntry->ProviderId);
419
420 /* Ensure success */
422 {
423 /* Set the provider */
424 WsNcEntrySetProvider(CatalogEntry, Provider);
425 }
426
427 /* Dereference it */
429 }
430 else
431 {
432 /* No memory */
434 }
435 }
436
437 /* Release the lock and return */
438 WsNcUnlock();
439 return ErrorCode;
440}
441
442INT
443WSAAPI
445 IN OUT LPDWORD BugSize,
446 IN OUT LPWSASERVICECLASSINFOW lpServiceClassInfo)
447{
448 /* Not yet implemented in the spec? */
450 return SOCKET_ERROR;
451}
452
453VOID
454WSAAPI
457{
458 LIST_ENTRY TempList;
459 PNSCATALOG_ENTRY CatalogEntry, OldCatalogEntry;
461
462 /* First move from our list to the old one */
463 InsertHeadList(&Catalog->CatalogList, &TempList);
464 RemoveEntryList(&Catalog->CatalogList);
465 InitializeListHead(&Catalog->CatalogList);
466
467 /* Loop every item on the list */
468 while (!IsListEmpty(List))
469 {
470 /* Get the catalog entry */
472 CatalogEntry = CONTAINING_RECORD(Entry, NSCATALOG_ENTRY, CatalogLink);
473
474 /* Check if this item is already on our list */
475 Entry = TempList.Flink;
476 while (Entry != &TempList)
477 {
478 /* Get the catalog entry */
479 OldCatalogEntry = CONTAINING_RECORD(Entry, NSCATALOG_ENTRY, CatalogLink);
480 Entry = Entry->Flink;
481
482 /* Check if they match */
483 if (IsEqualGUID(&CatalogEntry->ProviderId,
484 &OldCatalogEntry->ProviderId))
485 {
486 /* We have a match, use the old item instead */
487 WsNcEntryDereference(CatalogEntry);
488 CatalogEntry = OldCatalogEntry;
489 RemoveEntryList(&CatalogEntry->CatalogLink);
490
491 /* Decrease the number of protocols we have */
492 Catalog->ItemCount--;
493 break;
494 }
495 }
496
497 /* Add this item */
498 InsertTailList(&Catalog->CatalogList, &CatalogEntry->CatalogLink);
499 Catalog->ItemCount++;
500 }
501
502 /* If there's anything left on the temporary list */
503 while (!IsListEmpty(&TempList))
504 {
505 /* Get the entry */
506 Entry = RemoveHeadList(&TempList);
507 CatalogEntry = CONTAINING_RECORD(Entry, NSCATALOG_ENTRY, CatalogLink);
508
509 /* Remove it */
510 Catalog->ItemCount--;
511 WsNcEntryDereference(CatalogEntry);
512 }
513}
514
515INT
516WSAAPI
518 IN LPGUID ProviderId,
519 OUT PNSCATALOG_ENTRY *CatalogEntry)
520{
522 PLIST_ENTRY NextEntry;
524
525 /* Lock the catalog */
526 WsNcLock();
527
528 /* Match the Id with all the entries in the List */
529 NextEntry = Catalog->CatalogList.Flink;
530 while (NextEntry != &Catalog->CatalogList)
531 {
532 /* Get the Current Entry */
533 Entry = CONTAINING_RECORD(NextEntry, NSCATALOG_ENTRY, CatalogLink);
534 NextEntry = NextEntry->Flink;
535
536 /* Check if this is the Catalog Entry ID we want */
537 if (IsEqualGUID(&Entry->ProviderId, ProviderId))
538 {
539 /* If it doesn't already have a provider, load the provider */
540 if (!Entry->Provider)
541 ErrorCode = WsNcLoadProvider(Catalog, Entry);
542
543 /* If we succeeded, reference the entry and return it */
544 if (Entry->Provider /* || ErrorCode == ERROR_SUCCESS */)
545 {
546 InterlockedIncrement(&Entry->RefCount);
547 *CatalogEntry = Entry;
549 break;
550 }
551 }
552 }
553
554 /* Release the lock and return */
555 WsNcUnlock();
556 return ErrorCode;
557}
558
559BOOL
560WSAAPI
563 IN LPWSAQUERYSETW QuerySet)
564{
565 DWORD ProtocolCount = QuerySet->dwNumberOfProtocols;
566 LPAFPROTOCOLS AfpProtocols = QuerySet->lpafpProtocols;
567 LONG Family;
568
569 /* Check for valid family */
570 if (AddressFamily != -1)
571 {
572 /* Check if it's the magic */
573 if (AddressFamily == AF_UNSPEC) return TRUE;
575 }
576 else
577 {
578 /* No family given, check for namespace */
579 if (NameSpace == NS_SAP)
580 {
581 /* Use IPX family */
582 Family = AF_IPX;
583 }
584 else
585 {
586 /* Other namespace, it's valid */
587 return TRUE;
588 }
589 }
590
591 /* Now try to get a match */
592 while (ProtocolCount--)
593 {
594 /* Check this protocol entry */
595 if ((AfpProtocols->iAddressFamily == AF_UNSPEC) ||
596 (AfpProtocols->iAddressFamily == Family))
597 {
598 /* Match found */
599 return TRUE;
600 }
601
602 /* Move to the next one */
603 AfpProtocols++;
604 }
605
606 /* No match */
607 return FALSE;
608}
609
610VOID
611WSAAPI
614{
615 /* Remove the entry from the list */
616 RemoveEntryList(&Entry->CatalogLink);
617
618 /* Decrease our count */
619 Catalog->ItemCount--;
620}
621
622VOID
623WSAAPI
625{
627 PNSCATALOG_ENTRY CatalogEntry;
628
629 /* Check if we're initialized */
630 if (!Catalog->CatalogList.Flink) return;
631
632 /* Acquire lock */
633 WsNcLock();
634
635 /* Loop every entry */
636 Entry = Catalog->CatalogList.Flink;
637 while (Entry != &Catalog->CatalogList)
638 {
639 /* Get this entry */
640 CatalogEntry = CONTAINING_RECORD(Entry, NSCATALOG_ENTRY, CatalogLink);
641
642 /* Remove it and dereference it */
643 WsNcRemoveCatalogItem(Catalog, CatalogEntry);
644 WsNcEntryDereference(CatalogEntry);
645
646 /* Move to the next entry */
647 Entry = Catalog->CatalogList.Flink;
648 }
649
650 /* Check if the catalog key is opened */
651 if (Catalog->CatalogKey)
652 {
653 /* Close it */
654 RegCloseKey(Catalog->CatalogKey);
655 Catalog->CatalogKey = NULL;
656 }
657
658 /* Release and delete the lock */
659 WsNcUnlock();
660 DeleteCriticalSection(&Catalog->Lock);
661
662 /* Delete the object */
663 HeapFree(WsSockHeap, 0, Catalog);
664}
unsigned char BOOLEAN
#define InterlockedIncrement
Definition: armddk.h:53
#define DPRINT1
Definition: precomp.h:8
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define RemoveHeadList(ListHead)
Definition: env_spec_w32.h:964
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
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
#define REG_SZ
Definition: layer.c:22
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
IN PCO_ADDRESS_FAMILY AddressFamily
Definition: ndis.h:1906
VOID WSAAPI WsNcRemoveCatalogItem(IN PNSCATALOG Catalog, IN PNSCATALOG_ENTRY Entry)
Definition: nscatalo.c:612
BOOLEAN WSAAPI WsNcOpen(IN PNSCATALOG Catalog, IN HKEY ParentKey)
Definition: nscatalo.c:38
BOOL WSAAPI WsNcMatchProtocols(IN DWORD NameSpace, IN LONG AddressFamily, IN LPWSAQUERYSETW QuerySet)
Definition: nscatalo.c:561
INT WSAAPI WsNcGetCatalogFromProviderId(IN PNSCATALOG Catalog, IN LPGUID ProviderId, OUT PNSCATALOG_ENTRY *CatalogEntry)
Definition: nscatalo.c:517
VOID WSAAPI WsNcDelete(IN PNSCATALOG Catalog)
Definition: nscatalo.c:624
INT WSAAPI WsNcLoadProvider(IN PNSCATALOG Catalog, IN PNSCATALOG_ENTRY CatalogEntry)
Definition: nscatalo.c:400
INT WSAAPI WsNcInitializeFromRegistry(IN PNSCATALOG Catalog, IN HKEY ParentKey, IN HANDLE CatalogEvent)
Definition: nscatalo.c:211
INT WSAAPI WsNcGetServiceClassInfo(IN PNSCATALOG Catalog, IN OUT LPDWORD BugSize, IN OUT LPWSASERVICECLASSINFOW lpServiceClassInfo)
Definition: nscatalo.c:444
VOID WSAAPI WsNcEnumerateCatalogItems(IN PNSCATALOG Catalog, IN PNSCATALOG_ENUMERATE_PROC Callback, IN PVOID Context)
Definition: nscatalo.c:371
#define WsNcLock()
Definition: nscatalo.c:18
PNSCATALOG WSAAPI WsNcAllocate(VOID)
Definition: nscatalo.c:25
INT WSAAPI WsNcRefreshFromRegistry(IN PNSCATALOG Catalog, IN HANDLE CatalogEvent)
Definition: nscatalo.c:230
VOID WSAAPI WsNcUpdateNamespaceList(IN PNSCATALOG Catalog, IN PLIST_ENTRY List)
Definition: nscatalo.c:455
#define WsNcUnlock()
Definition: nscatalo.c:19
#define NS_SAP
Definition: nspapi.h:10
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
#define REG_CREATED_NEW_KEY
Definition: nt_native.h:1084
#define DWORD
Definition: nt_native.h:44
#define REG_OPENED_EXISTING_KEY
Definition: nt_native.h:1085
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
long LONG
Definition: pedump.c:60
static int Family
Definition: ping.c:62
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REG_DWORD
Definition: sdbapi.c:596
static LPWSAQUERYSETW
Definition: sock.c:90
base of all file and directory entries
Definition: entries.h:83
INT iAddressFamily
Definition: winsock2.h:787
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
Definition: ws2_32p.h:122
GUID ProviderId
Definition: ws2_32p.h:132
LIST_ENTRY CatalogLink
Definition: ws2_32p.h:123
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
unsigned char * LPBYTE
Definition: typedefs.h:53
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
#define OUT
Definition: typedefs.h:40
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG _Out_opt_ PULONG CreateDisposition
Definition: wdfregistry.h:120
_Must_inspect_result_ _In_opt_ WDFKEY ParentKey
Definition: wdfregistry.h:69
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
#define CreateEvent
Definition: winbase.h:3748
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define WSASYSCALLFAILURE
Definition: winerror.h:1994
#define WSAEINVAL
Definition: winerror.h:1946
#define RegOpenKeyEx
Definition: winreg.h:520
#define RegSetValueEx
Definition: winreg.h:533
#define RegCreateKeyEx
Definition: winreg.h:501
#define RegQueryValueEx
Definition: winreg.h:524
#define WSA_NOT_ENOUGH_MEMORY
Definition: winsock2.h:620
#define WSAAPI
Definition: winsock2.h:605
#define AF_IPX
Definition: winsock.h:350
#define SOCKET_ERROR
Definition: winsock.h:333
#define AF_UNSPEC
Definition: winsock.h:344
DWORD WSAAPI WsNpInitialize(IN PNS_PROVIDER Provider, IN LPWSTR DllPath, IN LPGUID ProviderGuid)
Definition: nsprovid.c:82
INT WSAAPI WsSetupCatalogProtection(IN HKEY CatalogKey, IN HANDLE CatalogEvent, OUT LPDWORD UniqueId)
Definition: wsautil.c:142
BOOL(WINAPI * PNSCATALOG_ENUMERATE_PROC)(IN PVOID Context, IN PNSCATALOG_ENTRY Entry)
Definition: ws2_32p.h:253
PNSCATALOG_ENTRY WSAAPI WsNcEntryAllocate(VOID)
Definition: nscatent.c:17
BOOL WSAAPI WsCheckCatalogState(IN HANDLE Event)
Definition: wsautil.c:75
VOID WSAAPI WsNcEntrySetProvider(IN PNSCATALOG_ENTRY Entry, IN PNS_PROVIDER Provider)
Definition: nscatent.c:175
HANDLE WsSockHeap
Definition: dllmain.c:21
VOID WSAAPI WsNcEntryDereference(IN PNSCATALOG_ENTRY CatalogEntry)
Definition: nscatent.c:53
VOID WSAAPI WsNpDereference(IN PNS_PROVIDER Provider)
Definition: nsprovid.c:180
PNS_PROVIDER WSAAPI WsNpAllocate(VOID)
Definition: nsprovid.c:63
INT WSAAPI WsNcEntryInitializeFromRegistry(IN PNSCATALOG_ENTRY CatalogEntry, IN HKEY ParentKey, IN ULONG UniqueId)
Definition: nscatent.c:65
char CHAR
Definition: xmlstorage.h:175