O
OctavioOlguin
Guest
Well,, infact I missed to elaborate more on this situation, and perhaps that shows why is my dubitation... Inside those methods on this class. it is performed this, as a reverting process to the anterior posted manipulation: 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. // - See more at: community.progress.com/.../100235 Notice the explicit SET-SIZE(pmPtr) . That's why I have doubt about the System.Byte[] needed some special handling after use...
Continue reading...
Continue reading...