Exemplo n.º 1
0
        public List <string> CallMe3()
        {
            CheckDestroyed();
            if (!CallMe3_IsValid)
            {
                NativeReflection.LogInvalidFunctionAccessed("/Script/USharp.BPTest1:CallMe3");
                return(default(List <string>));
            }
            unsafe
            {
                byte * ParamsBufferAllocation = stackalloc byte[CallMe3_ParamsSize];
                IntPtr ParamsBuffer           = new IntPtr(ParamsBufferAllocation);

                NativeReflection.InvokeFunction(Address, CallMe3_FunctionAddress, ParamsBuffer, CallMe3_ParamsSize);

                TArrayCopyMarshaler <string> CallMe3_ReturnValue_Marshaler = new TArrayCopyMarshaler <string>(1, CallMe3_ReturnValue_PropertyAddress, CachedMarshalingDelegates <string, FStringMarshaler> .FromNative, CachedMarshalingDelegates <string, FStringMarshaler> .ToNative);
                List <string> toReturn = CallMe3_ReturnValue_Marshaler.FromNative(IntPtr.Add(ParamsBuffer, CallMe3_ReturnValue_Offset));
                NativeReflection.InvokeFunction_DestroyAll(CallMe3_FunctionAddress, ParamsBuffer);
                return(toReturn);
            }
        }
Exemplo n.º 2
0
        public void CallMe5(ref List <string> a1, List <string> a2)
        {
            CheckDestroyed();
            if (!CallMe5_IsValid)
            {
                NativeReflection.LogInvalidFunctionAccessed("/Script/USharp.BPTest1:CallMe5");
                return;
            }
            unsafe
            {
                byte * ParamsBufferAllocation = stackalloc byte[CallMe5_ParamsSize];
                IntPtr ParamsBuffer           = new IntPtr(ParamsBufferAllocation);
                TArrayCopyMarshaler <string> CallMe5_a1_Marshaler = new TArrayCopyMarshaler <string>(1, CallMe5_a1_PropertyAddress, CachedMarshalingDelegates <string, FStringMarshaler> .FromNative, CachedMarshalingDelegates <string, FStringMarshaler> .ToNative);
                CallMe5_a1_Marshaler.ToNative(IntPtr.Add(ParamsBuffer, CallMe5_a1_Offset), a1);
                TArrayCopyMarshaler <string> CallMe5_a2_Marshaler = new TArrayCopyMarshaler <string>(1, CallMe5_a2_PropertyAddress, CachedMarshalingDelegates <string, FStringMarshaler> .FromNative, CachedMarshalingDelegates <string, FStringMarshaler> .ToNative);
                CallMe5_a2_Marshaler.ToNative(IntPtr.Add(ParamsBuffer, CallMe5_a2_Offset), a2);

                NativeReflection.InvokeFunction(Address, CallMe5_FunctionAddress, ParamsBuffer, CallMe5_ParamsSize);

                a1 = CallMe5_a1_Marshaler.FromNative(IntPtr.Add(ParamsBuffer, CallMe5_a1_Offset));
                NativeReflection.InvokeFunction_DestroyAll(CallMe5_FunctionAddress, ParamsBuffer);
            }
        }