Results 1 to 2 of 2

Thread: Another API Q

  1. #1

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Post

    Who decides what name the function for an API-call is.
    ie getprivateprofilestring why not for ex GetKeyStringFromIni or omething else.

    I have not tested yet, but can I use My own function name instead?

    I'm just curious.

    ------------------
    On Error Goto Bed :0)
    [email protected]



  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    Uhmm some smartass at M$ decides that I think... but yes, you can use your own names....
    Declare Function TheNameYouWant Lib "thedll" Alias "RealFunctionName()
    eg. (from the API viewer)
    Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

    You can also declare this like:
    Private Declare Function TheWindoozDir Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

    In your program you call it like
    TheWindoozDir(params)

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