IoCreateUnprotectedSymbolicLink function (wdm.h)

The IoCreateUnprotectedSymbolicLink routine sets up an unprotected symbolic link between a device object name and a corresponding Win32-visible name.

Syntax

NTSTATUS IoCreateUnprotectedSymbolicLink(
  [in] PUNICODE_STRING SymbolicLinkName,
  [in] PUNICODE_STRING DeviceName
);

Parameters

[in] SymbolicLinkName

Supplies the symbolic link name as a Unicode string.

[in] DeviceName

Supplies the name of the device object to which the symbolic link name refers.

Return value

IoCreateUnprotectedSymbolicLink returns the final status of the operation.

Remarks

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 about when to use IoCreateSymbolicLink, see Named Device Objects.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), IrqlIoPassive4(wdm), PowerIrpDDis(wdm)

See also

IoAssignArcName

IoCreateSymbolicLink

IoDeleteSymbolicLink

IoRegisterDeviceInterface