00094                    :
00095 
00096     This function performs a set jump operation by capturing 
the current
00097     context, virtualy unwinding to 
the caller of set jump, and returns zero
00098     to 
the caller.
00099 
00100 Arguments:
00101 
00102     JumpBuffer - Supplies 
the address of a jump buffer to store 
the virtual
00103         frame pointer and target address of 
the caller.
00104 
00105         N.B. This 
is an array of 
double to force quadword alignment.
00106 
00107 Return Value:
00108 
00109     
A value of zero 
is returned.
00110 
00111 --*/
00112 
00113 {
00114 
00115     CONTEXT ContextRecord;
00116     ULONG EstablisherFrame;
00117     PRUNTIME_FUNCTION FunctionEntry;
00118     BOOLEAN InFunction;
00119     PULONG JumpArray;
00120     ULONG NextPc;
00121 
00122     
00123     
00124     
00125     
00126 
00127     JumpArray = (PULONG)&JumpBuffer[0];
00128     RtlCaptureContext(&ContextRecord);
00129     NextPc = ContextRecord.Lr - 4;
00130     FunctionEntry = 
RtlLookupFunctionEntry(NextPc);
00131     NextPc = 
RtlVirtualUnwind(NextPc,
00132                               FunctionEntry,
00133                               &ContextRecord,
00134                               &InFunction,
00135                               &EstablisherFrame,
00136                               NULL,
00137                               0,
00138                               0xffffffff);
00139 
00140     JumpArray[1] = NextPc + 4;
00141     FunctionEntry = 
RtlLookupFunctionEntry(NextPc);
00142     NextPc = 
RtlVirtualUnwind(NextPc,
00143                               FunctionEntry,
00144                               &ContextRecord,
00145                               &InFunction,
00146                               &EstablisherFrame,
00147                               NULL,
00148                               0,
00149                               0xffffffff);
00150 
00151     JumpArray[0] = EstablisherFrame;
00152     
return 0;
00153 }
}