The IoCreateUnprotectedSymbolicLink routine sets up an unprotected symbolic link between a device object name and a corresponding Win32®-visible name.
NTSTATUS
IoCreateUnprotectedSymbolicLink(
IN PUNICODE_STRING SymbolicLinkName,
IN PUNICODE_STRING DeviceName
);
IoCreateUnprotectedSymbolicLink returns the final status of the operation.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
WDM drivers do not name device objects and therefore should not use this routine. Instead, a WDM driver should call IoRegisterDeviceInterface to set up a symbolic link.
IoCreateUnprotectedSymbolicLink can be used by drivers if the user needs to be able to manipulate the symbolic link. For example, the parallel and serial drivers create unprotected symbolic links for LPTx and COMx, so that users can manipulate and reassign them by using the MODE command.
In general, drivers should call this routine instead of IoCreateSymbolicLink if a protected subsystem lets end users change what a named device references as, for example, when using LPT1 to access a network printer.
For more information on when to use IoCreateSymbolicLink, see Named Device Objects.
Callers of IoCreateUnprotectedSymbolicLink must be running at IRQL = PASSIVE_LEVEL.
IoRegisterDeviceInterface, IoAssignArcName, IoCreateSymbolicLink, IoDeleteSymbolicLink