Lib updates

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Everything
Enthusiast
Enthusiast
Posts: 224
Joined: Sat Jul 07, 2018 6:50 pm

Lib updates

Post by Everything »

I think some static libraries need updating.

For example there is no "QueryServiceStatusEx" in PB's AdvAPI32.Lib
MSDN
QueryServiceStatus function
This function has been superseded by the QueryServiceStatusEx function
So instead of static import with Import "AdvAPI32" we need to use OpenLibrary/GetFunction (GetProcAddress/GetModuleHandle)
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Lib updates

Post by Mistrel »

You can also use the Import keyword.
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Lib updates

Post by User_Russian »

Mistrel, You did not understand the purpose of the request.
Can you compile this code?

Code: Select all

Import "AdvAPI32.Lib"
  QueryServiceStatusEx(hService, InfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded)
EndImport

QueryServiceStatusEx(0, 0, 0, 0, 0)
User avatar
mk-soft
Always Here
Always Here
Posts: 5398
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Lib updates

Post by mk-soft »

For the time until the libraries are updated, which also use the libraries from PellesC. They are a bit more up-to-date.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Lib updates

Post by Mistrel »

User_Russian wrote:Mistrel, You did not understand the purpose of the request.
Yes, I misunderstood.
Post Reply