The invention discloses a method for mapping a logical
device name to a drive letter, and mainly relates to the field of progress safety protection and file screening. The method comprises the following steps of: adopting
symbolic link names as parameters, using a function, i.e. Initialize Object attributes, to carry out initialization to obtain OBJECT_ATTRIBUTES corresponding to the
symbolic link names, and extracting the corresponding drive letter from the
symbolic link names; using a function, i.e. Zw Open
Symbolic Link Object, to adopt the OBJECT_ATTRIBUTES as parameters, to obtain a
handle of the corresponding object; and inquiring the
handle by using a function, i.e. Zw Query
Symbolic Link Object, so as to obtain the logical
device name corresponding to the symbolic link name, and preserving the corresponding relation between the logical
device name and the drive letter. The method establishes the corresponding relation between the logical device name and the drive letter, thus being convenient for users.