User Object


The User object represents the user information published on the ILS server.

IIlsUser Interface
IConnectionPointIIlsUserNotify Interface

Up ArrowBack to ILS Reference

IIlsUser Interface

The IIlsUser interface is obtained from the IIlsMain::CreateUser, IIlsMain::EnumUsers, or IIlsMain::GetUser method. This section describes the IIlsUser interface methods.

AddProtocol
Clone
CreateProtocol
EnumProtocols
GetAllExtendedAttributes
GetExtendedAttribute
GetGuid
GetProtocol
GetStandardAttribute
GetState
GetVisible
IsWritable
Register
RemoveExtendedAttribute
RemoveProtocol
SetExtendedAttribute
SetGuid
SetStandardAttribute
SetVisible
Unregister
Update

Up ArrowBack to User Object

IIlsUser::AddProtocol

HRESULT IIlsUser::AddProtocol(
IIlsProtocol *pProtocol,
ULONG *puReqID);

Adds a new protocol for the user's application.

pProtocol
Protocol object.
puReqID
Address of a ULONG buffer to receive the request identifier.

Depending on the User object registration state, this method can be either synchronous or asynchronous. If the User object is unregistered when the AddProtocol method is called to add a protocol object to the User object, this method returns synchronously and requires no interaction with the server. The protocol object will be added when the User object registers with the server. If the user object is already registered at the time of calling AddProtocol, the call is asynchronous and will involve sending an update to the server to add the Protocol object to the User object. If asynchronous, the application receives the IIlsUserNotify::ProtocolChangeResult notification for the request result.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::Clone

HRESULT IIlsUser::Clone(
[out] IIlsUser **ppUser);

Returns a cloned version of the User object, with the identical set of standard and extended attributes set before this method is called.

ppUser
User object from which the application can clone user information.

A cloned object can be used to register the same user to different servers. There is no synchronization between the cloned and the original User object.

To ensure that all attributes are written correctly, the User object to be cloned should be registered on a server and updated before calling Clone.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::CreateProtocol

HRESULT IIlsUser::CreateProtocol(
BSTR bstrProtocolID,
ULONG uPortNumber,
BSTR bstrMimeType,
IIlsProtocol **ppProtocol);

Creates a Protocol object that represents a protocol the user's application can use to establish the communication channel.

bstrProtocolID
Null-terminated string for the protocol's unique identifier.
uPortNumber
Port number that is used by the protocol.
bstrMimeType
Null-terminated string for the protocol's MIME type.
ppProtocol
Pointer to receive the Protocol object.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::EnumProtocols

HRESULT IIlsUser::EnumProtocols(
IIlsFilter *pFilter,
IIlsAttributes *pAttributes,
IEnumIlsProtocol **ppEnumProtocol,
ULONG *puReqID);

Returns a protocol enumerator for the user's application, with an option to apply an enumeration filter and an option to retrieve extended protocol attributes.

pFilter
Filter object. This parameter is currently ignored.
pAttributes
Attributes object that contains the extended attributes to retrieve from the server. This parameter is currently ignored.
ppEnumProtocol
If the method is called synchronously, a pointer to receive the Enumerator object. (Unused pending implementation of synchronous operation of this method.)
puReqID
Address of a ULONG buffer to receive the request identifier.

This method is currently an asynchronous operation, but the interface is defined to enable future implementation of synchronous operation. When called asynchronously, the application receives the IIlsUserNotify::EnumProtocolsResult notification for the enumeration result.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::GetAllExtendedAttributes

HRESULT IIlsUser::GetAllExtendedAttributes(
IIlsAttributes **ppAttributes);

Returns all extended attributes, in the form of an Attributes object, from the User object. This is an alternative to getting each extended attribute individually through IIlsUser::GetExtendedAttribute.

ppAttributes
Buffer to receive the address of the Attributes object.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::GetExtendedAttribute

HRESULT IIlsUser::GetExtendedAttribute(
BSTR bstrName,
BSTR *pbstrValue);

Retrieves an extended attribute from a User object that was previously retrieved from the server.

bstrName
Name of the extended attribute.
pbstrValue
Address of the buffer to receive the value of the extended attribute.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::GetGuid

HRESULT IIlsUser::GetGuid(
GUID *pGuid);

Returns the GUID (globally unique identifier) of the retrieved User object.

pGuid
Pointer to receive the GUID associated with this User object.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::GetProtocol

HRESULT IIlsUser::GetProtocol(
BSTR bstrProtocolID,
IIlsAttributes *pAttributes,
IIlsProtocol **ppProtocol,
ULONG *puReqID);

Requests a specific Protocol object that belongs to the user.

bstrProtocolID
Specified protocol to retrieve.
pAttributes
Attributes object that contains the names of the extended attributes to retrieve from the server. If this parameter is NULL, the enumeration is performed without retrieving any extended attributes.
ppProtocol
If the method is called synchronously, a pointer to receive the Enumerator object. (Unused pending implementation of synchronous operation of this method.) Must be NULL.
puReqID
Address of a ULONG buffer to receive the request identifier.

This method is currently an asynchronous operation, but the interface is defined to enable future implementation of synchronous operation. When called asynchronously, the application receives the IIlsUserNotify::GetProtocolResult notification for the request. The Protocol object can be used to retrieve information about the protocol.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::GetStandardAttribute

HRESULT IIlsUser::GetStandardAttribute(
ILS_STD_ATTR_NAME StdAttr,
BSTR *pbstrValue);

Returns a standard attribute belonging to the user.

StdAttr
Standard attribute of the User object. Can be one of the following:
ILS_STDATTR_USER_ID Unique identifier of the user.
ILS_STDATTR_IP_ADDRESS IP address of the user.
ILS_STDATTR_EMAIL_NAME E-mail name of the user.
ILS_STDATTR_FIRST_NAME First name of the user.
ILS_STDATTR_LAST_NAME Last name of the user.
ILS_STDATTR_CITY_NAME Name of the city in which the user is located.
ILS_STDATTR_COUNTRY_NAME Name of the country in which the user is located.
ILS_STDATTR_COMMENT General textual comment.
ILS_STDATTR_FLAGS Flags need to be set to "1" for the User object to be visible in enumeration.
ILS_STDATTR_APP_NAME Unique string identifying the application.
ILS_STDATTR_APP_MIME_TYPE MIME type used by the application.
ILS_STDATTR_APP_GUID GUID (globally unique identifier) of the application.
pbstrValue
Pointer to receive a null-terminated string for the user's standard attribute.

NetMeeting uses two-letter country codes for ILS_STDATTR_COUNTRY_NAME.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::GetState

HRESULT IIlsUser::GetState(
ILS_STATE *pState);

Returns the registration state on the specified ILS server.

pState
Address of a buffer to receive the current ILS state. Can be one of the following:
ILS_REGISTERING The user is being registered with the ILS server.
ILS_REGISTERED The user is registered with the ILS server.
ILS_UNREGISTERING The user is unregistered with the ILS server.
ILS_UNREGISTERED The user is not registered with the ILS server.
ILS_REGISTERED_BUT_INVALID Server does not recognize the current user.
ILS_NETWORK_DOWN Cannot connect to the server.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::GetVisible

HRESULT IIlsUser::GetVisible(
DWORD *pdwVisible);

Returns the visible state of the user.

pdwVisible
Pointer to receive a DWORD for the user's visible state.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::IsWritable

HRESULT IIlsUser::IsWritable(
BOOL *pValue);

Returns whether the User object can be written to.

pValue
Address of the buffer to receive the Boolean variable.

User objects returned from enumeration or IIlsMain::GetUser cannot be written to, but those created through IIlsMain::CreateUser can.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::Register

HRESULT IIlsUser::Register(
IIlsServer *pServer,
ULONG *puReqID);

Publishes the user information to the ILS server.

pServer
Address of the ILS Server object.
puReqID
Address of a ULONG buffer to receive the request identifier.

This method is an asynchronous operation. The application receives the IIlsUserNotify::RegisterResult notification for the registration result.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::RemoveExtendedAttribute

HRESULT IIlsUser::RemoveExtendedAttribute(
BSTR bstrName);

Removes an extended attribute from the User object. The modification will not be reflected on the ILS server until the IIlsUser::Register or IIlsUser::Update method is called.

bstrName
Name of the extended attribute to remove.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::RemoveProtocol

HRESULT IIlsUser::RemoveProtocol(
IIlsProtocol *pProtocol,
ULONG *puReqID);

Removes a protocol for the user's application.

pProtocol
Protocol object.
puReqID
Address of a ULONG buffer to receive the request identifier.

This method is an asynchronous operation. The application receives the IIlsUserNotify::ProtocolChangeResult notification for the request result.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::SetExtendedAttribute

HRESULT IIlsUser::SetExtendedAttribute(
BSTR bstrName,
BSTR bstrValue);

Adds or modifies an extended attribute of the user. The modification will not be reflected on the ILS server until the IIlsUser::Register or IIlsUser::Update method is called.

bstrName
Name of the extended attribute.
bstrValue
Value of the extended attribute.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::SetGuid

HRESULT IIlsUser::SetGuid(
*pGuid);

Sets the GUID (globally unique identifier) of the User object. An application that creates the User object should insert its GUID in this property.

pGuid
Pointer that contains the GUID to be set for this User object.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::SetStandardAttribute

HRESULT IIlsUser::SetStandardAttribute(
ILS_STD_ATTR_NAME StdAttr,
BSTR bstrValue);

Allows the application to modify a standard attribute of the user. The modification will not be reflected on the ILS server until the IIlsUser::Register or IIlsUser::Update method is called.

StdAttr
Standard attribute of the User object. Can be one of the following:
ILS_STDATTR_USER_ID Unique identifier of the user. Must be specified at the time of User object creation.
ILS_STDATTR_IP_ADDRESS IP address of the user, specified as four octets specified in decimal; for example, "123.255.0.123". If this attribute is not set, the ILS interface automatically detects the network address and uses the found IP address.
ILS_STDATTR_EMAIL_NAME E-mail name of the user.
ILS_STDATTR_FIRST_NAME First name of the user.
ILS_STDATTR_LAST_NAME Last name of the user.
ILS_STDATTR_CITY_NAME Name of the city in which the user is located.
ILS_STDATTR_COUNTRY_NAME Name of the country in which the user is located.
ILS_STDATTR_COMMENT General textual comment.
ILS_STDATTR_FLAGS Flags to indicate the visibility of the User object on the server. Use IIlsUser::SetVisible to modify this flag.
ILS_STDATTR_APP_NAME Unique string identifying the application. Cannot set this attribute. Must be specified at the time of User object creation.
ILS_STDATTR_APP_MIME_TYPE MIME type used by the application.
ILS_STDATTR_APP_GUID GUID (globally unique identifier) of the application.
ILS_STDATTR_PROTOCOL_NAME Applies to the protocol object.
ILS_STDATTR_PROTOCOL_MIME_TYPE Applies to the protocol object.
ILS_STDATTR_PROTOCOL_PORT Applies to the protocol object.
bstrValue
Null-terminated string for the user's standard attribute.

A user's email name is used his/her default user id (ILS_STDATTR_USER_ID) on the server. The ILS server enforces the uniqueness of this attribute.

NetMeeting uses two-letter country codes for ILS_STDATTR_COUNTRY_NAME.

ILS servers use Email name (ILS_STDATTR_EMAIL_NAME) and Country code (ILS_STDATTR_COUNTRY_NAME) as part of the full LDAP path on the server. As a result, these attributes cannot be modified using this method while the user is registered on the server. To modify these attributes, log off the server and create a new user object with the desired changes.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::SetVisible

HRESULT IIlsUser::SetVisible(
DWORD fVisible);

Allows the application to modify the visibility state for the user. The modification will not be reflected on the ILS server until the IIlsUser::Register or IIlsUser::Update method is called.

fVisible
DWORD containing the user's visible state. A value of 0x01 indicates this User object is to be made visible to enumeration. A value of 0x00 indicates this User object is not visible for enumeration, but will succeed if the matching user identifier is requested in IIlsMain::GetUser operations.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::Unregister

HRESULT IIlsUser::Unregister(
ULONG *puReqID);

Removes the User object from the specified ILS server.

puReqID
Address of a ULONG buffer to receive the request identifier.

This method is an asynchronous operation. The application receives the IIlsUserNotify::RegisterResult notification for the unregistration result.

It is not recommended to use this method if the registration is in progress (that is, the IIlsUser state is ILS_REGISTERING).

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUser::Update

HRESULT IIlsUser::Update(
ULONG *puReqID);

Reflects updated user information to the ILS server.

puReqID
Address of a ULONG buffer to receive the request identifier.

This method is an asynchronous operation. The application receives the IIlsUserNotify::UpdateResult notification for the registration result.

Up ArrowBack to IIlsUser Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IConnectionPointContainer

The IConnectionPointContainer_IIlsUser interface is instantiated from IID_IConnectionPointContainer to identify User as a connectable object. The interface contains the standard set of methods for IConnectionPointContainer_IIlsUser.

IConnectionPoint

The IConnectionPoint_IIlsUser interface is instantiated from IConnectionPointContainer_IIlsUser. The User object provides only one connection point—IID_IIlsUserNotify—for a client's sink object to receive the callback notification. The client must provide the IIlsUserNotify interface methods described in this section in the sink object.

IIlsUserNotify Interface

This interface is implemented by a client application that will receive notifications from a User object.

EnumProtocolsResult
GetProtocolResult
ProtocolChangeResult
RegisterResult
StateChanged
UpdateResult

Up ArrowBack to User Object

IIlsUserNotify::EnumProtocolsResult

HRESULT IIlsUserNotify::EnumProtocolsResult(
ULONG uReqID,
IEnumIlsProtocol *pEnumProtocol,
HRESULT hResult);

Notifies the application of the result of the protocol enumeration request. If the request is successful, pEnumProtocol contains a valid protocol identification enumerator.

uReqID
Request identifier matching the IIlsUser::EnumProtocols method.
pEnumProtocol
Protocol identification enumerator.
hResult
Enumeration result. Returns S_OK if the enumerator is valid, or an error code otherwise.

Up ArrowBack to IIlsUserNotify Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUserNotify::GetProtocolResult

HRESULT IIlsUserNotify::GetProtocolResult(
ULONG uReqID,
IIlsProtocol *pProtocol,
HRESULT hResult);

Notifies the application of the result of the protocol resolve request. If the request is successful, pProtocol contains a valid Protocol object.

uReqID
Request identifier matching the IIlsUser::GetProtocol method.
pProtocol
Protocol object.
hResult
Modification result. Returns S_OK if the Protocol object is valid, or an error code otherwise.

Up ArrowBack to IIlsUserNotify Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUserNotify::ProtocolChangeResult

HRESULT IIlsUserNotify::ProtocolChangeResult(
ULONG uReqID,
HRESULT hResult);

Notifies the application of the result of the protocol add and remove requests. If the request is successful after registration, the information is propagated to the ILS server.

uReqID
Request identifier matching the IIlsUser::AddProtocol or IIlsUser::RemoveProtocol method.
hResult
The modification result. Returns S_OK if the information is changed, or an error code otherwise.

Up ArrowBack to IIlsUserNotify Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUserNotify::RegisterResult

HRESULT IIlsUserNotify::RegisterResult(
ULONG uReqID,
HRESULT hResult);

Notifies the application of the result of the user register/unregister requests.

uReqID
Request identifier matching the IIlsUser::Register or IIlsUser::Unregister method.
hResult
Result of the register/unregister request. Returns S_OK, or an error code otherwise.

Up ArrowBack to IIlsUserNotify Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUserNotify::StateChanged

HRESULT IIlsUserNotify::StateChanged(
ULONG fPrimary,
BSTR bstrServerName);

Notifies the application when the server state for the User object has changed. When notified, the application should call IIlsUser::GetState for the new state information.

fPrimary
If set to TRUE, the application can optionally put up a dialog box to inform the user about a state change. If set to FALSE, the application should not notify the user.
bstrServerName
Null-terminated string containing the name of the server whose state has changed.

Up ArrowBack to IIlsUserNotify Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

IIlsUserNotify::UpdateResult

HRESULT IIlsUserNotify::UpdateResult(
ULONG uReqID,
HRESULT hResult);

Notifies the application of the result of the user update requests.

uReqID
Request identifier matching the IIlsUser::Update method.
hResult
Result of the update request. Returns S_OK, or an error code otherwise.

Up ArrowBack to IIlsUserNotify Interface

Up ArrowBack to User Object

Up ArrowBack to ILS Object Listing

Last Updated: November 1, 1997
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.