An IIlsMain object is created from CoCreateInstance with a predefined class identifier (CLSID_UserLocationServices) and interface (IID_IIlsMain).
IIlsMain Interface |
IConnectionPointContainer |
IConnectionPoint—IIlsNotify Interface |
The IIlsMain object provides the IIlsMain interface, which is instantiated from IID_IIlsMain. The interface provides the methods described in this section.
Abort |
CreateAttributes |
CreateFilter |
CreateServer |
CreateUser |
EnumUserNames |
EnumUsers |
GetUser |
Initialize |
StringToFilter |
Uninitialize |
HRESULT IIlsMain::Abort(
ULONG uReqID);
Aborts the asynchronous request for the specified unique request identifier.
S_OK | Success. |
ILS_E_PARAMETER | Request identifier doesn't match any currently in the queue. |
ILS_E_FAIL | Not able to abort this type of request (register and unregister). |
ILS_E_NOT_INITIALIZED | IIlsMain interface is not initialized. |
This method will not abort a register or unregister process.
Back to ILS Object
HRESULT IIlsMain::CreateAttributes(
ILS_ATTR_TYPE AttrType,
IIlsAttributes ** ppAttributes);
Instantiates an Attributes object that can be used with an extended attribute request to the ILS server.
S_OK | Success. |
ILS_E_POINTER | ppAttributes is NULL. |
ILS_E_PARAMETER | AttrType is incorrect. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
The Attributes object is currently overloaded to be used in two ways. The AttrType parameter enables the application to specify how the attribute is to be used:
Back to ILS Object
HRESULT IIlsMain::CreateFilter(
ILS_FILTER_TYPE FilterType,
ILS_FILTER_OP FilterOp,
IIlsFilter **ppFilter);
Creates a Filter object that can be used or manipulated.
S_OK | Success. |
ILS_S_SERVER_MAY_NOT_SUPPORT | LDAP server might not support these types of filter operations. |
ILS_E_POINTER | ppFilter is NULL. |
ILS_E_PARAMETER | Filter operation and filter type are incompatible. |
ILS_E_FILTER_TYPE | Filter type is invalid. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
FilterOp must be one of the following if FilterType is ILS_FILTERTYPE_SIMPLE. |
ILS_FILTEROP_EQUAL |
ILS_FILTEROP_APPROX |
ILS_FILTEROP_LESS_THAN |
ILS_FILTEROP_GREATER_THAN |
ILS_FILTEROP_EXIST |
FilterOp must be one of the following if FilterType is ILS_FILTERTYPE_COMPOSITE. |
ILS_FILTEROP_AND |
ILS_FILTEROP_OR |
ILS_FILTEROP_NOT |
Back to ILS Object
HRESULT IIlsMain::CreateServer(
BSTR bstrServerName,
IIlsServer **ppServer);
Creates an ILS Server object. The application can set the various parameters associated with a server, such as authentication credentials.
S_OK | Success. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
ILS_E_POINTER | Either or both parameters are NULL, thus invalid. |
Back to ILS Object
HRESULT IIlsMain::CreateUser(
BSTR bstrUserID,
BSTR bstrAppName,
IlsUser **ppUser);
Creates an ILS User object, which the client application can modify and register with a server.
S_OK | Success. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
ILS_E_POINTER | User pointer is NULL. |
ILS_E_PARAMETER | User name or application name is NULL. |
Back to ILS Object
HRESULT IIlsMain::EnumUserNames(
IIlsServer *pServer,
IIlsFilter *pFilter,
IEnumIlsNames **ppEnumUserNames,
ULONG *puReqID);
Enumerates the names of the users currently registered on the specified ILS server.
S_OK | Success. |
ILS_E_NOT_IMPL | User enumerator pointer is not NULL; synchronous interface is not yet implemented. |
ILS_E_POINTER | Address of the server object, filter, or request identifier is NULL. |
ILS_E_NOT_INITIALIZED | IIlsMain interface is not initialized. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
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 IIlsNotify::EnumUserNamesResult notification for the enumeration result.
Back to ILS Object
HRESULT IIlsMain::EnumUsers(
IIlsServer *pServer,
IIlsFilter *pFilter,
IIlsAttributes *pAttrib,
IEnumIlsUser **ppEnumUsers,
ULONG *puReqID);
Enumerates the list of User objects representing the users currently registered on the specified ILS server.
S_OK | Success. |
ILS_E_NOT_IMPL | User enumerator pointer is not NULL; synchronous interface is not yet implemented. |
ILS_E_POINTER | Address of the server object, filter, or request identifier is NULL. |
ILS_E_NOT_INITIALIZED | IIlsMain interface is not initialized. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
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 IIlsNotify::EnumUsersResult notification for the enumeration result.
Back to ILS Object
HRESULT IIlsMain::GetUser(
[in] IIlsServer *pServer,
[in] BSTR bstrUserID,
[in] BSTR bstrAppID,
[in] BSTR bstrProtID,
[in] IIlsAttributes *pAttrib,
[out] IIlsUser **ppILSUser,
[out] ULONG *puReqID);
Retrieves the detailed information for the specified user from the specified server.
S_OK | Success. |
ILS_E_NOT_IMPL | User pointer is not NULL; synchronous interface is not yet implemented. |
ILS_E_POINTER | Pointer parameters are NULL. |
ILS_E_FAIL | IIlsMain interface is not initialized. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
This method is currently an asynchronous operation, but the interface is defined to enable future implementation of synchronous operation. When called asynchronously, the application will receive the IIlsNotify::GetUserResult notification for the request result.
If bstrAppID is NULL, the globally unique identifier (GUID) returned from IIlsUser::GetGuid is all zeros.
Back to ILS Object
HRESULT IIlsMain::Initialize(void);
Initializes the ILS for the application.
S_OK | Success. |
ILS_E_FAIL | Interface is already initialized. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
ILS_E_WINSOCK | WSA (Windows Socket API) services could not be started. |
ILS_E_THREAD | Request thread could not be created. |
Back to ILS Object
HRESULT IIlsMain::StringToFilter(
BSTR bstrFilterString,
IIlsFilter **ppFilter);
Creates a Filter object that can be used or manipulated by supplying a syntactical description of the filter desired.
S_OK | Success. |
ILS_E_POINTER | Filter string is NULL. |
ILS_E_FAIL | Could not convert the string. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
ILS_E_FILTER_STRING | Incorrect filter string. |
The full filter string definition will be specified in the next draft of the ILS interface. Following is a brief description:
Back to ILS Object
HRESULT IIlsMain::Uninitialize(void);
Frees all the resources used by the current application.
Back to ILS Object
The IConnectionPointContainer_IIlsMain interface is instantiated from IID_IConnectionPointContainer to identify ILS as a connectable object. The interface contains the standard set of methods for IConnectionPointContainer_IIlsMain.
The IConnectionPoint_IIlsMain interface is instantiated from IConnectionPointContainer_IIlsMain. The ILS object provides only one connection point—IID_IIlsNotify—for a client's sink object to receive the callback notification. The client must provide the IIlsNotify interface methods described in this section in the sink object.
This interface is implemented by a client application that will receive notifications from an ILS object.
GetUserResult |
EnumUserNamesResult |
EnumUsersResult |
HRESULT IIlsNotify::EnumUserNamesResult(
ULONG uReqID,
IEnumIlsNames *pEnumUserName,
HRESULT hResult);
Notifies the application of the result of the user name enumeration from an ILS server.
Back to ILS Object
HRESULT IIlsNotify::EnumUsersResult(
ULONG uReqID,
IEnumIlsUser *pEnumUser,
HRESULT hResult);
Notifies the application of the result of the user enumeration from an ILS server.
Back to ILS Object
HRESULT IIlsNotify::GetUserResult(
ULONG uReqID,
IIlsUser *pUser,
HRESULT hResult);
Notifies the application of the result of the user information request from an ILS server.
Back to ILS Object
Last Updated: November 1, 1997
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.