.NET c# application call win32 regulare dll api

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chi Tang

    .NET c# application call win32 regulare dll api

    Hi,

    Does anybody know how to call a unmanaged win32 dll function from a .NET C#
    managed application? Do I need to write a managed C++ dll or a COM dll
    which become a server of .net C# app or I can just 'import' the win32 dll
    into my .NET C# application? Where can I get the sample? Thanks a lot for
    any help,

    CT


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: .NET c# application call win32 regulare dll api

    Chi,

    Check out the section of the .NET framework documentation titled
    "Platform Invoke Tutorial", located at (watch for line wrap):



    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m
    "Chi Tang" <chikuotang@hot mail.com> wrote in message
    news:eLi9VTzlDH A.2160@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Hi,
    >
    > Does anybody know how to call a unmanaged win32 dll function from a .NET[/color]
    C#[color=blue]
    > managed application? Do I need to write a managed C++ dll or a COM dll
    > which become a server of .net C# app or I can just 'import' the win32 dll
    > into my .NET C# application? Where can I get the sample? Thanks a lot[/color]
    for[color=blue]
    > any help,
    >
    > CT
    >
    >[/color]


    Comment

    • Chi Tang

      #3
      Re: .NET c# application call win32 regulare dll api

      Nicholas,

      Appreciate your help. This is exactly what I need. Thanks again,

      CT

      "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in
      message news:OuVGYXzlDH A.2232@TK2MSFTN GP09.phx.gbl...[color=blue]
      > Chi,
      >
      > Check out the section of the .NET framework documentation titled
      > "Platform Invoke Tutorial", located at (watch for line wrap):
      >
      >[/color]

      vcwlkPlatformIn vokeTutorial.as p[color=blue]
      >
      > Hope this helps.
      >
      >
      > --
      > - Nicholas Paldino [.NET/C# MVP]
      > - mvp@spam.guard. caspershouse.co m
      > "Chi Tang" <chikuotang@hot mail.com> wrote in message
      > news:eLi9VTzlDH A.2160@TK2MSFTN GP10.phx.gbl...[color=green]
      > > Hi,
      > >
      > > Does anybody know how to call a unmanaged win32 dll function from a .NET[/color]
      > C#[color=green]
      > > managed application? Do I need to write a managed C++ dll or a COM dll
      > > which become a server of .net C# app or I can just 'import' the win32[/color][/color]
      dll[color=blue][color=green]
      > > into my .NET C# application? Where can I get the sample? Thanks a lot[/color]
      > for[color=green]
      > > any help,
      > >
      > > CT
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...