Chuyển đến nội dung chính

GW2RegisterInputMemory

Hàm GW2RegisterInputMemory đăng ký tệp đầu vào được lưu trong bộ nhớ vào một phiên.

Tóm tắt

Hàm GW2RegisterInputMemory đăng ký tệp được lưu trong bộ đệm mà inputFileBuffer trỏ tới, có kích thước inputLength byte, với phiên được biểu thị bởi session.

#include "glasswall.core2.api.h"
int GW2RegisterInputMemory(Session session, const char *inputFileBuffer, size_t inputLength);

Giá trị trả về

Trả về một giá trị enum GW2_RetStatus dạng số nguyên. Các số âm cho biết thất bại.

Ví dụ

#include "glasswall.core2.api.h"
...
HANDLE session = GW2OpenSession();
if (!session)
/* deal with error */
else
{
/* ... load file contents into buffer 'buf' and log the file size in 'size' ... */
if (GW2RegisterInputMemory(session, buf, size))
/* deal with error */
else
/* continue processing */
...
}

/* later */
if (GW2CloseSession(session))
/* error closing session */