PBXB64 Registry & System

Registry & System Standard

Full Windows registry and system control with REGISTER KEY/SET/GET/CLOSE/DELETE, COMM OPEN/CLOSE/SET/SEND/RECV, PROCESS GET/SET PRIORITY, and MOUSEPTR. All real Win32 API calls, not stubs.

Registry Operations

Read and write registry
FUNCTION PBMAIN() AS LONG LOCAL hKey AS LONG LOCAL value AS STRING ' Open registry key REGISTER KEY "HKEY_CURRENT_USER\\Software\\MyApp" TO hKey ' Write value REGISTER SET hKey, "Setting1", "42" ' Read value REGISTER GET hKey, "Setting1" TO value PRINT "Setting: "; value ' Close key REGISTER CLOSE hKey ' Delete value REGISTER DELETE hKey, "OldSetting" FUNCTION = 0 END FUNCTION

REGISTER KEY opens a registry key (creating it if needed). REGISTER SET/GET read and write string values. REGISTER CLOSE releases the handle. REGISTER DELETE removes a value. All use real RegCreateKeyEx, RegSetValueEx, RegQueryValueEx, RegCloseKey.

Serial Port (COMM)

Serial communication
FUNCTION PBMAIN() AS LONG LOCAL hComm AS LONG LOCAL received AS STRING LOCAL count AS LONG ' Open COM port COMM OPEN "COM1" AS #1 TO hComm ' Set baud rate COMM SET #1, BAUD = 9600 COMM SET #1, BITS = 8 COMM SET #1, PARITY = 0 ' Send data COMM SEND #1, "Hello Device" ' Receive data COMM RECV #1, 256, count, received PRINT "Received: "; received COMM CLOSE #1 FUNCTION = 0 END FUNCTION

COMM OPEN opens a serial port with CreateFile. COMM SET configures baud rate, data bits, parity, and stop bits. COMM SEND/RECV transfer data. COMM CLOSE releases the handle. Full Win32 COM port API.

Process Priority & Mouse Pointer

System control
FUNCTION PBMAIN() AS LONG LOCAL priority AS LONG ' Get current process priority priority = PROCESS GET PRIORITY PRINT "Priority: "; priority ' Set priority PROCESS SET PRIORITY %NORMAL_PRIORITY_CLASS ' Set mouse pointer MOUSEPTR %IDC_WAIT SLEEP 1000 MOUSEPTR %IDC_ARROW FUNCTION = 0 END FUNCTION

PROCESS GET/SET PRIORITY uses GetPriorityClass/SetPriorityClass. MOUSEPTR uses SetCursor with standard Win32 cursor IDs (IDC_ARROW, IDC_WAIT, IDC_CROSS, etc.). All real Win32 calls.

Back to feature list