Search Result

Collapse
5 results in 0.0014 seconds.
Keywords
Members
Tags
marshalling
  •  

  • How to convert/marshall C Function and DLL Structure type to C#

    Hi,

    Can someone please help me convert my C structure/function into C#? I really need this badly...
    I believe I can call the DLL properly if I have able to correctly convert the function and marshal properly my structure.

    Here is my struct and the function that uses it:
    Code:
    typedef struct UIclient_info {
    	char name[50];
    	int age;
    	SECONDUSER *stParent;
    } FIRSTUSER;
    ...
    See more | Go to post

  • arjun404346
    started a topic sending pointer from C++ to C#

    sending pointer from C++ to C#

    Hello all,
    I have to send a pointer from C++ to C#. How can I do this?
    Error message I am getting on the C# program is
    "Pointers and fixed size buffers may only be used in an unsafe context"
    Please help.
    See more | Go to post

  • Happy2006
    started a topic Convert array<Byte>^ data to const byte* data
    in .NET

    Convert array<Byte>^ data to const byte* data

    Hello

    I am trying to call a function in C from C# though c ++

    so basically C# -> C++ - >C

    In C#, I have byte[] bytes - which reads the information from the file. I am passing the byte array and the size to C++ .

    In C++ I get the byte array and the size but I am not able to convert to the specific data types.

    Code:
    void Image::OpenMemFile(array<Byte>^ data, unsigned
    ...
    See more | Go to post

  • MottetCCSF
    started a topic C# to unmanaged C++
    in .NET

    C# to unmanaged C++

    I have created 2 structures in my C# code :
    Code:
            [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
            public class RollInformationCSharp
            {
                [MarshalAs(UnmanagedType.R8)]
                public double rollDiameter;
    
                [MarshalAs(UnmanagedType.R8)]
                public double initialRoughness;
    
                [MarshalAs(UnmanagedType.R8)]
    ...
    See more | Go to post

  • VM
    Guest started a topic What is Marshaling?

    What is Marshaling?

    What's marshalling? I've had to use it extensively for a project but I don't
    know what it means. I tried to look for a definition in the Internet but I
    couldn't find anything that would explain what it is.
    Is converting a C-style struct to a C# class (or struct) marshalling? And
    what about the function exports? Are those Marshalling too?

    Thanks for your help and thanks for helping me with the Dll exports (the...
    See more | Go to post
Working...