User Profile

Collapse

Profile Sidebar

Collapse
Suzan YILDIRIM
Suzan YILDIRIM
Last Activity: Feb 2 '10, 09:39 AM
Joined: Jan 31 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • unfortunately default parameters are not supported by C# before 4.0...
    See more | Go to post

    Leave a comment:


  • sorry..it's my foolishness..th e functions that is imported has default values...like unsigned char ReaderAddr = 0xff..for this imported function, i have written an overloaded one..does the compiler give any error??

    P.S. i haven't tried to communicate the RFID reader yet..before all else i have tried to figure out the DLL...
    See more | Go to post

    Leave a comment:


  • dennisoleksyuk,
    thanks for your explanation..it 's very clear..i have tried to call my DLL into C# for months..i have seen very miscellaneous examples to marshal the function parameters..but yours is very simple..for example i have done it like

    Code:
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
          public struct TagIds
          {
              public byte TagType;
              public byte
    ...
    See more | Go to post

    Leave a comment:


  • btw i'm not the writer of this DLL..

    Code:
    [DllImport("TestDriver.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "?DrfIsoMultiTagIdentify@@YGFKPAIPAUTagIds@@E@Z")]
    the name of the dll is DrfApiV10 so should i use this name instead of TestDriver.dll and i don't understand Implementation for the header
    that you have created..can you clarify it for me please??
    See more | Go to post

    Leave a comment:


  • and the C header file for the functions that i am trying to call is

    Code:
    typedef struct
    {
    	unsigned char TagType;
    	unsigned char AntNum;
    	unsigned char Ids[12];
    }TagIds;
    typedef short apiStatus;
    
    apiStatus __declspec(dllexport) __stdcall DrfCommOpen (HANDLE * hCom, char *com_port);
    apiStatus __declspec(dllexport) __stdcall DrfCommClose (HANDLE hCom);
    apiStatus
    ...
    See more | Go to post

    Leave a comment:


  • sorry i didn't know it.. i do...
    See more | Go to post

    Leave a comment:


  • Code:
    __declspec(dllexport) __stdcall short DrfIsoMultiTagIdentify(HANDLE hCom, unsigned int * Count,TagIds *value, unsigned char ReaderAddr);
    and the function is used like this

    Code:
         if(DrfIsoMultiTagIdentify(ComHandle,&Cnt,TagData,0Xff)==0)
         {
              for(i = 0; i < Cnt; i++)
                  OutputDate(TagData[i]);
         }
    See more | Go to post
    Last edited by tlhintoq; Jan 31 '10, 04:30 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]

    Leave a comment:


  • for example;

    Code:
    typedef struct
    {
    	unsigned char TagType;
    	unsigned char AntNum;
    	unsigned char Ids[12];
    }TagIds;
    
    /***************C# Convert**********************/
    
            [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
            public struct TagIds
            {
                public byte TagType;
                public byte AntNum;
    ...
    See more | Go to post
    Last edited by tlhintoq; Jan 31 '10, 04:30 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]

    Leave a comment:


  • 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
No activity results to display
Show More
Working...