Delen via


res Protocol

Specifies a resource that will be obtained from a module.

res://sFile[/sType]/sID

sFile Percent-encoded path and file name of the module that contains the resource.

sType String or numerical resource type. This can be either a custom resource or one of the predefined resource types that are recognized by the FindResource function. If a numerical resource type is specified, the number of the identifier must follow a # character. If this parameter is not specified, the default resource type is RT_HTML or RT_FILE.

sID String or numerical identifier of the resource. If a numerical identifier is specified, the actual number of the identifier, not the identifier itself, must follow a # character. See the example for more information.

Remarks

For purposes of decoding the res:// scheme, everything in the sFile path is treated as the domain. The colon (':') delimiter is allowed, but special characters such as backslash ('\') must be percent-encoded. Use '%5C' to encode the backslash character.

Security Warning: Microsoft Internet Explorer 6 Service Pack 1 (SP1) and later no longer allows browsing a local machine from the Internet zone. For instance, if an Internet site contains a link to a local file, Internet Explorer 6 SP1 or later displays a blank page when a user clicks on the link.

Examples

If a numerical identifier is specified, the actual number of the identifier, not the identifier itself, must follow the # character. This example shows the correct and incorrect ways to format the numerical identifier for the resource type.

#define MYBITMAP 234

// This is correct.
"res://mydll.dll/#2/#234"

// This is not correct.
"res://mydll.dll/#2/MYBITMAP"

The following URI retrieves a custom "XML" resource from a resource module in the "C:\windows\system32 directory.

res://C:%5Cwindows%5Csystem32%5Cmsxml3.dll/XML/DEFAULTSS.XSL