public void PrintLastException(INTPTR ctx) { return; INTPTR p = M.ReadIntPtr(lastException); if (p != INTPTR.Zero) { JSDLL.JSType t = JSDLL.JSType.kJSTypeUndefined; t = JSDLL.JSValueGetType(ctx, p); if (t != JSDLL.JSType.kJSTypeUndefined) { print(t.ToString()); if (t != JSDLL.JSType.kJSTypeNull) { var eStr = JSDLL.JSValueToStringCopy(ctx, p, lastException); var eStrPtr = JSDLL.JSStringGetCharactersPtr(eStr); var eStrLen = JSDLL.JSStringGetLength(eStr); var eString = M.PtrToStringAuto(eStrPtr, eStrLen); print(eString); } } } M.WriteIntPtr(lastException, INTPTR.Zero); }
public void PtrToStringAuto_ZeroPtr_ThrowsArgumentNullException() { AssertExtensions.Throws <ArgumentNullException>("ptr", () => Marshal.PtrToStringAuto(IntPtr.Zero, 0)); }
public static void PtrToStringAuto() { Assert.Null(Marshal.PtrToStringAuto(IntPtr.Zero)); }