1 out of 1 rated this helpful - Rate this topic

AllocateLocallyUniqueId function

Applies to: desktop apps only

The AllocateLocallyUniqueId function allocates a locally unique identifier (LUID).

Syntax

BOOL WINAPI AllocateLocallyUniqueId(
  __out  PLUID Luid
);

Parameters

Luid [out]

A pointer to a LUID structure that receives the allocated LUID.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The allocated LUID is unique to the local system only, and uniqueness is guaranteed only until the system is next restarted.

The allocated LUID is guaranteed to be nonzero if this function succeeds.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Access Control Overview
Basic Access Control Functions
LookupPrivilegeValue

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
C# syntax
[DllImport("advapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
public static extern bool AllocateLocallyUniqueId([In, Out] ref LUID Luid);
vb.net syntax
<DllImport("advapi32.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> _
Public Shared Function AllocateLocallyUniqueId(<[In], Out> ByRef Luid As LUID) As Boolean
End Function