The UuidCreate function creates a new UUID.
#include <rpc.h>
RPC_STATUS RPC_ENTRY UuidCreate(
UUID * Uuid
);
Value | Meaning |
---|---|
RPC_S_OK | Success |
RPC_S_UUID_LOCAL_ONLY | The UUID is guaranteed to be unique to this machine only. |
RPC_S_UUID_NO_ADDRESS | Cannot get Ethernet or token-ring hardware address for this computer |
In Windows NT, versions 4.0 and later, Windows 95, DCOM release, and Windows 98, UuidCreate returns RPC_S_UUID_LOCAL_ONLY when the originating machine does not have an ethernet/token ring (IEEE 802.x) address. In this case, the generated UUID is a valid identifier, and is guaranteed to be unique among all UUIDs generated on the machine. However, the possibility exists that another machine without an ethernet/token ring address generated the identical UUID. Therefore you should never use this UUID to identify an object that is not strictly local to your machine. Machines with ethernet/token ring addresses generate UUIDs that are guaranteed to be globally unique.
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcdce.h.
Import Library: Link with rpcrt4.lib.