Results 1 to 2 of 2

Thread: Bad DLL Calling convention

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Location
    Bend, Oregon, US
    Posts
    1

    Post

    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

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    Well, first you have to 'include' this command from the API.

    Add a new module and put this code in:
    Code:
    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

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