Results 1 to 3 of 3

Thread: Dll/api

  1. #1
    spetnik
    Guest

    Dll/api

    I am trying to make a DLL which will call an API function for me. (VB is picky about using SetWindowLong with apps not woned by u). I really don't know C++ well, and am using whatever tutorials I can find. It works ok, when making a dummy function (int a(){return 5;}) but when i try to have the function call an API function (eg, clipcursor, setparent), i get this error in VB: Bad DLL calling convention. can anyone help?

  2. #2
    spetnik
    Guest
    hmmm, it seems to work when I put it in a class using a MFC dll.

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't know if the search will accept this, but try C++ DLL in the search.

    The calling convention is merely how it calls the function:
    Code:
    int __stdcall func() {
       return 0;
    }
    __stdcall is the convention for DLL functions.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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