QR code generator does not work on a domain
- New
- How-to
-
JOSE WILLIAM ROMERO OLIVOS
- PowerBuilder
- Friday, 15 August 2025 04:14 AM UTC
Greetings, gentlemen. I have this example, which I downloaded from the internet to generate QR codes. It works perfectly on many machines, but today, I uploaded my app within a domain with Windows Server 2019, and my application no longer works. In fact, on all machines under the domain with Windows 10 and 11, my QR code generating application doesn't work. As I said, it works on many, except those under the domain.
Does anyone know the reason? Could it be a group policy?
Sometimes my app freezes or simply returns NULL.
string ls_returnValue
is_initialDir = mid(sle_path.text, 1, lastpos(sle_path.text, '\'))
// reset the image, if not it's locked by PB and you cannot write to same as previously saved filename (if you didn't change the filename)
cb_clear.event clicked()
string textoQR
textoQR ="test qr text 99 88 999 "
ls_returnValue = gnv_QRCodes.of_encodeTextToQRImage( textoQR , sle_path.text )
p_1.picturename = sle_path.text
ip_1.LoadPicture(sle_path.text)
ls_returnValue = ls_returnValue
This is the function that returns null, but as I said, it only returns the computers under the domain with Windows Server 2019.
//*-----------------------------------------------------------------*/
//* .NET function : EncodeTextToQRImage
//* Argument:
//* String as_text
//* String as_imagefilename
//* Return : String
//*-----------------------------------------------------------------*/
/* .NET function name */
String ls_function
String ls_result
/* Set the dotnet function name */
ls_function = "EncodeTextToQRImage"
Try
/* Create .NET object */
If Not This.of_createOnDemand( ) Then
SetNull(ls_result)
Return ls_result
End If
/* Trigger the dotnet function */
ls_result = This.encodetexttoqrimage(as_text,as_imagefilename)
Return ls_result
Catch(runtimeerror re_error)
If This.ib_CrashOnException Then Throw re_error
/* Handle .NET error */
This.of_SetDotNETError(ls_function, re_error.text)
This.of_SignalError( )
/* Indicate error occurred */
SetNull(ls_result)
Return ls_result
End Try
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.