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

GW2RegisterOutFile

ฟังก์ชัน GW2RegisterOutFile ใช้ลงทะเบียนปลายทางสำหรับไฟล์ที่จัดการแล้วซึ่งสร้างโดย Glasswall การใช้ฟังก์ชันนี้จะเปิดใช้งาน Manage & Protect Process Mode สำหรับเซสชัน

สรุป

สำหรับเซสชัน session ฟังก์ชัน GW2RegisterOutFile จะลงทะเบียนไฟล์ที่มีชื่อเป็นสตริงซึ่งถูกชี้โดย outputFileBuffer ให้เป็นไฟล์ปลายทางสำหรับไฟล์ที่จัดการแล้วซึ่งสร้างโดย Glasswall base name ของพาธต้องแตกต่างจาก base name ที่ลงทะเบียนโดยใช้ฟังก์ชัน GW2RegisterInputFile การใช้ฟังก์ชันนี้จะเปิดใช้งาน Manage & Protect Process Mode สำหรับเซสชัน


#include "glasswall.core2.api.h"
int GW2RegisterOutFile(Session session, const char *outputFilePath);

ส่งกลับ

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

ตัวอย่าง


#include "glasswall.core2.api.h"

HANDLE session = GW2OpenSession();
if (!session)
/* deal with error */
else
{
if (GW2RegisterOutFile(session, "managed_file.docx") < 0)
/* deal with error */
else
/* continue processing */
...
}

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