2025-04-27 07:49:33 -04:00

282 lines
11 KiB
Plaintext

/*
@doc NNTPSDK SMTPSDK
@module IMSG.IDL - IDL for the IMsg interface | This interface is used by
the server events model in the NNTP and SMTP servers.
*/
import "oaidl.idl";
import "ocidl.idl";
//
// @interface IMsg | The message interface
//
// @meth HRESULT | Value [propget] |
// Get a property value
// @meth HRESULT | Value [propput] |
// Set a property value
//
// @meth HRESULT | GetVariantA |
// High performance method to get a property value as a variant. This method
// is not automation compatible.
// @meth HRESULT | SetVariantA |
// High performance method to set a property value as a variant. This method
// is not automation compatible.
//
// @meth HRESULT | GetStringA |
// High performance method to get a string property value. This method
// is not automation compatible.
// @meth HRESULT | SetStringA |
// High performance method to set a string property value. This method
// is not automation compatible.
//
// @meth HRESULT | GetDwordA |
// High performance method to get a DWORD property value. This method
// is not automation compatible.
// @meth HRESULT | SetDwordA |
// High performance method to set a DWORD property value. This method
// is not automation compatible.
//
// @meth HRESULT | GetInterfaceA |
// High performance method to get a interface property value. This method
// is not automation compatible.
// @meth HRESULT | SetInterfaceA |
// High performance method to set a interface property value. This method
// is not automation compatible.
//
// @xref <l IMsg Properties>
//
[
object,
uuid(507E7D61-EE7C-11D0-869A-00C04FD65616),
dual,
helpstring("IMsg Interface"),
pointer_default(unique)
]
interface IMsg : IDispatch
{
//
// @method HRESULT | IMsg | Value [propget] | Get the value of a property
// @parm BSTR | bstrProperty | [in] The name of the property to retrieve
// @parm VARIANT * | pvarValue | [out, retval] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.Value [propput]>
//
[propget, id(0), helpstring("property Value")] HRESULT Value(BSTR bstrValue, [out, retval] VARIANT *pVal);
//
// @method HRESULT | IMsg | Value [propput] | Put the value of a property
// @parm BSTR | bstrProperty | [in] The name of the property to set
// @parm VARIANT * | pvarValue | [out, retval] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.Value [propget]>
//
[propput, id(0), helpstring("property Value")] HRESULT Value(BSTR bstrValue, [in] VARIANT newVal);
//
// @method HRESULT | IMsg | GetVariantA | Get a variant property using the ANSI property name
// @parm LPCSTR | pszName | [in] The name of the property to get
// @parm VARIANT * | pvarResult | [out] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.SetVariantA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT GetVariantA(LPCSTR pszName, VARIANT *pvarResult);
//
// @method HRESULT | IMsg | SetVariantA | Set a variant property using the ANSI property name
// @parm LPCWSTR | pszName | [in] The name of the property to set
// @parm VARIANT * | pvarResult | [in] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.GetVariantA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT SetVariantA(LPCSTR pszName, VARIANT *pvarValue);
//
// @method HRESULT | IMsg | GetStringA | Get a string property as an ANSI string using the ANSI property name
// @parm LPCSTR | pszName | [in] The name of the property to set
// @parm VARIANT * | pvarResult | [out] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue TYPE_E_TYPEMISMATCH | Failure, property is not a string
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.SetStringA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT GetStringA(LPCSTR pszName, DWORD *pchCount, LPSTR pszResult);
//
// @method HRESULT | IMsg | SetStringA | Set a string property as an ANSI string using the ANSI property name
// @parm LPCWSTR | pszName | [in] The name of the property to set
// @parm VARIANT * | pvarResult | [in] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue TYPE_E_TYPEMISMATCH | Failure, property is not a string
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.GetStringA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT SetStringA(LPCSTR pszName, DWORD chCount, LPCSTR pszValue);
//
// @method HRESULT | IMsg | GetDwordA | Get a numeric property using the ANSI property name
// @parm LPCSTR | pszName | [in] The name of the property to set
// @parm VARIANT * | pvarResult | [out] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue TYPE_E_TYPEMISMATCH | Failure, property is not a number
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.SetDwordA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT GetDwordA(LPCSTR pszName, DWORD *pdwResult);
//
// @method HRESULT | IMsg | SetDwordA | Set a numeric property using the ANSI property name
// @parm LPCWSTR | pszName | [in] The name of the property to set
// @parm VARIANT * | pvarResult | [out] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue TYPE_E_TYPEMISMATCH | Failure, property is not a number
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.GetDwordA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT SetDwordA(LPCSTR pszName, DWORD dwValue);
//
// @method HRESULT | IMsg | GetInterfaceA | Get a COM interface property using the ANSI property name
// @parm LPCSTR | pszName | [in] The name of the property to set
// @parm VARIANT * | pvarResult | [out] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue TYPE_E_TYPEMISMATCH | Failure, property is not an interface pointer
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.SetInterfaceA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT GetInterfaceA(LPCSTR pszName, REFIID iidDesired, IUnknown **ppunkResult);
//
// @method HRESULT | IMsg | SetInterfaceA | Set a COM interface property using the ANSI property name
// @parm LPCWSTR | pszName | [in] The name of the property to set
// @parm VARIANT * | varResult | [in] The value of the property
// @rvalue S_OK | Success
// @rvalue S_FALSE | Property doesn't exist
// @rvalue E_OUTOFMEMORY | Failure, out of memory
// @rvalue E_INVALIDARG | Failure, invalid argument or argument type
// @rvalue TYPE_E_TYPEMISMATCH | Failure, property is not an interface pointer
// @rvalue E_ACCESSDENIED | Failure, operation not permitted
// @xref <i IMsg>
// @xref <om IMsg.GetInterfaceA>
// @xref <om IMsg.Value [propget]>
// @xref <om IMsg.Value [propput]>
//
HRESULT SetInterfaceA(LPCSTR pszName, IUnknown *punkValue);
};
//
// @interface IMsgLog | The message logging interface
//
// @meth HRESULT | WriteToLog | Write to the log
[
object,
uuid(2229d170-4590-11d1-aa63-00aa006bc80b),
helpstring("IMsg Logging Interface"),
pointer_default(unique)
]
interface IMsgLog : IUnknown
{
// @method HRESULT | IMsgLog | WriteToLog | Write to the log
// @parm LPCWSTR | pszClientHostName | [in] Specifies the Client Host Name. May be NULL.
// @parm LPCWSTR | pszClientUserName | [in] Specifies the Client User Name. May be NULL.
// @parm LPCWSTR | pszServerAddress | [in] Specifies the Server Address May be NULL.
// @parm LPCWSTR | pszOperation | [in] Specifies the operation. May be NULL.
// @parm LPCWSTR | pszTarget | [in] Specifies the target. May be NULL.
// @parm LPCWSTR | pszParameters | [in] Specifies the parameters. May be NULL.
// @parm LPCWSTR | pszVersion | [in] Specifies the version. May be NULL.
// @parm DWORD | dwBytesSent | [in] Specifies the number of bytes sent.
// @parm DWORD | dwBytesReceived | [in] Specifies the number of bytes received.
// @parm DWORD | dwProcessingTimeMS | [in] Specifies the time spent processing, in milliseconds.
// @parm DWORD | dwWin32Status | [in] Specifies the Win32 status code.
// @parm DWORD | dwProtocolStatus | [in] Specifies the protocol status code.
// @parm DWORD | dwPort | [in] Specifies the port.
// @parm LPCWSTR | pszHTTPHeader | [in] Specifies the HTTP header. May be NULL.
// @rvalue S_OK | Success
// @rvalue E_FAIL | Failure.
// @rvalue E_NOTIMPL | Failure, not implemented.
// @xref <i IMsgLog>
HRESULT WriteToLog([in] LPCSTR pszClientHostName,
[in] LPCSTR pszClientUserName,
[in] LPCSTR pszServerAddress,
[in] LPCSTR pszOperation,
[in] LPCSTR pszTarget,
[in] LPCSTR pszParameters,
[in] LPCSTR pszVersion,
[in] DWORD dwBytesSent,
[in] DWORD dwBytesReceived,
[in] DWORD dwProcessingTimeMS,
[in] DWORD dwWin32Status,
[in] DWORD dwProtocolStatus,
[in] DWORD dwPort,
[in] LPCSTR pszHTTPHeader);
};
[
uuid(507E7D54-EE7C-11D0-869A-00C04FD65616),
version(1.0),
helpstring("imsg 1.0 Type Library")
]
library IMSGLib
{
importlib("stdole2.tlb");
[
uuid(507E7D62-EE7C-11D0-869A-00C04FD65616),
helpstring("Msg Class")
]
coclass Msg
{
[default] interface IMsg;
};
};