ข้ามไปยังเนื้อหาหลัก

GW2RegisterInputMemory

ฟังก์ชัน GW2RegisterInputMemory ใช้ลงทะเบียนไฟล์อินพุตที่จัดเก็บอยู่ในหน่วยความจำกับเซสชัน

สรุป

ฟังก์ชัน GW2RegisterInputMemory ใช้ลงทะเบียนไฟล์ที่จัดเก็บอยู่ในบัฟเฟอร์ที่ inputFileBuffer ชี้ไป ซึ่งมีขนาด inputLength ไบต์ กับเซสชันที่ระบุโดย session.

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

ส่งกลับ

ส่งกลับค่า enum GW2_RetStatus แบบจำนวนเต็ม ตัวเลขติดลบหมายถึงล้มเหลว

ตัวอย่าง

#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 */