Advertisement
Guest User

SyncVariable (UAC plugin)

a guest
Aug 28th, 2010
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !macro _SyncVariable _variable
  2.   !define Lprefix L${__LINE__}
  3.   push $R0
  4.   goto _SyncVariableInner${Lprefix}
  5.   _SyncVariableOuter${Lprefix}:
  6.     StrCpy $R0 ${_variable}
  7.     return
  8.   _SyncVariableInner${Lprefix}:
  9.   !insertmacro UAC_AsUser_Call Label _SyncVariableOuter${Lprefix} ${UAC_SYNCREGISTERS}
  10.   StrCpy ${_variable} $R0
  11.   !undef Lprefix
  12.   pop $R0
  13. !macroend
  14. !define SyncVariable `!insertmacro _SyncVariable`
  15.  
  16. !macro _SyncSection _section
  17.   !define Lprefix L${__LINE__}
  18.   push $R0
  19.   goto _SyncSectionInner${Lprefix}
  20.   _SyncSectionOuter${Lprefix}:
  21.     SectionGetFlags ${_section} $R0
  22.     return
  23.   _SyncSectionInner${Lprefix}:
  24.   !insertmacro UAC_AsUser_Call Label _SyncSectionOuter${Lprefix} ${UAC_SYNCREGISTERS}
  25.   SectionSetFlags ${_section} $R0
  26.   !undef Lprefix
  27.   pop $R0
  28. !macroend
  29. !define SyncSection `!insertmacro _SyncSection`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement