Question

I'm trying to use the RegSetKeySecurity() function of Windows API, but the pSecurityDescriptor parameter is a pointer. What is "pointer" (PVOID) data type equivalence in Inno Setup?

Was it helpful?

Solution

The Pascal Scripting used in Inno Setup seems not to support pointers at all. Maybe you can just pass a cardinal (if 32-bit), or you could write your code in an external DLL and call this from the Inno Setup installation program.

OTHER TIPS

Little was late. xD To solve this problem, you must announce function parameter as a variable, using the keyword 'var'. This is the standard method of declaration pointers to the variables in the function parameters for Pascal.

Hah, I will bring thought to the logical end. First, the executing process of InnoSetup in all cases of 32 bits, that is, to you nobody prevents to declare new type ("PVOID" or "Pointer") the corresponding dimension (type PVOID = Cardinal; Pointer = Integer; etc.) and the more so it only for convenience of perception. Secondly, replacement of the index by a variable (by means of a keyword of "var"), at the announcement of external API functions, happens more than enough. In the third, because of the specific organization of memory at Pascal-script, some API functions won't be able to address such variables, then you nobody prevents to declare external functions of function of work with memory (GetMemory, FreeMemory, FillMemory + GetMemory = AllocMemory) from Kernel32.dll. GetMemory just returns the index on a memory site. In the fourth, for extraction of data from the block with indexes to you nobody prevents to use functions of copying like CopyMemory, StringCchCopyA, lstrcpynA from the same Kernel32.dll where he output parameter will be variable (var) of the necessary dimension, and entrance, the index on the block with offset to the necessary value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top