Dll importing

Results 1 to 2 of 2
  1. #1
    Account Upgraded | Title Enabled! Exiled Hero is offline
    MemberRank
    Nov 2008 Join Date
    Multiple PlacesLocation
    202Posts

    Dll importing

    Can anyone tell me why this doesn't seem tow work?

    Code:
    [DllImport( "MRS.dll", CallingConvention = CallingConvention.StdCall, CharSet=CharSet.Ansi)]
    This is the error I recieve..

    Code:
    The type or namespace name 'DllImportAttribute' could not be found (are you missing a using directive or an assembly reference?) (CS0246)
    This is C# btw.

    Edit: nevermind, fixed it. Had to call:

    Code:
    using System.Runtime.InteropServices;
    Last edited by Exiled Hero; 19-02-10 at 11:23 AM.


  2. #2
    Account Upgraded | Title Enabled! PenguinGuys is offline
    MemberRank
    Sep 2009 Join Date
    AlabamaLocation
    261Posts

    Re: Dll importing

    Code:
    (are you missing a using directive or an assembly reference?) (CS0246)
    Your missing System.Runtime.InteropServices;

    google
    msdn C# visual CS0246



Advertisement