Search Result

Collapse
5 results in 0.0040 seconds.
Keywords
Members
Tags
marshal
  •  

  • JeepRubicon
    started a topic Passing structure to unmanaged code from C#

    Passing structure to unmanaged code from C#

    Hi all,

    I've been fighting this problem for some time now and am hoping someone can help. I'm converting a VB6 application to C#. Everything I'm about to show works perfect in VB6, but fails in C#.

    I'm making an API call into a C dll, passing a structure. The structure gets values modified in the C side and I should see the modified values in my return structure.

    Here are the C structures:

    ...
    See more | Go to post
    Last edited by JeepRubicon; Oct 10 '11, 05:55 PM. Reason: Added method

  • drcrs
    started a topic C# Compact framework Managed and Unmanaged code
    in C

    C# Compact framework Managed and Unmanaged code

    Hi everyone,
    I have a dll in c++ and I need to expose some functions to calling from a mobile solution, and I have problems sending a unicode string value

    example code:

    -----------------------------------
    [c++ Test.dll code]:

    __declspec(dlle xport) BOOL IsSupportedFile Type(LPWSTR FileType);

    BOOL IsSupportedFile Type(LPWSTR FileType)
    {
    MessageBox(NULL , FileType,...
    See more | Go to post

  • Suzan YILDIRIM
    started a topic need help importing the native DLL??

    need help importing the native DLL??

    Hi,

    i have a native or an unmanaged DLL that i will use this DLL to conrol an external device and i have tried to call it into c# but i have trouble with non-Blittable types...i have tried marshal these types but i'm not sure whether i achieved it..??

    thanks in advance

    Suzan
    See more | Go to post

  • couturep
    started a topic How to get pointer of an array of struct

    How to get pointer of an array of struct

    Hi,
    I need your precious time to help me to resolve this damn problem i have.

    I want to get a pointer from an array of struct.

    CODE :

    [StructLayout(La youtKind.Sequen tial, CharSet = CharSet.Ansi, Pack = 1)]
    unsafe public struct TECCPARAM
    {
    [MarshalAs(Unman agedType.ByValA rray, SizeConst = 64)]
    unsafe public char[] ParamStr;
    ...
    See more | Go to post

  • bretta
    started a topic Calling unmarshalled DLL from C#

    Calling unmarshalled DLL from C#

    Hi

    I am trying to make a series of calls to an unmarshalled DLL. The header file for the DLL reads as follows:
    Code:
    BOOL WINAPI	InitUSB	(void);
    BOOL WINAPI	CloseUSB (void);
    BOOL WINAPI USBReadData(BYTE Endpoint,DWORD BytesToRead,PBYTE DataBuffer);
    BOOL WINAPI USBSendCommand(BYTE bCmd);
    BOOL WINAPI USBGetCommand (BYTE bCmd, WORD wLength, PBYTE pData);

    In my code I have defined...
    See more | Go to post
Working...