Wrappers de VXml para Delphi 7 VXml
Estos wrappers (definiciones de funciones en una DLL) son necesarios para utilizar VXml en sus programas basados en Delphi 7 (no RAD Studio, los wrappers son diferentes)

Para utilizarlos copie las funciones que necesite del contenido que se muestra a continuación en la seccion VAR de sus PROCEDUREs que necesiten usar las funciones de VXml en Delphi 7.

Definir un nuevo Wrapper es muy sencillo

En la seccion var de su procedimiento siga la siguiente Sintáxis:

Si la función devuelve un valor:

    <funcion VXml> :  function ( param1:<tipo>, param2:<tipo> .... paramN:<tipo>) :<tipo de valor retornado> ; cdecl;

Si la función no devuelve un valor:

    <funcion VXml> :  procedure ( param1:<tipo>, param2:<tipo> .... paramN:<tipo>)  ; cdecl;

Donde:

    <función VXml>: Es el nombre de cualquier función que esté contenida en VXML_x86.DLL | VXML_x64.DLL
    <tipo> y <tipo de valor retornado >: es el tipo de variable que se esté utilizando, basicamente en VXml con Delphi 7 solo se utilizan 2 tipo : PChar para cadenas de caracteres y LongInt para valores numéricos

Para hacer uso de los wrappers definidos en la seccion var, dentro del código de su programa (begin ... end) deberá cargar primero la DLL en memoria usando la función del Delphi LoadLibrary() de esta manera:

    HBar := LoadLibrary("VXML_x86.DLL | VXML_x64.DLL")

Y a continuación deberá asignar a los nombres de variables previamente definidos en la seccion var, las funciones contenidas en la DLL usando la función de Delphi GetProcAddress() de acuerdo a la siguiente Sintáxis:

    <funcion VXml> := GetProcAddress(HBar, '<funcion VXml>');

Donde:

    <funcion VXml> es el nombre de cualquier función contenida en VXML_x86.DLL | VXML_x64.DLL

Fecha de actualización : 08 de Julio 2024 se añadieron las funciones para Carta Porte 3.1
Wrapper:

VXML_New                        : function ( szVersion:PChar ):LongInt; cdecl;
VXML_Free : procedure ( p:LongInt ); cdecl;
VXML_NewWithLog : function ( szVersion:PChar; cNombreLog:PChar ):LongInt; cdecl;
VXML_SetLogFile : procedure ( p:LongInt; NombreLog:PChar ); cdecl;
VXML_SetUserInfo : procedure ( hXml:LongInt; szUser:PChar; servidor:PChar ); cdecl;
VXML_ProcesaDocumento : function ( hXml:LongInt; csd:PChar; key:PChar; keypwd:PChar; outfile:PChar ):LongInt; cdecl;
VXML_ProcesaDocumentoSSL : function ( hXml:LongInt; csd:PChar; key:PChar; keypwd:PChar; outfile:PChar ):LongInt; cdecl;
VXML_AddCfdiRelacionados_cfdi40 : procedure ( p:LongInt; TipoRelacion:PChar; UUID1:PChar; UUID2:PChar; UUID3:PChar; UUID4:PChar; UUID5:PChar; UUID6:PChar; UUID7:PChar; UUID8:PChar; UUID9:PChar; UUID10:PChar ); cdecl;
VXML_AddCfdiRelacionado_cfdi40 : procedure ( p:LongInt; UUID:PChar ); cdecl;
VXML_SetComprobanteInfo_cfdi40 : procedure ( p:LongInt; Serie:PChar; Folio:PChar; Fecha:PChar; FormaDePago:PChar; CondicionesDePago:PChar; SubTotal:PChar; Descuento:PChar; Moneda:PChar; TipoCambio:PChar; Total:PChar; TipoDeComprobante:PChar; MetodoDePago:PChar; LugarExpedicion:PChar; Confirmacion:PChar; Exportacion:PChar ); cdecl;
VXML_SetEmisorInfo_cfdi40 : procedure ( p:LongInt; RFC:PChar; Nombre:PChar; RegimenFiscal:PChar; FacAtrAdquirente:PChar ); cdecl;
VXML_SetReceptorInfo_cfdi40 : procedure ( p:LongInt; RFC:PChar; Nombre:PChar; ResidenciaFiscal:PChar; NumRegIdTrib:PChar; UsoCFDI:PChar; DomicilioFiscalReceptor:PChar; RegimenFiscalReceptor:PChar ); cdecl;
VXML_AddConcepto_cfdi40 : procedure ( p:LongInt; ClaveProdServ:PChar; NoIdentificacion:PChar; Cantidad:PChar; ClaveUnidad:PChar; Unidad:PChar; Descripcion:PChar; ValorUnitario:PChar; Importe:PChar; Descuento:PChar; ObjetoImp:PChar ); cdecl;
VXML_AddConceptoTraslado_cfdi40 : procedure ( p:LongInt; Base:PChar; Impuesto:PChar; Tipofactor:PChar; TasaOCuota:PChar; Importe:PChar ); cdecl;
VXML_SetImpuestosInfo_cfdi40 : procedure ( p:LongInt; totalImpuestosTrasladados:PChar; totalImpuestosRetenidos:PChar ); cdecl;
VXML_AddTraslado_cfdi40 : procedure ( p:LongInt; Impuesto:PChar; TipoFactor:PChar; TasaOCuota:PChar; Importe:PChar; Base:PChar ); cdecl;
VXML_GetValue : function ( hXml:LongInt; value:LongInt ):PChar; cdecl;