Searched refs:hFile (Results 1 - 25 of 146) sorted by relevance

123456

/vbox/src/libs/xpcom18a4/nsprpub/pr/tests/w16gui/
H A Dpopfile.c98 static long PopFileLength (int hFile) argument
100 long lCurrentPos = _llseek (hFile, 0L, 1) ;
101 long lFileLength = _llseek (hFile, 0L, 2) ;
103 _llseek (hFile, lCurrentPos, 0) ;
112 int hFile ; local
115 if (-1 == (hFile = _lopen (lpstrFileName, OF_READ | OF_SHARE_DENY_WRITE)))
118 if ((lLength = PopFileLength (hFile)) >= 32000)
120 _lclose (hFile) ;
126 _lclose (hFile) ;
131 _lread (hFile, lpstrBuffe
145 int hFile ; local
[all...]
/vbox/src/VBox/Runtime/common/checksum/
H A Dmanifest-file.cpp48 RTFILE hFile; local
50 int rc = RTFileOpen(&hFile, pszFilename, fFlags);
54 rc = RTVfsIoStrmFromRTFile(hFile, fFlags, true /*fLeaveOpen*/, &hVfsIos);
60 RTFileClose(hFile);
68 RTFILE hFile; local
70 int rc = RTFileOpen(&hFile, pszFilename, fFlags);
74 rc = RTVfsIoStrmFromRTFile(hFile, fFlags, true /*fLeaveOpen*/, &hVfsIos);
80 RTFileClose(hFile);
H A DRTSha1Digest.cpp115 RTFILE hFile; local
116 int rc = RTFileOpen(&hFile, pszFile, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE);
125 rc = RTFileGetSize(hFile, &cbFile);
128 RTFileClose(hFile);
153 rc = RTFileRead(hFile, pvBuf, cbBuf, &cbRead);
168 RTFileClose(hFile);
H A DRTSha256Digest.cpp118 RTFILE hFile; local
119 int rc = RTFileOpen(&hFile, pszFile, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE);
128 rc = RTFileGetSize(hFile, &cbFile);
131 RTFileClose(hFile);
152 rc = RTFileRead(hFile, pvBuf, cbBuf, &cbRead);
167 RTFileClose(hFile);
/vbox/src/VBox/Runtime/testcase/
H A DtstFileAppendWin-1.cpp70 HANDLE hFile; local
83 hFile = CreateFile("tstFileAppendWin-1.tst",
90 if (hFile == INVALID_HANDLE_VALUE)
94 if (!SetFilePointerEx(hFile, off, &off, FILE_CURRENT))
99 if (!WriteFile(hFile, "0123456789", 10, &cb, NULL))
103 if (!SetFilePointerEx(hFile, off, &off, FILE_CURRENT))
111 if (ReadFile(hFile, szBuf, 1, &cb, NULL))
115 if (!SetFilePointerEx(hFile, off, &off, FILE_BEGIN))
120 CloseHandle(hFile);
126 hFile
[all...]
H A DtstRTFileAppend-1.cpp46 RTFILE hFile = NIL_RTFILE; local
47 int rc = RTFileOpen(&hFile,
59 RTTESTI_CHECK_RC(rc = RTFileSeek(hFile, off, RTFILE_SEEK_CURRENT, &offActual), VINF_SUCCESS);
62 RTTESTI_CHECK_RC(RTFileWrite(hFile, "0123456789", 10, NULL), VINF_SUCCESS);
66 RTTESTI_CHECK_RC(rc = RTFileSeek(hFile, off, RTFILE_SEEK_CURRENT, &offActual), VINF_SUCCESS);
72 rc = RTFileRead(hFile, szBuf, 1, &cb);
77 RTTESTI_CHECK_RC(rc = RTFileSeek(hFile, off, RTFILE_SEEK_BEGIN, &offActual), VINF_SUCCESS);
80 RTTESTI_CHECK_RC(RTFileClose(hFile), VINF_SUCCESS);
88 rc = RTFileOpen(&hFile,
99 RTTESTI_CHECK_RC(rc = RTFileSeek(hFile, of
[all...]
H A DtstRTFileGetSize-1.cpp44 RTFILE hFile; local
45 rc = RTFileOpen(&hFile, pszFilename, RTFILE_O_READ | RTFILE_O_DENY_NONE | RTFILE_O_OPEN);
55 RTTESTI_CHECK_RC_RETV(RTFileOpen(&hFile, pszFilename, RTFILE_O_READ | RTFILE_O_DENY_NONE | RTFILE_O_OPEN), VINF_SUCCESS);
59 RTTESTI_CHECK_RC(rc = RTFileGetSize(hFile, &cbFile), VINF_SUCCESS);
66 RTFileClose(hFile);
/vbox/src/libs/zlib-1.2.6/contrib/minizip/
H A Diowin32.c69 static voidpf win32_build_iowin(HANDLE hFile) argument
73 if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE))
76 w32fiow.hf = hFile;
81 CloseHandle(hFile);
92 HANDLE hFile = NULL; local
97 hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
99 return win32_build_iowin(hFile);
107 HANDLE hFile = NULL; local
112 hFile
122 HANDLE hFile = NULL; local
137 HANDLE hFile = NULL; local
151 HANDLE hFile = NULL; local
173 HANDLE hFile = NULL; local
194 HANDLE hFile = NULL; local
215 HANDLE hFile = NULL; local
240 HANDLE hFile = NULL; local
277 HANDLE hFile = NULL; local
319 HANDLE hFile; local
[all...]
/vbox/src/VBox/Runtime/common/vfs/
H A Dvfsstdfile.cpp49 RTFILE hFile; member in struct:RTVFSSTDFILE
66 rc = RTFileClose(pThis->hFile);
69 pThis->hFile = NIL_RTFILE;
81 return RTFileQueryInfo(pThis->hFile, pObjInfo, enmAddAttr);
111 int rc = RTFileGetSize(pThis->hFile, &cbFile);
120 rc = RTFileSeek(pThis->hFile, 0, RTFILE_SEEK_CURRENT, &off2);
141 rc = RTFileRead( pThis->hFile, pSgBuf->paSegs[0].pvSeg, pSgBuf->paSegs[0].cbSeg, pcbRead);
143 rc = RTFileReadAt(pThis->hFile, off, pSgBuf->paSegs[0].pvSeg, pSgBuf->paSegs[0].cbSeg, pcbRead);
161 rc = RTFileRead( pThis->hFile, pvSeg, cbSeg, pcbRead ? &cbReadSeg : NULL);
163 rc = RTFileReadAt(pThis->hFile, of
430 rtVfsFileFromRTFile(RTFILE hFile, uint64_t fOpen, bool fLeaveOpen, PRTVFSFILE phVfsFile) argument
446 RTVfsFileFromRTFile(RTFILE hFile, uint64_t fOpen, bool fLeaveOpen, PRTVFSFILE phVfsFile) argument
471 RTFILE hFile; local
486 RTVfsIoStrmFromRTFile(RTFILE hFile, uint64_t fOpen, bool fLeaveOpen, PRTVFSIOSTREAM phVfsIos) argument
[all...]
/vbox/src/VBox/Devices/Storage/
H A DDrvRawImage.cpp49 RTFILE hFile; member in struct:DRVRAWIMAGE
65 int rc = RTFileGetSize(pThis->hFile, &cbFile);
115 Assert(pThis->hFile != NIL_RTFILE);
121 int rc = RTFileSeek(pThis->hFile, off, RTFILE_SEEK_BEGIN, NULL);
124 rc = RTFileRead(pThis->hFile, pvBuf, cbRead, NULL);
134 pThis->hFile, pvBuf, cbRead, rc, off, pThis->pszFilename));
137 AssertMsgFailed(("RTFileSeek(%RTfile,%#llx,) -> %Rrc\n", pThis->hFile, off, rc));
149 Assert(pThis->hFile != NIL_RTFILE);
155 int rc = RTFileSeek(pThis->hFile, off, RTFILE_SEEK_BEGIN, NULL);
158 rc = RTFileWrite(pThis->hFile, pvBu
[all...]
/vbox/include/iprt/
H A Dtar.h112 * @param hFile The file handle to close.
114 RTR3DECL(int) RTTarFileClose(RTTARFILE hFile); variable
122 * @param hFile Handle to the file.
129 RTR3DECL(int) RTTarFileReadAt(RTTARFILE hFile, uint64_t off, void *pvBuf, size_t cbToRead, size_t *pcbRead);
137 * @param hFile Handle to the file.
144 RTR3DECL(int) RTTarFileWriteAt(RTTARFILE hFile, uint64_t off, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten);
151 * @param hFile Handle to the file.
154 RTR3DECL(int) RTTarFileGetSize(RTTARFILE hFile, uint64_t *pcbSize);
161 * @param hFile Handle to the file.
164 RTR3DECL(int) RTTarFileSetSize(RTTARFILE hFile, uint64_
[all...]
/vbox/src/VBox/Runtime/r3/posix/
H A Dfileio2-posix.cpp70 RTR3DECL(int) RTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs) argument
75 AssertReturn(hFile != NIL_RTFILE, VERR_INVALID_PARAMETER);
88 if (fstat(RTFileToNative(hFile), &Stat))
91 Log(("RTFileQueryInfo(%RTfile,,%d): returns %Rrc\n", hFile, enmAdditionalAttribs, rc));
128 LogFlow(("RTFileQueryInfo(%RTfile,,%d): returns VINF_SUCCESS\n", hFile, enmAdditionalAttribs));
133 RTR3DECL(int) RTFileSetTimes(RTFILE hFile, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, argument
155 int rc = RTFileQueryInfo(hFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
162 if (futimens(RTFileToNative(hFile), aTimespecs))
165 Log(("RTFileSetTimes(%RTfile,%p,%p,,): returns %Rrc\n", hFile, pAccessTime, pModificationTime, rc));
182 int rc = RTFileQueryInfo(hFile,
[all...]
H A Dfileio-posix.cpp354 RTR3DECL(int) RTFileClose(RTFILE hFile) argument
356 if (hFile == NIL_RTFILE)
358 if (close(RTFileToNative(hFile)) == 0)
378 RTR3DECL(RTHCINTPTR) RTFileToNative(RTFILE hFile) argument
380 AssertReturn(hFile != NIL_RTFILE, -1);
381 return (intptr_t)hFile;
420 RTR3DECL(int) RTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod, uint64_t *poffActual) argument
447 off_t offCurrent = lseek(RTFileToNative(hFile), (off_t)offSeek, aSeekRecode[uMethod]);
458 RTR3DECL(int) RTFileRead(RTFILE hFile, void *pvBuf, size_t cbToRead, size_t *pcbRead) argument
466 ssize_t cbRead = read(RTFileToNative(hFile), pvBu
494 RTFileWrite(RTFILE hFile, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten) argument
525 RTFileSetSize(RTFILE hFile, uint64_t cbSize) argument
551 RTFileGetSize(RTFILE hFile, uint64_t *pcbSize) argument
627 RTFileGetMaxSizeEx(RTFILE hFile, PRTFOFF pcbMax) argument
665 RTFileIsValid(RTFILE hFile) argument
677 RTFileFlush(RTFILE hFile) argument
685 RTFileIoCtl(RTFILE hFile, unsigned long ulRequest, void *pvData, unsigned cbData, int *piRet) argument
695 RTFileSetMode(RTFILE hFile, RTFMODE fMode) argument
714 RTFileSetOwner(RTFILE hFile, uint32_t uid, uint32_t gid) argument
[all...]
H A Dfilelock-posix.cpp51 RTR3DECL(int) RTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) argument
84 if (fcntl(RTFileToNative(hFile), (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0)
96 RTR3DECL(int) RTFileChangeLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) argument
99 return RTFileLock(hFile, fLock, offLock, cbLock);
103 RTR3DECL(int) RTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock) argument
127 if (fcntl(RTFileToNative(hFile), F_SETLK, &fl) >= 0)
/vbox/src/libs/xpcom18a4/nsprpub/pr/tests/
H A Dbigfile2.c59 HANDLE hFile; local
92 hFile = CreateFile(TEST_FILE_NAME, GENERIC_READ, 0, NULL,
94 if (hFile == INVALID_HANDLE_VALUE) {
99 li.LowPart = SetFilePointer(hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
105 if (ReadFile(hFile, buf, sizeof(buf), &nbytes, NULL) == 0) {
114 if (CloseHandle(hFile) == 0) {
H A Dbigfile3.c58 HANDLE hFile; local
66 hFile = CreateFile(TEST_FILE_NAME, GENERIC_WRITE, 0, NULL,
68 if (hFile == INVALID_HANDLE_VALUE) {
73 li.LowPart = SetFilePointer(hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
80 if (WriteFile(hFile, buf, sizeof(buf), &nbytes, NULL) == 0) {
85 if (CloseHandle(hFile) == 0) {
/vbox/src/VBox/Runtime/r3/darwin/
H A Dfilelock-darwin.cpp52 RTR3DECL(int) RTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) argument
85 if (fcntl(RTFileToNative(hFile), (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0)
104 if (!flock(RTFileToNative(hFile), f))
119 RTR3DECL(int) RTFileChangeLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) argument
122 return RTFileLock(hFile, fLock, offLock, cbLock);
126 RTR3DECL(int) RTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock) argument
150 if (fcntl(RTFileToNative(hFile), F_SETLK, &fl) >= 0)
157 if (!flock(RTFileToNative(hFile), LOCK_UN))
/vbox/src/VBox/Runtime/r3/win/
H A DrtFileNativeSetAttributes-win.cpp47 int rtFileNativeSetAttributes(HANDLE hFile, ULONG fAttributes) argument
62 NTSTATUS Status = NtSetInformationFile(hFile,
H A Dfileio-win.cpp60 * @param hFile Filehandle.
65 DECLINLINE(bool) MySetFilePointer(RTFILE hFile, uint64_t offSeek, uint64_t *poffNew, unsigned uMethod) argument
74 off.LowPart = SetFilePointer((HANDLE)RTFileToNative(hFile), off.LowPart, &off.HighPart, uMethod);
80 off.LowPart = SetFilePointer((HANDLE)RTFileToNative(hFile), off.LowPart, &off.HighPart, uMethod);
84 fRc = SetFilePointerEx((HANDLE)RTFileToNative(hFile), off, &off, uMethod);
97 * @param hFile Filehandle.
101 DECLINLINE(bool) IsBeyondLimit(RTFILE hFile, uint64_t offSeek, unsigned uMethod) argument
113 if (MySetFilePointer(hFile, 0, &offCurrent, FILE_CURRENT))
115 if (!MySetFilePointer(hFile, offSeek, NULL, uMethod))
118 MySetFilePointer(hFile, offCurren
140 RTFileToNative(RTFILE hFile) argument
344 RTFileClose(RTFILE hFile) argument
377 RTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod, uint64_t *poffActual) argument
404 RTFileRead(RTFILE hFile, void *pvBuf, size_t cbToRead, size_t *pcbRead) argument
483 RTFileWrite(RTFILE hFile, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten) argument
578 RTFileFlush(RTFILE hFile) argument
590 RTFileSetSize(RTFILE hFile, uint64_t cbSize) argument
632 RTFileGetSize(RTFILE hFile, uint64_t *pcbSize) argument
683 RTFileGetMaxSizeEx(RTFILE hFile, PRTFOFF pcbMax) argument
695 RTFileIsValid(RTFILE hFile) argument
724 RTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) argument
756 RTFileChangeLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) argument
787 RTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock) argument
801 RTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs) argument
898 RTFileSetTimes(RTFILE hFile, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime) argument
937 RTFileSetMode(RTFILE hFile, RTFMODE fMode) argument
959 RTFileQueryFsSizes(RTFILE hFile, PRTFOFF pcbTotal, RTFOFF *pcbFree, uint32_t *pcbBlock, uint32_t *pcbSector) argument
[all...]
/vbox/src/VBox/HostServices/SharedFolders/
H A Dteststubs.h46 extern int testRTFileClose(RTFILE hFile);
50 extern int testRTFileFlush(RTFILE hFile);
52 extern int testRTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock);
56 extern int testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs);
58 extern int testRTFileRead(RTFILE hFile, void *pvBuf, size_t cbToRead, size_t *pcbRead);
60 extern int testRTFileSetMode(RTFILE hFile, RTFMODE fMode);
62 extern int testRTFileSetSize(RTFILE hFile, uint64_t cbSize);
64 extern int testRTFileSetTimes(RTFILE hFile, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime);
66 extern int testRTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod, uint64_t *poffActual);
68 extern int testRTFileUnlock(RTFILE hFile, int64_
[all...]
/vbox/src/VBox/Runtime/r3/nt/
H A Dfs-nt.cpp54 HANDLE hFile; local
62 &hFile,
71 NTSTATUS rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &FsSizeInfo, sizeof(FsSizeInfo), FileFsSizeInformation);
110 RTNtPathClose(hFile);
127 HANDLE hFile; local
135 &hFile,
148 NTSTATUS rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &u, sizeof(u), FileFsVolumeInformation);
154 RTNtPathClose(hFile);
171 HANDLE hFile; local
179 &hFile,
241 HANDLE hFile; local
[all...]
/vbox/src/VBox/Runtime/generic/
H A DRTProcDaemonize-generic.cpp72 int rc = RTFileOpenBitBucket(&hStdIn.u.hFile, RTFILE_O_READ);
78 rc = RTFileOpenBitBucket(&hStdOutAndErr.u.hFile, RTFILE_O_WRITE);
88 RTFileClose(hStdOutAndErr.u.hFile);
91 RTFileClose(hStdOutAndErr.u.hFile);
/vbox/src/VBox/VMM/testcase/
H A DtstSSM-2.cpp38 RTFILE hFile; local
39 rc = RTFileOpen(&hFile, pszOutputFilename, RTFILE_O_DENY_NONE | RTFILE_O_WRITE | RTFILE_O_CREATE);
54 rc = RTFileWrite(hFile, &u8, sizeof(u8), &cbWritten);
61 RTFileClose(hFile);
/vbox/src/VBox/VMM/VMMR3/
H A DDBGFCoreWrite.cpp111 * @param hFile The file to write to.
117 static int Elf64WriteElfHdr(RTFILE hFile, uint16_t cProgHdrs, uint16_t cSecHdrs) argument
142 return RTFileWrite(hFile, &ElfHdr, sizeof(ElfHdr), NULL /* all */);
149 * @param hFile The file to write to.
159 static int Elf64WriteProgHdr(RTFILE hFile, uint32_t Type, uint32_t fFlags, uint64_t offFileData, uint64_t cbFileData, argument
171 return RTFileWrite(hFile, &ProgHdr, sizeof(ProgHdr), NULL /* all */);
199 * @param hFile The file to write to.
207 static int Elf64WriteNoteHdr(RTFILE hFile, uint16_t Type, const char *pszName, const void *pcvData, uint64_t cbData) argument
250 int rc = RTFileWrite(hFile, &ElfNoteHdr, sizeof(ElfNoteHdr), NULL /* all */);
256 rc = RTFileWrite(hFile, szNoteNam
317 dbgfR3CoreWriteWorker(PVM pVM, RTFILE hFile) argument
522 RTFILE hFile; local
[all...]
/vbox/src/VBox/Runtime/common/misc/
H A Dhandle.cpp48 rc = RTFileClose(ph->u.hFile);
49 ph->u.hFile = NIL_RTFILE;

Completed in 936 milliseconds

123456