Пример #1
0
            /// <summary>
            /// Call Marshal.AllocHGlobal in the target process.
            /// </summary>
            public static RemotePtr AllocHGlobal(int cb)
            {
                var call = new CfrMarshalAllocHGlobalRemoteCall();

                call.cb = cb;
                call.RequestExecution();
                return(new RemotePtr(call.__retval));
            }
            /// <summary>
            /// Call Marshal.AllocHGlobal in the target process.
            /// A thread must be in a remote context in order to access this function.
            /// </summary>
            public static RemotePtr AllocHGlobal(int cb)
            {
                var call = new CfrMarshalAllocHGlobalRemoteCall();

                call.cb = cb;
                call.RequestExecution();
                return(new RemotePtr(CfxRemoteCallContext.CurrentContext.connection, call.__retval));
            }