|
-
Jan 7th, 2003, 04:59 PM
#1
Thread Starter
New Member
Cards.DLL & VB.NET
I'm new to game programming in VB.NET. I need some help porting a card game from VB6 to VB.NET. I'd appreciate any help you can give.
I get an error the first time I call cdtInit. The error says "Object reference not set to an instance of an object".
I declare the cdtInit function in a global module & call it from my main form.load event.
Declaration is:
Declare Function cdtInit Lib "Cards.Dll" (ByVal dX As Long, ByVal dY As Long) As Long
Call is:
Dim X As Long, Y As Long
cdtInit(X, Y)
This sound so simple. What am I doing wrong?
-
Jan 7th, 2003, 05:05 PM
#2
Good Ol' Platypus
I think you are supposed to use:
VB Code:
Declare [b]Ansi[/b] Function ...
To import regular DLL functions. VB.NET DLLs don't require the Ansi, I believe.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jan 7th, 2003, 05:24 PM
#3
Thread Starter
New Member
I think you're right that the ANSI is not required. I get the error with or without it in the function declaration.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|