云海游戏(中国区)有限公司官网

    Conversion

    Functions

    KvaXmlStatus kvaXmlToBuffer (const char *xmlbuf, unsigned int xmllen, char *outbuf, unsigned int *outlen, long *version)
     
    KvaXmlStatus kvaXmlToFile (const char *infile, const char *outfile)
     
    KvaXmlStatus kvaFileToXml (const char *parfile, const char *xmlfile)
     
    KvaXmlStatus kvaXmlDebugOutput (int on)
     
    KvaXmlStatus kvaBufferToXml (const char *inbuf, unsigned int inlen, char *xmlbuf, unsigned int *xmllen, long *version, const char *scriptpath)
     
    KvaXmlStatus kvaXmlGetErrorText (KvaXmlStatus status, char *buf, unsigned int len)
     

    Detailed Description

    Function Documentation

    ◆ kvaBufferToXml()

    KvaXmlStatus kvaBufferToXml ( const char *  inbuf,
    unsigned int  inlen,
    char *  xmlbuf,
    unsigned int *  xmllen,
    long *  version,
    const char *  scriptpath 
    )
    C#
    KvaXmlStatus KvaBufferToXml(byte[] inbuf, out string xmlbuf, out int version, string scriptpath)

    Convert a buffer containing param.lif with size inlen to a new XML settings buffer xmlbuf with length xmllen. The version of the XML settings is returned in version (Upper 16 bits: major, lower 16 bits: minor). Scripts from the param.lif will be written to the directory specified in scriptpath.

    Parameters
    [in]inbufBuffer containing the param.lif settings.
    [in]inlenSize of param.lif buffer in bytes.
    [out]xmlbufBuffer to receive the XML settings.
    [out]xmllenSize of the XML buffer in bytes.
    [out]versionXML version.
    [in]scriptpathPath to destination of scripts.
    Returns
    KvaXmlStatusOK (zero) if success.
    KvaXmlStatusERR_XXX (negative) if failure.

    ◆ kvaFileToXml()

    KvaXmlStatus kvaFileToXml ( const char *  parfile,
    const char *  xmlfile 
    )
    C#
    KvaXmlStatus KvaFileToXml(string parfile, string xmlfile)

    Convert the binary settings from parfile and write the XML settings to xmlfile.

    Parameters
    [in]parfilePath and name of the file containing the param.lif settings.
    [out]xmlfilePath and name of the file to receive the XML settings.
    Returns
    KvaXmlStatusOK (zero) if success.
    KvaXmlStatusERR_XXX (negative) if failure.

    ◆ kvaXmlDebugOutput()

    KvaXmlStatus kvaXmlDebugOutput ( int  on)

    Enable detailed information about the XML conversion on standard out. This can be very useful when the error that causes the failure is masked by subsequent errors.

    Parameters
    [in]onEnable debug output if non-zero.
    Returns
    KvaXmlStatusOK (zero) if success.
    KvaXmlStatusERR_XXX (negative) if failure.

    ◆ kvaXmlGetErrorText()

    KvaXmlStatus kvaXmlGetErrorText ( KvaXmlStatus  status,
    char *  buf,
    unsigned int  len 
    )
    C#
    KvaXmlStatus KvaXmlGetErrorText(KvaXmlStatus status, out string buf)

    Get a human readable description of error with supplied error code.

    Parameters
    [in]statusKvaXmlStatus error code.
    [out]bufBuffer to receive error message.
    [in]lenBuffer size in bytes.
    Returns
    KvaXmlStatusOK (zero) if success.
    KvaXmlStatusERR_XXX (negative) if failure.

    ◆ kvaXmlToBuffer()

    KvaXmlStatus kvaXmlToBuffer ( const char *  xmlbuf,
    unsigned int  xmllen,
    char *  outbuf,
    unsigned int *  outlen,
    long *  version 
    )
    C#
    KvaXmlStatus KvaXmlToBuffer(string xmlbuf, out byte[] outbuf, out int version)

    Convert the XML settings from buffer xmlbuf with length xmllen. The resulting param.lif is written to the buffer outbuf and has length outlen. Use the macro PARAMLIF_SIZE to allocate the ouput buffer to ensure that it is sufficiently large. The version of the XML settings is returned in version (Upper 16 bits: major, lower 16 bits: minor).

    Parameters
    [in]xmlbufBuffer containing the XML settings.
    [in]xmllenSize of the XML buffer in bytes.
    [out]outbufBuffer to receive the param.lif settings.
    [out]outlenSize of the param.lif buffer in bytes.
    [out]versionXML version.
    Returns
    KvaXmlStatusOK (zero) if success.
    KvaXmlStatusERR_XXX (negative) if failure.

    ◆ kvaXmlToFile()

    KvaXmlStatus kvaXmlToFile ( const char *  infile,
    const char *  outfile 
    )
    C#
    KvaXmlStatus KvaXmlToFile(string infile, string outfile)

    Convert the XML settings from infile and write the binary settings to outfile.

    Parameters
    [in]infilePath and name of the file containing the XML settings.
    [out]outfilePath and name of the file to receive the param.lif settings.
    Returns
    KvaXmlStatusOK (zero) if success.
    KvaXmlStatusERR_XXX (negative) if failure.
    【网站地图】【sitemap】