IHTTPMailTransport::InitNew method

[IHTTPMailTransport::InitNew is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Initializes the HTTPMail transport.

Syntax

HRESULT InitNew(
  [in] LPCSTR            pszUserAgent,
  [in] LPCSTR            pszLogFilePath,
  [in] IHTTPMailCallback *pCallback
);

Parameters

pszUserAgent [in]

Type: LPCSTR

Specifies an LPCSTR that contains the user agent string sent in HTTP queries.

pszLogFilePath [in]

Type: LPCSTR

Specifies an LPCSTR that contains the full path and name of the file in which to log the protocol commands. NULL is a valid value (no logging).

pCallback [in]

Type: IHTTPMailCallback*

Specifies a pointer to the transport callback interface.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates success.
E_INVALIDARG
Indicates that pszUserAgent or pCallback is NULL.
E_OUTOFMEMORY
Indicates that an attempt to allocate memory failed.
IXP_E_ALREADY_CONNECTED
Indicates that the transport is currently connected.
IXP_E_SOCKET_INIT_ERROR
Indicates that the TCP/IP socket connection could not be initialized.

Remarks

This method must be called to start the transport before any other methods can be called.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Product
Outlook Express 6.0
Header
Imnxport.h
IDL
Imnxport.idl
DLL
Inetcomm.dll (version 6.0 or later)