Hi all, want to use the API call:
GetVersionEx_()
What I have now is:
-snip-
Structure Version ; 0. The problem is how to allocate 128 byte for
CSDVersion.s and than use it in a structure.
Tryed CSDVersion.s[128] or the Dim command.
Also tryed to use a pointer to the variable but I don't get it.
Is there a possibility?
Have a nice day...
How to declare a size of a string
Re: How to declare a size of a string
You have to use curly brackets.
As a variable:
Or in a structure:
As a variable:
Code: Select all
Define CSDVersion.s{128}
Code: Select all
Structure MyStruc
CSDVersion.s{128}
EndStructure
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: How to declare a size of a string
Brackets are the syntax for arrays. In PureBasic, strings are their own type, so that won't work. You need curly braces "{" and "}". So something like the following should work:
It works inside Structures, too!
Code: Select all
CSDVersion.s{128}
PB v5.40/6.10, Windows 10 64-bit.
16-core AMD Ryzen 9 5950X, 128 GB DDR5.
16-core AMD Ryzen 9 5950X, 128 GB DDR5.