public class Marshal extends NetObject
.NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Runtime.InteropServices.Marshal
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
|
static java.lang.String |
assemblyShortName
Assembly name: System.Private.CoreLib
|
static java.lang.String |
className
Qualified class name: System.Runtime.InteropServices.Marshal
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
Marshal() |
Marshal(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
AreComObjectsAvailableForCleanup() |
static NetObject |
BindToMoniker(java.lang.String monikerName) |
static Marshal |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into Marshal, a cast assert is made to check if types are compatible. |
static void |
ChangeWrapperHandleStrength(NetObject otp,
boolean fIsWeak) |
static void |
CleanupUnusedObjectsInCurrentContext() |
static NetObject |
CreateWrapperOfType(NetObject o,
NetType t) |
static int |
FinalReleaseComObject(NetObject o) |
static Guid |
GenerateGuidForType(NetType type) |
static java.lang.String |
GenerateProgIdForType(NetType type) |
static NetObject |
GetComObjectData(NetObject obj,
NetObject key) |
static int |
GetEndComSlot(NetType t) |
static int |
GetExceptionCode() |
static NetException |
GetExceptionForHR(int errorCode) |
static int |
GetHRForException(NetException e) |
static int |
GetHRForLastWin32Error() |
java.lang.String |
getJCOAssemblyName()
Returns the reflected Assembly name
|
java.lang.String |
getJCOClassName()
Returns the reflected Class name
|
java.lang.Object |
getJCOInstance()
Returns the instantiated class
|
java.lang.String |
getJCOObjectName()
Returns the reflected Class name used to build the object
|
JCType |
getJCOType()
Returns the instantiated class Type
|
static int |
GetLastPInvokeError() |
static java.lang.String |
GetLastPInvokeErrorMessage() |
static int |
GetLastSystemError() |
static int |
GetLastWin32Error() |
static java.lang.String |
GetPInvokeErrorMessage(int error) |
static int |
GetStartComSlot(NetType t) |
static NetType |
GetTypeFromCLSID(Guid clsid) |
static java.lang.String |
GetTypeInfoName(ITypeInfo typeInfo) |
static boolean |
IsComObject(NetObject o) |
static boolean |
IsTypeVisibleFromCom(NetType t) |
static void |
Prelink(MethodInfo m) |
static void |
PrelinkAll(NetType c) |
static byte |
ReadByte(NetObject ptr,
int ofs) |
static short |
ReadInt16(NetObject ptr,
int ofs) |
static int |
ReadInt32(NetObject ptr,
int ofs) |
static long |
ReadInt64(NetObject ptr,
int ofs) |
static int |
ReleaseComObject(NetObject o) |
static boolean |
SetComObjectData(NetObject obj,
NetObject key,
NetObject data) |
void |
setJCOInstance(JCObject instance) |
static void |
SetLastPInvokeError(int error) |
static void |
SetLastSystemError(int error) |
static int |
SizeOf(NetObject structure) |
static int |
SizeOf(NetType t) |
static void |
ThrowExceptionForHR(int errorCode) |
static void |
WriteByte(NetObject ptr,
int ofs,
byte val) |
static void |
WriteInt16(JCORefOut<NetObject> ptr,
int ofs,
char val) |
static void |
WriteInt16(NetObject ptr,
int ofs,
short val) |
static void |
WriteInt32(NetObject ptr,
int ofs,
int val) |
static void |
WriteInt64(NetObject ptr,
int ofs,
long val) |
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public Marshal()
throws java.lang.Throwable
java.lang.Throwablepublic Marshal(java.lang.Object instance)
throws java.lang.Throwable
java.lang.Throwablepublic static boolean AreComObjectsAvailableForCleanup()
throws java.lang.Throwable
java.lang.Throwablepublic static NetObject BindToMoniker(java.lang.String monikerName) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public static Marshal cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into Marshal, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedMarshal instancejava.lang.Throwable - in case of error during cast operationpublic static void ChangeWrapperHandleStrength(NetObject otp, boolean fIsWeak) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static void CleanupUnusedObjectsInCurrentContext()
throws java.lang.Throwable
java.lang.Throwablepublic static NetObject CreateWrapperOfType(NetObject o, NetType t) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public static int FinalReleaseComObject(NetObject o) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public static Guid GenerateGuidForType(NetType type) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static java.lang.String GenerateProgIdForType(NetType type) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, FormatException, AmbiguousMatchException
public static NetObject GetComObjectData(NetObject obj, NetObject key) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public static int GetEndComSlot(NetType t) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static int GetExceptionCode()
throws java.lang.Throwable
java.lang.Throwablepublic static NetException GetExceptionForHR(int errorCode) throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException
java.lang.ThrowableNotSupportedExceptionArgumentExceptionPlatformNotSupportedExceptionpublic static int GetHRForException(NetException e) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
public static int GetHRForLastWin32Error()
throws java.lang.Throwable
java.lang.Throwablepublic java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectString representing the name used to allocated the object
in CLR contextpublic JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectJCType representing the CLR Type of the instantiated Classpublic static int GetLastPInvokeError()
throws java.lang.Throwable
java.lang.Throwablepublic static java.lang.String GetLastPInvokeErrorMessage()
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
FormatException
public static int GetLastSystemError()
throws java.lang.Throwable
java.lang.Throwablepublic static int GetLastWin32Error()
throws java.lang.Throwable
java.lang.Throwablepublic static java.lang.String GetPInvokeErrorMessage(int error)
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
PlatformNotSupportedException,
ArgumentNullException,
FormatException
public static int GetStartComSlot(NetType t) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static NetType GetTypeFromCLSID(Guid clsid) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, CultureNotFoundException, ObjectDisposedException
public static java.lang.String GetTypeInfoName(ITypeInfo typeInfo) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static boolean IsComObject(NetObject o) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static boolean IsTypeVisibleFromCom(NetType t) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static void Prelink(MethodInfo m) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static void PrelinkAll(NetType c) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static byte ReadByte(NetObject ptr, int ofs) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, AccessViolationException, OutOfMemoryException, MarshalDirectiveException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionAccessViolationExceptionOutOfMemoryExceptionMarshalDirectiveExceptionpublic static short ReadInt16(NetObject ptr, int ofs) throws java.lang.Throwable, PlatformNotSupportedException, AccessViolationException, ArgumentException, NotSupportedException, OutOfMemoryException, InvalidOperationException, MarshalDirectiveException, ArgumentOutOfRangeException, ArgumentNullException
public static int ReadInt32(NetObject ptr, int ofs) throws java.lang.Throwable, PlatformNotSupportedException, AccessViolationException, ArgumentException, NotSupportedException, OutOfMemoryException, InvalidOperationException, MarshalDirectiveException, ArgumentOutOfRangeException, ArgumentNullException
public static long ReadInt64(NetObject ptr, int ofs) throws java.lang.Throwable, PlatformNotSupportedException, AccessViolationException, ArgumentException, NotSupportedException, OutOfMemoryException, InvalidOperationException, MarshalDirectiveException, ArgumentOutOfRangeException, ArgumentNullException
public static int ReleaseComObject(NetObject o) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, NullReferenceException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionNullReferenceExceptionpublic static boolean SetComObjectData(NetObject obj, NetObject key, NetObject data) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public void setJCOInstance(JCObject instance)
setJCOInstance in class NetObjectpublic static void SetLastPInvokeError(int error)
throws java.lang.Throwable
java.lang.Throwablepublic static void SetLastSystemError(int error)
throws java.lang.Throwable
java.lang.Throwablepublic static int SizeOf(NetObject structure) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static int SizeOf(NetType t) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static void ThrowExceptionForHR(int errorCode)
throws java.lang.Throwable,
PlatformNotSupportedException
java.lang.ThrowablePlatformNotSupportedExceptionpublic static void WriteByte(NetObject ptr, int ofs, byte val) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, AccessViolationException, OutOfMemoryException, MarshalDirectiveException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionAccessViolationExceptionOutOfMemoryExceptionMarshalDirectiveExceptionpublic static void WriteInt16(JCORefOut<NetObject> ptr, int ofs, char val) throws java.lang.Throwable, PlatformNotSupportedException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, AccessViolationException, OutOfMemoryException, MarshalDirectiveException
java.lang.ThrowablePlatformNotSupportedExceptionArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionAccessViolationExceptionOutOfMemoryExceptionMarshalDirectiveExceptionpublic static void WriteInt16(NetObject ptr, int ofs, short val) throws java.lang.Throwable, PlatformNotSupportedException, AccessViolationException, ArgumentException, NotSupportedException, OutOfMemoryException, InvalidOperationException, MarshalDirectiveException, ArgumentOutOfRangeException, ArrayTypeMismatchException, ArgumentNullException
public static void WriteInt32(NetObject ptr, int ofs, int val) throws java.lang.Throwable, PlatformNotSupportedException, AccessViolationException, ArgumentException, NotSupportedException, OutOfMemoryException, InvalidOperationException, MarshalDirectiveException, ArgumentOutOfRangeException, ArrayTypeMismatchException, ArgumentNullException
public static void WriteInt64(NetObject ptr, int ofs, long val) throws java.lang.Throwable, PlatformNotSupportedException, AccessViolationException, ArgumentException, NotSupportedException, OutOfMemoryException, InvalidOperationException, MarshalDirectiveException, ArgumentOutOfRangeException, ArrayTypeMismatchException, ArgumentNullException