Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Project descroiption said:BarCodeLibrary.dll has the limitation of encoding only up to 255 characters, so FoxBarcodeQR also has this limitation.
using System;
using System.Drawing;
using QRCoder;
namespace VFPQRCoder
{
public class VFPQRCode
{
private QRCodeGenerator _QrGen;
public VFPQRCode()
{
_QrGen = new QRCodeGenerator();
}
public void CreateImage(string QrData, string FileName)
{
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
QRCodeData QrCodeData = _QrGen.CreateQrCode(enc.GetBytes(QrData), QRCodeGenerator.ECCLevel.Q);
QRCode QrCode = new QRCode(QrCodeData);
QrCode.GetGraphic(20).Save(FileName);
}
}
}
LOCAL qrcoder as VFPQRCoder.VFPQRCode
qrcoder = CREATEOBJECT("VFPQRCoder.VFPQRCode")
qrcoder.CreateImage(LC_CSV,"C:/arbeiten/img.jpg")
DECLARE CreateImage in vfpqrcode.dll
CreateImage()
FUNCTION REGSVR
* Author.....: William GC Steinford
* Date.......: Jan 23, 2003
* Abstract...: Programmatically Register, Unregister an OCX control
LPARAMETERS PCOCX,PLREG
LOCAL LLREG
LLREG = IIF( PCOUNT()>1, PLREG, .T. ) && Default to register
DECLARE INTEGER LoadLibrary IN kernel32 AS LoadLibraryA STRING lpLibFileName
LOCAL LHLIB
LHLIB = LOADLIBRARYA( PCOCX )
IF (LHLIB < 32) && HINSTANCE_ERROR
RETURN "ERROR: Could not Load Library "+PCOCX
ENDIF
*// Find the entry point.
DECLARE INTEGER GetProcAddress IN kernel32 INTEGER hModule, STRING lpProcName
IF LLREG
LPREGPROC = GETPROCADDRESS(LHLIB, 'DllRegisterServer')
IF LPREGPROC>0 && Procedure exists!
DECLARE INTEGER DllRegisterServer IN &pcOCX
**AS OcxReg
LNRES = DLLREGISTERSERVER()
IF LNRES=0
RETURN "SUCCESS"
ELSE
RETURN "ERROR: DllRegisterServer returned "+TRAN(LNRES)
ENDIF
ELSE
* //unable to locate entry point
RETURN "ERROR: Library "+PCOCX+" has no entry point for DllRegisterServer"
ENDIF
ELSE && Unregister
LPREGPROC = GETPROCADDRESS(LHLIB, 'DllUnregisterServer')
IF LPREGPROC>0 && Procedure exists!
DECLARE INTEGER DllUnregisterServer IN &pcOCX
**AS OcxUnReg
LNRES = DLLUNREGISTERSERVER()
IF LNRES=0
RETURN "SUCCESS"
ELSE
RETURN "ERROR: DllUnregisterServer returned "+TRAN(LNRES)
ENDIF
ELSE
* //unable to locate entry point
RETURN "ERROR: Library "+PCOCX+" has no entry point for DllUnregisterServer"
ENDIF
ENDIF
ENDFUNC
Short answer: admin rights.GriffMG said:What is the problem with registering the dll?
* QRCoder usage
Cd <<qrcoderbridgefolder>> && adjust
Do wwDotNetBridge
LOCAL loBridge as wwDotNetBridge
loBridge = CreateObject("wwDotNetBridge","V4",.f.)
loBridge.LoadAssembly("VFPQRCoder")
Local loVFPQRCoder
loVFPQRCoder = loBridge.CreateInstance('VFPQRCoder.VFPQRCode')
loVFPQRCoder.CreateImage("Test of VFPQRCoder - Äöüßäöüß@€",ADDBS(GETENV("TEMP"))+"testutf8.png")