what is DllImport

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mosini
    New Member
    • Mar 2008
    • 1

    what is DllImport

    Hello.
    I want to know deeply what does the statement below means:
    ............... ............... ............... ............... ............... ............... ............... .......
    [DllImport("PrmC onnect.dll", CallingConventi on = CallingConventi on.Cdecl, EntryPoint = "OpenConnec t", ExactSpelling = true, CharSet = CharSet.Ansi)]

    public static extern int OpenConnect(int nComType, [MarshalAs(Unman agedType.LPStr)] String Param);

    ............... ............... ............... ............... ............... ............... ............... ....

    mean first why we use DLLImport?

    Second what is CallingConventi on for?

    third why it is not possible to add a reference to "PrmConnect.dll " from Reference folder in solution explorer ?

    forth what is the use of EntryPoint and ExactSpelling and CharSet?

    fifth why here it is written the OpenConnect with extern and also what does
    " [MarshalAs(Unman agedType.LPStr)] String Param " means?
    Plz Help guys.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Please find a related article here .

    Comment

    Working...