Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros 3700 ISL SIM, integrating c# dlls in isl

Status
Not open for further replies.

JCCR

IS-IT--Management
Mar 20, 2016
71
CO
Hello everybody

Anyone knows if can I load a dll made with C# in a pms/isl?
Thanks.
 
Res or Simphony?

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
Hi CathalMF

Specifically Micros RES 3700 5.7
 
If you only need to support full framework windows then you can use the unmanaged exports nugget to export the c function.


You can the load and call the exposed methods using the ISL functions DLLLOAD and DLLCALL or DLLCALL_CDECL

Look at the ISL documentation for those functions.

This won't work on Windows CE or Android.

--------

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
CathalMF Thanks.

I ask you something additional, is there any way other than having an image of how to print a qr code from a sim?
 
@JCCR The SIM guide from Oracle indicates how you can print a QR code from SIM within its "SIM Manual":
I found your post while looking for the information myself. I looked at the code provided and added comments to it for clarity (for myself). Search for "FormatRaw" within the manual for the code sample (should be on page 401 or "7-84").

Code:
sub PrintQRCodeForUrl(var qrCodeData : A500)
    // This code all comes from the "Oracle System Interface Module (SIM) Manual" pdf named "SIM_Manual_E64254_01.pdf" with the comments added by me for posterity
    // Link to manual: [URL unfurl="true"]https://docs.oracle.com/cd/E68915_01/docs/SIM_Manual_E64254_01.pdf[/URL]

    var qrCodeDataLen   : N3
    var rawDataLen      : N3
    
    qrCodeDataLen = len(qrCodeData) + 3                                                                     // The +3 is unknown (maybe it's for "ABC"?)--this is what's in the docs from oracle.
    rawDataLen = len(qrCodeData) + 48                                                                       // 48 is the number of 'chr' characters being sent to the printer, so the entire 'raw' length is the length of the QR code plus said 48 characters of commands.
    
    // FORMATRAW allows the SIM to send raw / unaltered data to the printer. 
    // The "ABC" piece is the argument that will be looked for and replaced with the un-altered/raw data from all the following parameters
    // 200 is the max length of the data to be sent to the printer. 200 might be optimistic but I don't know if that includes the qrCode URL itself as part of the length
    FORMATRAW "ABC", 200, chr(127), rawDataLen, ";", \                                                      // 127 deletes the last character from the buffer. Not sure what the 200 or semi-colon is. (TODO)
        chr(13), chr(10), \                                                                                 // 13 starts a new line ('CR'), and 10 is a line feed ('new line')
        chr(27), chr(97), chr(1), \                                                                         // This ensures the text is centered
        chr(29), chr(40), chr(107), chr(4), chr(0), chr(49), chr(65), chr(50), chr(0), \                    // This sends "Function 165" to the printer: "QR Code: Select the model"
        chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(67), chr(5), \                             // This sends "Function 167" to the printer: "QR Code: Set the size of the module"
        chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(69), chr(48), \                            // This sends "Function 169" to the printer: "QR Code: Select the error correction level"
        chr(29), chr(40), chr(107), chr(qrCodeDataLen), chr(0), chr(49), chr(80), chr(48), qrCodeData, \    // This sends "Function 180" to the printer: "QR Code: Store the data in the symbol storage area". The QR code is then sent, and the printer will format the QR code into the "image" on its own. Part of the parameter list is the length of the string itself (a url in this case).
        chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(81), chr(48), \                            // This sends "Function 181" to the printer: "QR Code: Print the symbol data in the symbol storage area"
        chr(27), chr(64)                                                                                    // This clears all codes but not the buffer of the printer
    
    @trailer[1]= ""
    @trailer[2]= "Some header that might be enticing"
    @trailer[3]= ""
    @trailer[4]= "@@ABC@@" 
    @trailer[5]= ""
    @trailer[6]= ""
endsub

Note that the code is untested and likely won't work without alterations / testing.
What I don't know is whether or not the '200' parameter being sent as the length will cause the function to fail if the URL is especially long.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top