StorPortSecureCopyMemory 函数 (storport.h)

StorPortSecureCopyMemory 安全地复制缓冲区之间的字节。

语法

ULONG StorPortSecureCopyMemory(
  [out] PVOID       Dest,
  [in]  SIZE_T      DestSizeInBytes,
  [in]  const PVOID Src,
  [in]  SIZE_T      Count
);

参数

[out] Dest

指向要复制到的目标缓冲区的指针。

[in] DestSizeInBytes

Dest 指向的缓冲区的大小(以字节为单位)。

[in] Src

指向要从中复制的源缓冲区的指针。

[in] Count

要从 Src 复制到 Dest的字节数。

返回值

此函数返回以下状态代码之一。

返回代码 描述
STOR_STATUS_SUCCESS 复制了指定的字节数。
STOR_STATUS_INVALID_PARAMETER 参数无效;例如,Dest 为 null 指针。
STOR_STATUS_BUFFER_TOO_SMALL 目标缓冲区大小小于要复制的字节数。

言论

微型端口调用 StorPortSecureCopyMemory,以安全地将字节从虚拟源缓冲区复制到虚拟目标缓冲区。 为了避免任何潜在的安全漏洞,微型端口应调用此函数,而不是 StorPortCopyMemory

要求

要求 价值
支持的最低服务器 Windows Server 2022
标头 storport.h