ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

INT WSAAPI WsNcEntryInitializeFromRegistry ( IN PNSCATALOG_ENTRY  CatalogEntry,
IN HKEY  ParentKey,
IN ULONG  UniqueId 
)

Definition at line 64 of file nscatent.c.

Referenced by WsNcRefreshFromRegistry().

{
    CHAR CatalogEntryName[13];
    HKEY EntryKey;
    ULONG RegType = REG_SZ;
    ULONG RegSize = MAX_PATH;

    /* Convert to a 00000xxx string */
    sprintf(CatalogEntryName, "%0""12""i", (int)UniqueId);

    /* Open the Entry */
    RegOpenKeyEx(ParentKey,
                 CatalogEntryName,
                 0,
                 KEY_READ,
                 &EntryKey);

    /* Read the Library Path */
    RegQueryValueExW(EntryKey,
                     L"LibraryPath",
                     0,
                     &RegType,
                     (LPBYTE)&CatalogEntry->DllPath,
                     &RegSize);

    /* Query Display String Size*/
    RegQueryValueExW(EntryKey,
                     L"DisplayString",
                     0,
                     NULL,
                     NULL,
                     &RegSize);

    /* Allocate it */
    CatalogEntry->ProviderName = (LPWSTR)HeapAlloc(WsSockHeap, 0, RegSize);

    /* Read it */
    RegQueryValueExW(EntryKey,
                     L"DisplayString",
                     0,
                     &RegType,
                     (LPBYTE)CatalogEntry->ProviderName,
                     &RegSize);

    /* Read the Provider Id */
    RegType = REG_BINARY;
    RegSize = sizeof(GUID);
    RegQueryValueEx(EntryKey,
                    "ProviderId",
                    0,
                    &RegType,
                    (LPBYTE)&CatalogEntry->ProviderId,
                    &RegSize);

    /* Read the Address Family */
    RegType = REG_DWORD;
    RegSize = sizeof(DWORD);
    RegQueryValueEx(EntryKey,
                    "AddressFamily",
                    0,
                    &RegType,
                    (LPBYTE)&CatalogEntry->AddressFamily,
                    &RegSize);

    /* Read the Namespace Id */
    RegQueryValueEx(EntryKey,
                    "SupportedNamespace",
                    0,
                    &RegType,
                    (LPBYTE)&CatalogEntry->NamespaceId,
                    &RegSize);

    /* Read the Enabled Flag */
    RegQueryValueEx(EntryKey,
                    "Enabled",
                    0,
                    &RegType,
                    (LPBYTE)&CatalogEntry->Enabled,
                    &RegSize);

    /* Read the Version */
    RegQueryValueEx(EntryKey,
                    "Version",
                    0,
                    &RegType,
                    (LPBYTE)&CatalogEntry->Version,
                    &RegSize);

    /* Read the Support Service Class Info Flag */
    RegQueryValueEx(EntryKey,
                    "Version",
                    0,
                    &RegType,
                    (LPBYTE)&CatalogEntry->StoresServiceClassInfo,
                    &RegSize);

    /* Done */
    RegCloseKey(EntryKey);
    return ERROR_SUCCESS;
}

Generated on Sun May 27 2012 05:21:19 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.