PDA

Click to See Complete Forum and Search --> : Another API Q


onerrorgoto
Jan 3rd, 2000, 03:56 PM
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)
anders@zsystemdesign.se

Crazy D
Jan 3rd, 2000, 04:35 PM
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)