Page 6 of 6

Re: Requested API Structure and constants

Posted: Wed Feb 19, 2025 5:44 pm
by Quin

Code: Select all

#PROCESS_QUERY_LIMITED_INFORMATION = $1000  
Source: https://learn.microsoft.com/en-us/windo ... ess-rights

Re: Requested API Structure and constants

Posted: Sat Mar 15, 2025 6:03 pm
by infratec
Since we can not longer ignore IPv6:

#AF_INET6

Code: Select all

CompilerIf Not Defined(AF_INET6, #PB_Constant)
  CompilerSelect #PB_Compiler_OS
    CompilerCase #PB_OS_Linux
      #AF_INET6 = 10
    CompilerCase #PB_OS_MacOS
      #AF_INET6 = 30
    CompilerCase #PB_OS_Windows
      #AF_INET6 = 23
  CompilerEndSelect
CompilerEndIf
in6_addr

Code: Select all

CompilerIf Not Defined(in6_addr, #PB_Structure)
  Structure in6_addr Align #PB_Structure_AlignC
    StructureUnion
      s6_addr.a[16]
      s6_addr16.u[8]
      s6_addr32.l[4]
    EndStructureUnion
  EndStructure
CompilerEndIf
SOCKADDR_IN6

Code: Select all

CompilerIf Not Defined(SOCKADDR_IN6, #PB_Structure)
  Structure SOCKADDR_IN6 Align #PB_Structure_AlignC
    CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
      sin6_len.a
      sin6_family.a
    CompilerElse
      sin6_family.u
    CompilerEndIf
    sin6_port.u
    sin6_flowinfo.l
    sin6_addr.in6_addr
    sin6_scope_id.l
  EndStructure
CompilerEndIf

Re: Requested API Structure and constants

Posted: Wed Apr 16, 2025 4:51 am
by Ventural
SYSTEM_POWER_STATUS has been updated.
https://learn.microsoft.com/en-us/windo ... wer_status

Code: Select all

Structure SYSTEM_POWER_STATUS
  ACLineStatus.b
  BatteryFlag.b
  BatteryLifePercent.b
  SystemStatusFlag.b   ; <- Showing as "Reserved1.b" in Structure Viewer
  BatteryLifeTime.l
  BatteryFullLifeTime.l
EndStructure

Re: Requested API Structure and constants

Posted: Sat Sep 27, 2025 11:04 am
by AZJIO
Constants for AssocQueryString()

Code: Select all

Enumeration  	
	#ASSOCSTR_COMMAND = 1
	#ASSOCSTR_EXECUTABLE
	#ASSOCSTR_FRIENDLYDOCNAME
	#ASSOCSTR_FRIENDLYAPPNAME
	#ASSOCSTR_NOOPEN
	#ASSOCSTR_SHELLNEWVALUE
	#ASSOCSTR_DDECOMMAND
	#ASSOCSTR_DDEIFEXEC
	#ASSOCSTR_DDEAPPLICATION
	#ASSOCSTR_DDETOPIC
	#ASSOCSTR_INFOTIP
	#ASSOCSTR_QUICKTIP
	#ASSOCSTR_TILEINFO
	#ASSOCSTR_CONTENTTYPE
	#ASSOCSTR_DEFAULTICON
	#ASSOCSTR_SHELLEXTENSION
	#ASSOCSTR_MAX
EndEnumeration
I often use opening a file in a program associated with .txt, for example, to open a js file in Notepad, but not to execute it. Or any other file that doesn't have any associations, but I know it's a text file.

Re: Requested API Structure and constants

Posted: Wed Jan 21, 2026 8:44 am
by Sergey
Already present Macro MsiEnumProducts_(arg1, arg2) and Macro MsiGetProductInfo_(arg1, arg2, arg3, arg4)
Need Macro MsiEnumPatches_(arg1 - 5) and Macro MsiGetPatchInfo_(arg1 - 4) too in msi.imp for Import "msi.lib"

Re: Requested API Structure and constants

Posted: Wed Jan 21, 2026 3:37 pm
by Fred
If you can, feel free to create patch for these adds, directly on https://github.com/fantaisie-software/purebasic (located in Residents/ dir)

Re: Requested API Structure and constants

Posted: Thu Jan 22, 2026 1:36 pm
by naf

Code: Select all

 #PB_OpenGL_GetContext 
The setter #PB_OpenGL_SetContext is useful, but there is no getter. The getter is necessary when the user has the freedom to dynamically create and and close windows and their OpenGLgadget()'s. Is there a quick workaround by importing something from a library and skipping the standard GetGadgetAttribute() ? Thanks. (PB v.6.21 on linux Zorin, msi GP72 2QE Leopard Pro)

The same question came when using wegGL / webView: viewtopic.php?p=636229#p636229

Re: Requested API Structure and constants

Posted: Thu Jan 22, 2026 2:01 pm
by Fred
It's not an API constant...

Re: Requested API Structure and constants

Posted: Thu Jan 22, 2026 2:12 pm
by naf
GetGadgetAttribute(openGLgadgetNum, #PB_OpenGL_SetContext ) only returns 0, not working. How can we get the context number after openGLgadget creation? -in order to store it for later use.

Re: Requested API Structure and constants

Posted: Thu Jan 22, 2026 2:19 pm
by Fred
Please open another topic, thanks.

Re: Requested API Structure and constants

Posted: Fri Jan 30, 2026 5:36 am
by Rinzwind
Little John wrote: Mon Jun 20, 2022 8:46 pm

Code: Select all

#KEYEVENTF_UNICODE = 4
#KEYEVENTF_SCANCODE = 8
https://github.com/tpn/winsdk-10/blob/m ... /WinUser.h
For some reason still not added?
Same

Code: Select all

#PROCESS_QUERY_LIMITED_INFORMATION = $1000
Also please add

Code: Select all

#MOUSEEVENTF_HWHEEL = $01000
Is this topic tracked? Anyone busy using win32 hits these simple things.

It seems like build-in constants had a cutoff date of WIndows XP or something. No effort was made to add newer constants and structures. Should be a public github project I guess with strict and useful doc with translation rules (or even automated)?

Re: Requested API Structure and constants

Posted: Fri Jan 30, 2026 7:58 am
by Bisonte
Rinzwind wrote: Fri Jan 30, 2026 5:36 am ...
Should be a public github project I guess with strict and useful doc with translation rules (or even automated)?
It is... see Freds post earlier :
If you can, feel free to create patch for these adds, directly on https://github.com/fantaisie-software/purebasic (located in Residents/ dir)