|
发表于 2022-7-5 19:26:08
|
显示全部楼层
Indeed, getenv & setenv can be used to read & write a string value (REG_SZ / REG_EXPAND_SZ) to a specific branch of the registry [specifically the location given by: (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\FixedProfile\\General") ], however, these are not global variables as you stated in your post.
Writing such values to the registry is essentially the same as reading & writing data to a text file (which may in fact be a preferred option due to the ease of removal - this is the route I follow with the majority of my larger applications).
As noted in my post above, vl-propagate is also an option, however, this will cause a global variable to persist only during the current instance of the application. |
|