Skip to content

Latest commit

 

History

History
178 lines (149 loc) · 4.12 KB

nf-amsi-iamsistream-getattribute.md

File metadata and controls

178 lines (149 loc) · 4.12 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:amsi.IAmsiStream.GetAttribute
IAmsiStream::GetAttribute (amsi.h)
Returns a requested attribute from the stream.
GetAttribute
GetAttribute method [Antimalware Scan Interface]
GetAttribute method [Antimalware Scan Interface]
IAmsiStream interface
IAmsiStream interface [Antimalware Scan Interface]
GetAttribute method
IAmsiStream.GetAttribute
IAmsiStream::GetAttribute
amsi.iamsistream_getattribute
amsi/IAmsiStream::GetAttribute
amsi\iamsistream_getattribute.htm
AMSI
7AD74D85-1A1E-4AFD-91C1-670AC7280285
12/05/2018
GetAttribute, GetAttribute method [Antimalware Scan Interface], GetAttribute method [Antimalware Scan Interface],IAmsiStream interface, IAmsiStream interface [Antimalware Scan Interface],GetAttribute method, IAmsiStream.GetAttribute, IAmsiStream::GetAttribute, amsi.iamsistream_getattribute, amsi/IAmsiStream::GetAttribute
amsi.h
Windows
Windows 10 [desktop apps only]
Windows Server 2016 [desktop apps only]
Windows
19H1
IAmsiStream::GetAttribute
amsi/IAmsiStream::GetAttribute
c++
APIRef
kbSyntax
COM
amsi.h
IAmsiStream.GetAttribute

IAmsiStream::GetAttribute

-description

Returns a requested attribute from the stream.

-parameters

-param attribute [in]

Specifies the type of attribute to be returned. See Remarks.

-param dataSize [in]

The size of the output buffer, data, in bytes.

-param data [out]

Buffer to receive the requested attribute. data must be set to its size in bytes.

-param retData [out]

The number of bytes returned in data. If this method returns E_NOT_SUFFICIENT_BUFFER, retData contains the number of bytes required.

-returns

This method can return one of these values.

Return code Description
S_OK
Success.
E_NOTIMPL
The attribute is not supported.
E_NOT_SUFFICIENT_BUFFER
The size of the output buffer, as indicated by data, is not large enough. retData contains the number of bytes required.
E_INVALIDARG
One or more argument is invalid.
E_NOT_VALID_STATE
The object is not initialized.

-remarks

Depending on the attribute requested in attribute, the following data should be copied to data:

attribute data
AMSI_ATTRIBUTE_APP_NAME The name, version, or GUID string of the calling application, copied from a LPWSTR.
AMSI_ATTRIBUTE_CONTENT_NAME The filename, URL, unique script ID, or similar of the content, copied from a LPWSTR.
AMSI_ATTRIBUTE_CONTENT_SIZE The size of the input, as a ULONGLONG.
AMSI_ATTRIBUTE_CONTENT_ADDRESS The memory address if the content is fully loaded into memory.
AMSI_ATTRIBUTE_SESSION Session is used to associate different scan calls, such as if the contents to be scanned belong to the same original script. Return nullptr if the content is self-contained.

-see-also

AMSI_ATTRIBUTE

IAmsiStream