GW2RegisterOutFile
GW2RegisterOutFile function, Glasswall द्वारा उत्पादित managed file के लिए destination register करता है। इस function का उपयोग करने से सत्र के लिए Manage & Protect Process Mode सक्रिय हो जाता है।
- C++
- C#
- Java
- Python
- JavaScript
सारांश
सत्र session के लिए GW2RegisterOutFile function, outputFileBuffer द्वारा point की गई string जिसका नाम है, उस file को Glasswall द्वारा उत्पादित managed file के लिए destination file के रूप में register करता है। path का base name, GW2RegisterInputFile function का उपयोग करके register किए गए base name से अलग होना चाहिए। इस function का उपयोग करने से सत्र के लिए Manage & Protect Process Mode सक्रिय हो जाता है।
#include "glasswall.core2.api.h"
int GW2RegisterOutFile(Session session, const char *outputFilePath);
रिटर्न
एक पूर्णांक GW2_RetStatus enum मान लौटाता है। नकारात्मक संख्याएँ विफलता को दर्शाती हैं।
उदाहरण
#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 */
सारांश
public int RegisterOutFile(
int session,
string outputFilePath)
रिटर्न
एक पूर्णांक GW2_RetStatus enum मान लौटाता है। नकारात्मक संख्याएँ विफलता को दर्शाती हैं।
सारांश
import com.glasswall.core2javabridge.*;
public int GW2RegisterOutFile(int session, String outputFilePath) throws GlasswallException, NullPointerException
(Deprecated)
public int GW2RegisterOutFile(int session, byte[] outputFilePath) throws GlasswallException, NullPointerException
नोट
The GW2RegisterOutFile function parameters have been updated to use String in place of byte[]. The original function has been deprecated.
रिटर्न
GW2RegisterOutFile function एक GW2_RetStatus enumeration लौटाता है जिसे int में convert किया गया है। यदि कोई त्रुटि हुई है तो मान negative होगा। 0 सफलता को दर्शाता है। विवरण के लिए API Overview/Return types देखें।
A NullPointerException exception will be thrown if outputFilePath is null or empty.
A GlasswallException exception will be thrown if session is invalid, if the outputFilePath could not be retrieved, or if the outputFilePath could not be converted to UTF-8.
सारांश
दिए गए session के लिए एक output file register करें। यदि output_file None है, तो file 'buffer' और 'buffer_length' attributes के रूप में लौटाई जाएगी।
def register_output(self, session, output_file: Optional[str] = None):
""" Register an output file for the given session. If output_file is None the file will be returned as 'buffer' and 'buffer_length' attributes.
Args:
session (int): The session integer.
output_file (Optional[str]): If specified, during run session the file will be written to output_file, otherwise the file will be written to the glasswall.GwReturnObj 'buffer' and 'buffer_length' attributes.
Returns:
gw_return_object (glasswall.GwReturnObj): A GwReturnObj instance with the attribute 'status' indicating the result of the function call. If output_file is None (memory mode), 'buffer', and 'buffer_length' are included containing the file content and file size.
"""
रिटर्न
gw_return_object (glasswall.GwReturnObj): 'status' attribute के साथ एक GwReturnObj instance, जो function call के परिणाम को दर्शाता है। यदि output_file None है (memory mode), तो file content और file size को शामिल करते हुए 'buffer' और 'buffer_length' शामिल किए जाते हैं।
status attribute एक integer GW2_RetStatus enum value है। Negative numbers विफलता को दर्शाते हैं।
सारांश
यह function Glasswall द्वारा उत्पादित managed file के लिए एक destination file रजिस्टर करता है।
/**
* @param {number} session The ID of the session.
* @param {string} outputFilePath The specified output path. Must be different to the specified input file path.
*/
GW2RegisterOutFile(
session,
outputFilePath)
रिटर्न
एक पूर्णांक GW2_RetStatus enum मान लौटाता है। नकारात्मक संख्याएँ विफलता को दर्शाती हैं।