Imagen

DESCARGA SOFTWARE PARA FACTURA ELECTRONICA DE AQUI.
Facturacion, Validacion, Addendas, Librerias de programacion, etc.


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

USO DE LIBRERIA QRCodeLib.dll EN C#

Todo lo que no cabe en los demas foros........
piwid
Mensajes: 2
Registrado: Mar Mar 22, 2011 10:47 am

USO DE LIBRERIA QRCodeLib.dll EN C#

Mensajepor piwid » Sab Nov 05, 2016 1:41 pm

Había usado la librería con VB6 pero ahora tuve necesidad de usarla en C# vs2012, adicional a este código
cargue a mi proyecto en una carpeta de dll's la libreria QRCodeLib.dll

Aqui esta el código como me funciono

Código: Seleccionar todo

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;

namespace AlmacenWF.dlls
{
    class QRBarCode
    {
        [DllImport("QRCodeLib.dll")]
        public static extern void FastQRCode(string subTextoCBB, string subFileNameCBB);

        public static System.Byte[] crearCBB(string TextoCBB)
        {
            string path = Directory.GetCurrentDirectory();
            string archivoCBB = path + @"\OdeCCBB.bmp";
            FastQRCode(TextoCBB, archivoCBB);
            FileStream fs = new FileStream(archivoCBB, FileMode.Open);
            BinaryReader br = new BinaryReader(fs);
            System.Byte[] cbb = br.ReadBytes(Convert.ToInt32(br.BaseStream.Length));
            return cbb;
        }
    }
}


Espero que sea de ayuda

Avatar de Usuario
Dado
Mensajes: 15838
Registrado: Mar Jul 06, 2010 7:56 pm

Re: USO DE LIBRERIA QRCodeLib.dll EN C#

Mensajepor Dado » Sab Nov 05, 2016 2:00 pm

Gracias por la informacion !
ADDENDAS? VALIDACION? CODIGO PARA PROGRAMAR TU PROPIA SOLUCION? TODO LO TENEMOS EN WWW.VALIDACFD.COM VISITANOS !!


Volver a “Otros”

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 2 invitados