Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

int kDbgHlpSeek ( PKDBGHLPFILE  pFile,
int64_t  off 
)

Sets the current file position.

Returns:
0 on success, and KDBG_ERR_* on failure.
Parameters:
pFile The file handle.
off The desired file position.

Definition at line 181 of file kDbgHlpCrt.cpp.

References KERR_OUT_OF_RANGE.

Referenced by kDbgHlpFileSize(), kDbgHlpReadAt(), and kdbgModPEOpen().

{
#ifdef HAVE_FSEEKO
    if (!fseeko(pFile->pStrm, off, SEEK_SET))
        return 0;
#else
    long l = (long)off;
    if (l != off)
        return KERR_OUT_OF_RANGE;
    if (!fseek(pFile->pStrm, l, SEEK_SET))
        return 0;
#endif
    return kDbgHlpCrtConvErrno(errno);
}


Generated by  Doxygen 1.6.0   Back to index