PDA

Click to See Complete Forum and Search --> : Bad DLL Calling convention


jbmoke
Mar 9th, 2000, 01:01 PM
I'm a novice and have just worked through the Lander game tutorial by John Percival. The bad dll calling convention error message had to do with this code snipopet:

Else
'paint the craft into its new position.
BitBlt picEarth.hdc, 150, LandY, piclander.ScaleWidth, _
piclander.ScaleHeight, piclander.hdc, 0, 0, vbSrcInvert
End If

I copied and pasted all the code from his web pages, but runtime didn't like this BitBlt call.

API calls are new to me - any ideas?

JB

Fox
Mar 9th, 2000, 05:01 PM
Well, first you have to 'include' this command from the API.

Add a new module and put this code in:

Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long


Hope this helps ;)