The following example retrieves the current position of the file pointer in the file specified by the hFile value.
HANDLE hFile;
DWORD dwCurrentFilePosition;
dwCurrentFilePosition = SetFilePointer(
hFile, // must have GENERIC_READ and/or GENERIC_WRITE
0, // do not move pointer
NULL, // hFile is not large enough to need this pointer
FILE_CURRENT); // provides offset from current position