Package system.runtime.interopservices
Class Marshal
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.runtime.interopservices.Marshal
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class Marshal extends NetObject
The base .NET class managing System.Runtime.InteropServices.Marshal, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..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
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.StringassemblyShortNameAssembly name: mscorlibstatic java.lang.StringclassNameQualified class name: System.Runtime.InteropServices.Marshalstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanAreComObjectsAvailableForCleanup()static NetObjectBindToMoniker(java.lang.String monikerName)static Marshalcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoMarshal, a cast assert is made to check if types are compatible.static voidChangeWrapperHandleStrength(NetObject otp, boolean fIsWeak)static voidCleanupUnusedObjectsInCurrentContext()static NetObjectCreateWrapperOfType(NetObject o, NetType t)static intFinalReleaseComObject(NetObject o)static GuidGenerateGuidForType(NetType type)static java.lang.StringGenerateProgIdForType(NetType type)static NetObjectGetActiveObject(java.lang.String progID)static NetObjectGetComObjectData(NetObject obj, NetObject key)static intGetComSlotForMethodInfo(MemberInfo m)static intGetEndComSlot(NetType t)static intGetExceptionCode()static NetExceptionGetExceptionForHR(int errorCode)static intGetHRForException(NetException e)static intGetHRForLastWin32Error()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class Typestatic intGetLastWin32Error()static MemberInfoGetMethodInfoForComSlot(NetType t, int slot, JCORefOut<ComMemberType> memberType)static intGetStartComSlot(NetType t)static ThreadGetThreadFromFiberCookie(int cookie)static NetTypeGetTypeFromCLSID(Guid clsid)static java.lang.StringGetTypeInfoName(ITypeInfo typeInfo)static java.lang.StringGetTypeInfoName(UCOMITypeInfo pTI)static GuidGetTypeLibGuid(ITypeLib typelib)static GuidGetTypeLibGuid(UCOMITypeLib pTLB)static GuidGetTypeLibGuidForAssembly(Assembly asm)static intGetTypeLibLcid(ITypeLib typelib)static intGetTypeLibLcid(UCOMITypeLib pTLB)static java.lang.StringGetTypeLibName(ITypeLib typelib)static java.lang.StringGetTypeLibName(UCOMITypeLib pTLB)static voidGetTypeLibVersionForAssembly(Assembly inputAssembly, JCORefOut<java.util.concurrent.atomic.AtomicInteger> majorVersion, JCORefOut<java.util.concurrent.atomic.AtomicInteger> minorVersion)static booleanIsComObject(NetObject o)static booleanIsTypeVisibleFromCom(NetType t)static intNumParamBytes(MethodInfo m)static voidPrelink(MethodInfo m)static voidPrelinkAll(NetType c)static byteReadByte(NetObject ptr, int ofs)static shortReadInt16(NetObject ptr, int ofs)static intReadInt32(NetObject ptr, int ofs)static longReadInt64(NetObject ptr, int ofs)static intReleaseComObject(NetObject o)static voidReleaseThreadCache()static booleanSetComObjectData(NetObject obj, NetObject key, NetObject data)voidsetJCOInstance(JCObject instance)static intSizeOf(NetObject structure)static intSizeOf(NetType t)static voidThrowExceptionForHR(int errorCode)static voidWriteByte(JCORefOut<NetObject> ptr, int ofs, byte val)static voidWriteInt16(JCORefOut<NetObject> ptr, int ofs, char val)static voidWriteInt16(JCORefOut<NetObject> ptr, int ofs, short val)static voidWriteInt32(JCORefOut<NetObject> ptr, int ofs, int val)static voidWriteInt64(JCORefOut<NetObject> ptr, int ofs, long val)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: mscorlib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Runtime.InteropServices.Marshal- See Also:
- Constant Field Values
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classNetObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classNetObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classNetObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static Marshal cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoMarshal, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
Marshalinstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
AreComObjectsAvailableForCleanup
public static boolean AreComObjectsAvailableForCleanup() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
IsComObject
public static boolean IsComObject(NetObject o) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
IsTypeVisibleFromCom
public static boolean IsTypeVisibleFromCom(NetType t) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
SetComObjectData
public static boolean SetComObjectData(NetObject obj, NetObject key, NetObject data) throws java.lang.Throwable, ArgumentNullException, ArgumentException, NotImplementedException, ArgumentOutOfRangeException, FormatException, ObjectDisposedException, AbandonedMutexException, InvalidOperationException
-
ReadByte
public static byte ReadByte(NetObject ptr, int ofs) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
ReadInt16
public static short ReadInt16(NetObject ptr, int ofs) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
FinalReleaseComObject
public static int FinalReleaseComObject(NetObject o) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
GetComSlotForMethodInfo
public static int GetComSlotForMethodInfo(MemberInfo m) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
GetEndComSlot
public static int GetEndComSlot(NetType t) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetExceptionCode
public static int GetExceptionCode() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
GetHRForException
public static int GetHRForException(NetException e) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetHRForLastWin32Error
public static int GetHRForLastWin32Error() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
GetLastWin32Error
public static int GetLastWin32Error() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
GetStartComSlot
public static int GetStartComSlot(NetType t) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetTypeLibLcid
public static int GetTypeLibLcid(ITypeLib typelib) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetTypeLibLcid
public static int GetTypeLibLcid(UCOMITypeLib pTLB) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
NumParamBytes
public static int NumParamBytes(MethodInfo m) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
ReadInt32
public static int ReadInt32(NetObject ptr, int ofs) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
ReleaseComObject
public static int ReleaseComObject(NetObject o) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
SizeOf
public static int SizeOf(NetObject structure) throws java.lang.Throwable, ArgumentNullException
- Throws:
java.lang.ThrowableArgumentNullException
-
SizeOf
public static int SizeOf(NetType t) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
ReadInt64
public static long ReadInt64(NetObject ptr, int ofs) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetExceptionForHR
public static NetException GetExceptionForHR(int errorCode) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GenerateGuidForType
public static Guid GenerateGuidForType(NetType type) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetTypeLibGuid
public static Guid GetTypeLibGuid(ITypeLib typelib) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetTypeLibGuid
public static Guid GetTypeLibGuid(UCOMITypeLib pTLB) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetTypeLibGuidForAssembly
public static Guid GetTypeLibGuidForAssembly(Assembly asm) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
BindToMoniker
public static NetObject BindToMoniker(java.lang.String monikerName) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateWrapperOfType
public static NetObject CreateWrapperOfType(NetObject o, NetType t) throws java.lang.Throwable, ArgumentNullException, ArgumentException, NotImplementedException, ObjectDisposedException, AbandonedMutexException, ArgumentOutOfRangeException, FormatException, InvalidOperationException
-
GetActiveObject
public static NetObject GetActiveObject(java.lang.String progID) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetComObjectData
public static NetObject GetComObjectData(NetObject obj, NetObject key) throws java.lang.Throwable, ArgumentNullException, ArgumentException, NotImplementedException, ObjectDisposedException, AbandonedMutexException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionNotImplementedExceptionObjectDisposedExceptionAbandonedMutexException
-
GetMethodInfoForComSlot
public static MemberInfo GetMethodInfoForComSlot(NetType t, int slot, JCORefOut<ComMemberType> memberType) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GenerateProgIdForType
public static java.lang.String GenerateProgIdForType(NetType type) throws java.lang.Throwable, ArgumentNullException, ArgumentException, NotImplementedException, InvalidOperationException, MissingMethodException, TargetInvocationException, ArgumentOutOfRangeException, FormatException, NotSupportedException
-
GetTypeInfoName
public static java.lang.String GetTypeInfoName(ITypeInfo typeInfo) throws java.lang.Throwable, ArgumentNullException
- Throws:
java.lang.ThrowableArgumentNullException
-
GetTypeInfoName
public static java.lang.String GetTypeInfoName(UCOMITypeInfo pTI) throws java.lang.Throwable, ArgumentNullException
- Throws:
java.lang.ThrowableArgumentNullException
-
GetTypeLibName
public static java.lang.String GetTypeLibName(ITypeLib typelib) throws java.lang.Throwable, ArgumentNullException
- Throws:
java.lang.ThrowableArgumentNullException
-
GetTypeLibName
public static java.lang.String GetTypeLibName(UCOMITypeLib pTLB) throws java.lang.Throwable, ArgumentNullException
- Throws:
java.lang.ThrowableArgumentNullException
-
GetThreadFromFiberCookie
public static Thread GetThreadFromFiberCookie(int cookie) throws java.lang.Throwable, ArgumentException
- Throws:
java.lang.ThrowableArgumentException
-
GetTypeFromCLSID
public static NetType GetTypeFromCLSID(Guid clsid) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
ChangeWrapperHandleStrength
public static void ChangeWrapperHandleStrength(NetObject otp, boolean fIsWeak) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CleanupUnusedObjectsInCurrentContext
public static void CleanupUnusedObjectsInCurrentContext() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
GetTypeLibVersionForAssembly
public static void GetTypeLibVersionForAssembly(Assembly inputAssembly, JCORefOut<java.util.concurrent.atomic.AtomicInteger> majorVersion, JCORefOut<java.util.concurrent.atomic.AtomicInteger> minorVersion) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
Prelink
public static void Prelink(MethodInfo m) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
PrelinkAll
public static void PrelinkAll(NetType c) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
ReleaseThreadCache
public static void ReleaseThreadCache() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
ThrowExceptionForHR
public static void ThrowExceptionForHR(int errorCode) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
WriteByte
public static void WriteByte(JCORefOut<NetObject> ptr, int ofs, byte val) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
WriteInt16
public static void WriteInt16(JCORefOut<NetObject> ptr, int ofs, char val) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
WriteInt16
public static void WriteInt16(JCORefOut<NetObject> ptr, int ofs, short val) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
WriteInt32
public static void WriteInt32(JCORefOut<NetObject> ptr, int ofs, int val) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-