Results 1 to 3 of 3

Thread: C# Api

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    537

    C# Api

    Is there an easier way to declare & use API in C# than importing the DLL like so?

    Code:
    [DllImport("DLL", EntryPoint="blah...")]
    blah blah blah MessageBox(blah...);

    Thanks,
    Sir Loin

  2. #2
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: C# Api

    That is the easiest way - and it is fairly easy - you have to specify some minimal information in the DllImport attribute so that the API function can be found.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: C# Api

    Some people have an odd definition of difficult.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width