RxNameCacheCreateEntry function (namcache.h)

RxNameCacheCreateEntry allocates and initializes a NAME_CACHE structure with the given name string.

Syntax

PNAME_CACHE RxNameCacheCreateEntry(
  [in] IN PNAME_CACHE_CONTROL NameCacheCtl,
  [in] IN PUNICODE_STRING     Name,
  [in] IN BOOLEAN             CaseInsensitive
);

Parameters

[in] NameCacheCtl

A pointer to the NAME_CACHE_CONTROL structure from which to allocate the entry.

[in] Name

A pointer to the Unicode name string with which to initialize the name cache entry.

[in] CaseInsensitive

A Boolean value that indicates if case insensitive comparions should be used when comparing the Name parameter.

Return value

RxNameCacheCreateEntry returns a pointer to the newly allocated NAME_CACHE structure on success or a NULL pointer if the allocation fails.

Remarks

A network mini-redirector calls RxNameCacheCreateEntry to allocate and initialize a NAME_CACHE structure with the given name string. It is expected that the caller will then initialize any additional network mini-redirector elements of the name cache context, set the lifetime (in seconds) and the Context member of the NAME_CACHE structure and then put the entry on the name cache active list by calling RxNameCacheActivateEntry.

RxNameCacheCreateEntry will first attempt to reuse a NAME_CACHE entry on the free list, if one is available, before allocating a new NAME_CACHE entry.

Requirements

Requirement Value
Target Platform Desktop
Header namcache.h (include Namcache.h)
IRQL <= APC_LEVEL

See also

RxNameCacheActivateEntry

RxNameCacheCheckEntry

RxNameCacheExpireEntry

RxNameCacheExpireEntryWithShortName

RxNameCacheFetchEntry

RxNameCacheFinalize

RxNameCacheFreeEntry

RxNameCacheInitialize