In assembly I would
ProcA enter 16, 0 call ProcB leave ret ProcB enter 16, 1 ... code leave ret
Even if ProcA is in another file, so long as I know the order of the variables in ProcA they are visible to me in ProcB because 16 ,1 nests procedures frames one level.
So firstly, is there a pragma in VC++ or later versions that can force compiler to use ENTER instead of
push ebp mov ebp, esp add esp, -16
and make one procedures local variables aware of another's without coercing them into globals