|
-
Jun 10th, 2001, 01:45 PM
#1
Thread Starter
Dazed Member
OS versions and API
Hey i was just wondering if there are any major changes to the API from OS to OS. With mircosoft spitting out a new OS every 10 seconds, windows 98, windows ME, windows XP ect.... do they add anymore functionality to the API or are the major changes just a revamped OS Interface?
-
Jun 10th, 2001, 03:20 PM
#2
The Win 9X family (95, 98, me) and the NT family (3.x,4.x,2000 pro)
have different sets of api's, especially for security and for network activity -netapi32
The main stuff - shell32, user32, kernel32, & gdi32, are all pretty much the same. But not exactly. You should include something like this to test before you call and bomb:
Code:
Private Declare Function LoadLibrary Lib "kernel32" _
Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function GetProcAddress Lib "kernel32" _
(ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" _
(ByVal hLibModule As Long) As Long
Public Function IsAPIThere(ByVal strFunc as String, ByVal strDll as String) as Boolean
Dim lHandle As Long
Dim lAddr As Long
lAddr = False
lHandle = LoadLibrary(strDll)
If lHandle <> 0 Then
lAddr = GetProcAddress(lHandle, strFunc)
FreeLibrary lHandle
End If
IsAPIThere = (lAddr <> 0)
End Function
-
Jun 10th, 2001, 07:34 PM
#3
Thread Starter
Dazed Member
Hummmmmm interesting. Thank you. So if, say i was using an API
call in a program i was developing i would want to use this function to see if the API is there?
-
Jun 11th, 2001, 02:32 PM
#4
I woudln't suggested you hard code that into your program, rather, you should test it on each OS (it shoulsn't be too hard).
Only test the API's you are skeptical about (e.g: security or net), because most of the others will probably work fine.
-
Jun 11th, 2001, 02:38 PM
#5
Thread Starter
Dazed Member
Ok thanks....... Dont worry i voted for you
-
Jun 11th, 2001, 02:47 PM
#6
I'm not overley concerned with that poll. If his attempt was to target me, then it looks like it backfired. Thanks anyways.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|