Archive: Pointers


Pointers
Hey,

Is it possible to let somehow two variables point to the same memory (like in normal C/C++)?

Thanks :)
CJ


no

(You can allocate "raw" memory with the system plugin, it also supports pointers and whatnot, but "only" the system plugin can work with those buffers anyway)


@ChocJunkie: you should rather explain what you're trying to achieve


I've got the following construction:

!macro myMacro _macroParam
StrCpy $0 "${_macroParam}"
Call myFunc
!macroEnd

Function myFunc
StrCpy $0 "new value"
${If} ...
Reboot
${Else}
...
${EndIf}
FunctionEnd


Instead of using StrCpy $0 "${macroParam}" I would like to assign $0 to the memory of the variables passed as _macroParam.
Yes, I could use StrCpy ${macroParam} "$0" as last command inside the macro, but if Reboot will be called, the value of _macroParam will not be changed. (I know, there seems to be no sense in changing a variable value if the system will be rebootet. But I need it. ;))

Thanks :)

CJ