Page 1 of 1

PB integrated Windows API and API Viewer

Posted: Sat Oct 28, 2023 3:10 pm
by SMaag
..\PureBasic\Compilers\APIFunctionListing.txt contains a List of Windows API Functions.
Is this the actual list of Windows APi integrated in PB?


--------------------------------------------------------------------------------------
ActiveVB.de provides an API Viewer which can directly export the API Definition as PB Code

Here the example for CreateWindowExA created from ApiViewer!

OpenLibrary(0,"user32.dll")
CallFunction(0,"CreateWindowExA",dwExStyle.l, lpClassName.String, lpWindowName.String, dwStyle.l, x.l, y.l, nWidth.l, nHeight.l, hWndParent.l, hMenu.l, hInstance.l, lpParam.l)

You can download it from
https://activevb.de/rubriken/apiviewer/ ... ereng.html

Re: PB integrated Windows API and API Viewer

Posted: Sat Oct 28, 2023 4:07 pm
by mk-soft
Most Window API functions are already declared. You do not need to write the API function ...A or ...W. These are automatically extended internally by PB to the correct ASCII or WideChar API function.

Code: Select all


; CallFunction(0,"CreateWindowExA",dwExStyle.l, lpClassName.String, lpWindowName.String, dwStyle.l, x.l, y.l, nWidth.l, nHeight.l, hWndParent.l, hMenu.l, hInstance.l, lpParam.l)
r1 = CreateWindowEx_(dwExStyle.l, lpClassName.s, lpWindowName.s, dwStyle.l, x.l, y.l, nWidth.l, nHeight.l, hWndParent.i, hMenu.l, hInstance.i, lpParam.i)