3.10.4.1 InstanceName (Set) (Opnum 10)

The InstanceName method sets the web server instance to be used by subsequent method calls.

 [propput, id(4)] HRESULT InstanceName(
   [in] BSTR newVal
 );

newVal: A string that specifies the web server instance.<33>

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it failed. If the 12-bit facility code (bits 16–27) is set to 0x007, the value contains a Win32 error code in the lower 16 bits. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [[MS-ERREF].

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0x000006cf

RPC_S_STRING_TOO_LONG

The string is too long.

The opnum field value for this method is 10.

When processing this call, the server MUST do the following:

  • If the newVal string is empty, return E_INVALIDARG.

  • If the number of characters in newVal is more than 260, return RPC_S_STRING_TOO_LONG.

  • Save the value of the newVal parameter for use in subsequent calls on the interface.