[RegisterApplication is no longer available in Windows Vista. See Windows Messenger for more information.]
Registers an application for use with a Messenger client.
HRESULT RegisterApplication( [in] BSTR bstrAppGUID, [in] BSTR bstrAppName, [in] BSTR bstrAppURL, [in] BSTR bstrPath, [in] LONG ulFlags );
- bstrAppGUID [in]
BSTR that specifies the GUID of the application. Maximum character length is 39.
- bstrAppName [in]
BSTR that specifies the application name. Maximum character length is 256.
- bstrAppURL [in]
BSTR that specifies the URL from which the application can be downloaded. Maximum character length is 256.
- bstrPath [in]
BSTR that specifies the absolute path to the application's executable. Maximum character length is 260.
- ulFlags [in]
LONG that specifies the flag. This value should always be 0, otherwise this function returns E_INVALIDARG.
Returns one of the following values.
The application was registered successfully.
One of the parameters passed to the method was not valid.
The application you are registering has already been registered. (See the following Remarks section).
The method failed to write the information to the registry.
The absolute path to the application cannot be resolved or an application with this GUID is already registered.
Attempting to register an application with a GUID already registered for use with a Messenger client returns SR_APP_ALREADY_REGISTERED.
After registering an application, if you want to re-register it to update any of its parameters (bstrAppName, bstrAppURL, bstrPath, or ulFlags) except for bstrAppGUID, you need to unregister the application first. For example, if you have an application already registered with bstrAppName set to someFile.exe and the next version of someFile.exe takes command line arguments such as someFile.exe /s, which you want to use with a Messenger client, you must unregister the application before re-registering it, assuming the bstrAppGUID did not change. However, if you specify a different bstrAppGUID that is unique and not in use by any other application, you are not required to unregister the application first.
The following table lists the error codes returned by this method.
|0x80004005||The session information cannot be retrieved due to a catastrophic error.|
|0x80070057||One of the parameters passed to the method was not valid.|
Minimum supported client
Minimum supported server
|Windows Server 2008|
- Messenger Session Invite and Messenger Private APIs
- Messenger Lock and Key API
Build date: 6/30/2010