Vamos a timbrar el XML creado
Para eso necesitamos el archivo ini con la conexión al PAC de Ecodex
Agregamos la función TimbrarCFD(Application.StartupPath & "\TimbradoEcodex.ini")
Así es como debe quedar
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
GeneraCFD(Application.StartupPath & "\FacturaEcodex.ini", "a0123456789")
If GetError().ToString.Length > 0 Then
MsgBox(GetError() & " " & GetErrorExt(), vbInformation, "Aviso")
Else
TimbrarCFD(Application.StartupPath & "\TimbradoEcodex.ini")
If GetError().ToString.Length > 0 Then
MsgBox(GetError() & " " & GetErrorExt(), vbInformation, "Aviso")
Else
MsgBox("Se ha timbrado el XML", vbInformation, "Aviso")
End If
End If
End Sub
Declaramos la función TimbrarCFD()
<Runtime.InteropServices.DllImport("CFDLib.dll", Charset:=Runtime.InteropServices.CharSet.Ansi, SetLastError:=True, ExactSpelling:=True, Entrypoint:="TimbrarCFD")> _
Public Shared Function TimbrarCFD(ByVal nxml As String) As String
End Function
Ya solo falta Compilar y listo !.
Tendrás el XML timbrado.

DESCARGA SOFTWARE PARA FACTURA ELECTRONICA DE AQUI.
Facturacion, Validacion, Addendas, Librerias de programacion, etc.
CARTA PORTE V3.1
ECODEX TIENE ESTOS NUEVOS DATOS DE CONTACTO :
Comercializacion y Ventas - Evelia Vicke evicke@ecodex.com.mx 33-16-03-03-48
Soporte - Humberto Guerrero soporte@ecodex.com.mx 33-34-90-46-03
.
La función TimbrarCFD() Parte 6
-
- Mensajes: 41
- Registrado: Jue Nov 25, 2010 10:23 am