VirtualXML_Wrappers CSharp Method VirtualXML
Codigo para la implementacion en c#

Namespace: VirtualXML®
Assembly: VirtualXML_Doc (in VirtualXML_Doc.exe) Version: 1.0.0.0 (1.0.0.0)
Sintaxis

public void CSharp()
Examples

// Agregar referencia  
using System.Runtime.InteropServices;

// Declarar como metodos de nuestra clase
[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_NewW")]
static extern int VirtualXML_New( String szVersion);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_ProcesaDocumentoW")]
static extern int VirtualXML_ProcesaDocumento( int p,String csd,String key,String keypwd,String outfile);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_GetValueW")]
static extern String VirtualXML_GetValue( int p,int value);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_FreeW")]
static extern void VirtualXML_Free( int p);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetVirtualPACInfoW")]
static extern void VirtualXML_SetVirtualPACInfo( int p,String szUser,String servidor);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetCiberSATInfoW")]
static extern void VirtualXML_SetCiberSATInfo( int p,String userCiberPAC,String llaveCiberPAC);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetComprobanteInfoW")]
static extern void VirtualXML_SetComprobanteInfo( int p,String serie,String folio,String fecha,String tipoDeComprobante,String formaDePago,String subtotal,String descuento,String total,String moneda,String tipoCambio,String condicionesDePago,String metodoDePago,String motivoDescuento);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetComprobanteCFDInfoW")]
static extern void VirtualXML_SetComprobanteCFDInfo( int p,String noAprobacion,String anoAprobacion);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetComprobanteInfoExW")]
static extern void VirtualXML_SetComprobanteInfoEx( int p,String LugarExpedicion,String NumCtaPago,String SerieFolioFiscalOrig,String FolioFiscalOrig,String MontoFolioFiscalOrig,String FechaFolioFiscalOrig);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetEmisorInfoW")]
static extern void VirtualXML_SetEmisorInfo( int p,String szRFC,String szRazonSocial);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetEmisorDomicilioW")]
static extern void VirtualXML_SetEmisorDomicilio( int p,String calle,String noExterior,String noInterior,String colonia,String localidad,String referencia,String municipio,String estado,String pais,String codigoPostal);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetEmisorExpedidoEnW")]
static extern void VirtualXML_SetEmisorExpedidoEn( int p,String calle,String noExterior,String noInterior,String colonia,String localidad,String referencia,String municipio,String estado,String pais,String codigoPostal);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddEmisorRegimenFiscalW")]
static extern void VirtualXML_AddEmisorRegimenFiscal( int p,String regimen);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetReceptorInfoW")]
static extern void VirtualXML_SetReceptorInfo( int p,String szRFC,String szRazonSocial);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetReceptorDomicilioW")]
static extern void VirtualXML_SetReceptorDomicilio( int p,String calle,String noExterior,String noInterior,String colonia,String localidad,String referencia,String municipio,String estado,String pais,String codigoPostal);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddConceptoW")]
static extern void VirtualXML_AddConcepto( int p,String cantidad,String unidad,String descripcion,String valorUnitario,String importe,String noIdentificacion);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddInformacionAduaneraW")]
static extern void VirtualXML_AddInformacionAduanera( int p,String fecha,String numero,String aduana);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddinstEducativasW")]
static extern void VirtualXML_AddinstEducativas( int p,String CURP,String autRVOE,String nivelEducativo,String nombreAlumno,String rfcPago);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetImpuestosInfoW")]
static extern void VirtualXML_SetImpuestosInfo( int p,String totalImpuestosTrasladados,String totalImpuestosRetenidos);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddRetencionW")]
static extern void VirtualXML_AddRetencion( int p,String impuesto,String importe);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddTrasladoW")]
static extern void VirtualXML_AddTraslado( int p,String impuesto,String tasa,String importe);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetImpuestosLocalesInfoW")]
static extern void VirtualXML_SetImpuestosLocalesInfo( int p,String TotaldeTraslados,String TotaldeRetenciones);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddImpuestoLocalRetenidoW")]
static extern void VirtualXML_AddImpuestoLocalRetenido( int p,String ImpLocRetenido,String TasadeRetencion,String Importe);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddImpuestoLocalTrasladadoW")]
static extern void VirtualXML_AddImpuestoLocalTrasladado( int p,String ImpLocTrasladado,String TasadeTraslado,String Importe);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddDonatariasW")]
static extern void VirtualXML_AddDonatarias( int p,String fechaAutorizacion,String noAutorizacion);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetDllPathW")]
static extern void VirtualXML_SetDllPath( int p,String DllPath);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetMetodoW")]
static extern void VirtualXML_SetMetodo( int p,String Metodo);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_GetValueInFileW")]
static extern void VirtualXML_GetValueInFile( int p,int value,String file);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_ProcessFileW")]
static extern void VirtualXML_ProcessFile( String szFile);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_CheckFileW")]
static extern int VirtualXML_CheckFile( String szFile);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetComprobanteFechaW")]
static extern void VirtualXML_SetComprobanteFecha( int p,String fecha);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetLogFileW")]
static extern void VirtualXML_SetLogFile( int p,String file);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetFlagsW")]
static extern void VirtualXML_SetFlags( int p,int flags);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_ShowValueW")]
static extern void VirtualXML_ShowValue( int p,int lValue,String title);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_FirmaSellaDoctoW")]
static extern int VirtualXML_FirmaSellaDocto( int p,String csd,String key,String keypwd,String outfile);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetAddendaTextW")]
static extern void VirtualXML_SetAddendaText( int p,String text);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetAddendaW")]
static extern void VirtualXML_SetAddenda( int p,String text);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddComplementoW")]
static extern void VirtualXML_AddComplemento( int p,String complementoXml);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddComplementoConceptoW")]
static extern void VirtualXML_AddComplementoConcepto( int p,String complementoXml);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SaveW")]
static extern void VirtualXML_Save( int p,String file);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_LoadW")]
static extern int VirtualXML_Load( String file);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetTralixInfoW")]
static extern void VirtualXML_SetTralixInfo( int p,String CustomerKey,String url);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_GetTimeWithDelayW")]
static extern String VirtualXML_GetTimeWithDelay( int p,int nSegs);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_GetEmisorInfoW")]
static extern int VirtualXML_GetEmisorInfo( String emisor,String pwd,String fecha,String outfile);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetFacturarEnLineaInfoW")]
static extern void VirtualXML_SetFacturarEnLineaInfo( int p,String user,String pwd,String referencia,String action);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_SetTimbreFiscalInfoW")]
static extern void VirtualXML_SetTimbreFiscalInfo( int p,String pemcert,String url);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_GetValuesW")]
static extern void VirtualXML_GetValues( int p,String file,int lFormat);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddCuentaPredialW")]
static extern void VirtualXML_AddCuentaPredial( int p,String numero);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_CancelaUUIDW")]
static extern int VirtualXML_CancelaUUID( String szUser,String szEmisor,String szCert,String szKey,String szPwd,String szUuid,String szOut);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_CerKeyMatchW")]
static extern int VirtualXML_CerKeyMatch( int p,String szEmisor,String szCSD,String szKey,String szKeyPwd);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_CheckLicenceW")]
static extern int VirtualXML_CheckLicence( String user,String llave,String emisor);

[DllImport("VirtualXML.dll", CharSet = CharSet.Unicode, EntryPoint = "VirtualXML_AddNameSpaceW")]
static extern void VirtualXML_AddNameSpace( int p,String ns,String ur,String sl);
Examples

int hXml = VirtualXML_New( "3.2" );
....
Vease Tambien