次の方法で共有


RegistrationAttribute.RegistrationContext.EscapePath Method

Reformats a string as needed by the registration tool.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'宣言
Public MustOverride Function EscapePath ( _
    str As String _
) As String
'使用
Dim instance As RegistrationAttribute..::.RegistrationContext
Dim str As String
Dim returnValue As String

returnValue = instance.EscapePath(str)
public abstract string EscapePath(
    string str
)
public:
virtual String^ EscapePath(
    String^ str
) abstract
public abstract function EscapePath(
    str : String
) : String

Parameters

Return Value

Type: System.String

The reformatted path string.

Remarks

Many registration programs require strings to be in a special format in order to work. For instance, the files used by regedit.exe (.reg / .vbr) use back slash characters ("\") to indicate special characters using character escapes. In order for regedit.exe to interpret a file path correctly, each back slash must be repeated to form the correct character escape ("\\"). For more information on character escapes, see Character Escapes. In Regpkg.exe, EscapePath formats a string containing a file path by replacing single back slash characters ("\") with double back slash characters ("\\"). However, other classes that implement EscapePath can perform whatever string conversion is required.

Permissions

See Also

Concepts

Character Escapes

Reference

RegistrationAttribute.RegistrationContext Class

RegistrationAttribute.RegistrationContext Members

Microsoft.VisualStudio.Shell Namespace

RegistrationAttribute.RegistrationContext