O
OctavioOlguin
Guest
Also this is broken!!!! METHOD PRIVATE STATIC "System.Byte[]" MemptrToByteArray( pmptr AS MEMPTR ): DEFINE VARIABLE nPtr AS System.IntPtr NO-UNDO. DEFINE VARIABLE vInt AS INTeger NO-UNDO. DEFINE VARIABLE nBytes AS "System.Byte[]". vInt = GET-SIZE(pmPtr). nBytes = NEW "System.Byte[]"(vInt). nPtr = NEW System.IntPtr(GET-POINTER-VALUE(pmPtr)). System.Runtime.InteropServices.Marshal:Copy(nPtr, nBytes, 0, vInt). RETURN nBytes. FINALLY: nPtr = ?. SET-SIZE(pmPtr) = 0. nBytes = ?. END. END METHOD. That's really some problem for me... I use this in a fingerprint scanner routine, and came from https://community.progress.com/community_groups/openedge_development/f/19/p/30025/100235#100235 The error that is thrown appears in the -clientlog as: [17/04/11@18:06:11.073-0500] P-018148 T-012000 1 4GL -- (Procedure: 'USER-INTERFACE-TRIGGER procs\Nom\Nom07001.w' Line:492) System.OverflowException: Value was either too large or too small for an Int32.
Continue reading...
Continue reading...