NTSTATUS
MiSnapThunk(
  IN  PVOID DllBase,
  IN  PVOID ImageBase,
  IN  PIMAGE_THUNK_DATA NameThunk,
  OUT PIMAGE_THUNK_DATA AddrThunk,
  IN  PIMAGE_EXPORT_DIRECTORY ExportDirectory,
  IN  ULONG ExportSize,
  IN  BOOLEAN SnapForwarder,
  OUT PCHAR *MissingProcedureName
  );

Routine Description:

    This function snaps a thunk using the specified Export Section data.
    If the section data does not support the thunk, then the thunk is
    partially snapped (Dll field is still non-null, but snap address is
    set).

Arguments:

    DllBase - Base of DLL being snapped to.

    ImageBase - Base of image that contains the thunks to snap.

    Thunk - On input, supplies the thunk to snap.  When successfully
        snapped, the function field is set to point to the address in
        the DLL, and the DLL field is set to NULL.

    ExportDirectory - Supplies the Export Section data from a DLL.

    SnapForwarder - determine if the snap is for a forwarder, and therefore
       Address of Data is already setup.

Return Value:


    STATUS_SUCCESS or STATUS_DRIVER_ENTRYPOINT_NOT_FOUND or
        STATUS_DRIVER_ORDINAL_NOT_FOUND