cards.cardsdll.drawcard(System.IntPtr, int, int, int, int, int)
So I wrote this:public class DeckOfCards { [DllImport("cards.dll")] private static extern bool drawcard(ref IntPtr handle, ref int top, ref int left, ref int width, ref int height, ref int card); public DeckOfCards() { } public bool DrawACard(IntPtr canvas, int top, int left, int width, int height, int card) { return drawcard(ref canvas, ref top, ref left, ref height, ref width, ref card); } }Then I attempted to use it like this:
public partial class Form1 : Form { public Form1() { InitializeComponent(); DrawCard(); } private void DrawCard() { DeckOfCards Deck = new DeckOfCards(); IntPtr hdc = this.Handle; Deck.DrawACard(hdc, 10, 10, 100, 50, (int)Ranks.Five * 4 + (int)Suits.Clubs); } }It dies in the DrawACard method of my class with "Unable to find an entry point named 'drawcard' in DLL "cards.dll'.