Predefined ProtocolsPredefined Protocols*
*Contents  *Index  *Topic Contents
*Previous Topic: PI_FLAGS
*Next Topic: Programming the Document Object Model from C/C++

Predefined Protocols

Microsoft® Internet Explorer 4.0 implements various protocols that can be used to identify certain information. This document describes the protocols that Internet Explorer 4.0 implements or supports.

res:

The res: protocol specifies a resource that will be obtained from a module. This protocol takes the following format:

"res://resource file[/resource type]/resource id"

The following list describes each element:
resource file Required. Specifies the path and file name of the module that contains the resource.
resource type Optional. Specifies the string or numerical resource type. This can be either a custom resource type or one of the RT_ pre-defined resource types described in FindResource and defined in WINUSER.H. If a numerical resource type is being specified, the actual number of the identifier, not the identifier itself, must follow a '#' character. See the example below for more information. If this parameter is not specified, the default resource type is RT_HTML.
resource id Required. Specifies the string or numerical identifier of the resource. If a numerical identifier is being specified, the actual number of the identifier, not the identifier itself, must follow a '#' character. See the example below for more information.

The following example shows the correct and incorrect way to format the numerical identifier for the resource type:

//winuser.h defines RT_BITMAP
#include <winuser.h>

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

//this is not correct
"res://mydll.dll/RT_BITMAP/MYBITMAP"

The following example shows the correct and incorrect way to format the numerical identifier for the resource identifier:

#define MYBITMAP 234

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

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

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.