I'm tryin开发者_如何转开发g 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?
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.
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.
精彩评论