Logo Search packages:      
Sourcecode: pcsc-lite version File versions

INTERNAL void* SYS_MemoryMap ( int  iSize,
int  iFid,
int  iOffset 

Map the file iFid in memory for reading and writing.

[in] iSize Size of the memmory mapped.
[in] iFid File which will be mapped in memory.
[in] iOffset Start point of the file to be mapped in memory.
Address of the memory map.
Return values:
MAP_FAILED in case of error

Definition at line 217 of file sys_unix.c.


      void *vAddress;

      vAddress = 0;
      vAddress = mmap(0, iSize, PROT_READ | PROT_WRITE,
            MAP_SHARED, iFid, iOffset);

       * Here are some common error types: switch( errno ) { case EINVAL:
       * printf("EINVAL"); case EBADF: printf("EBADF"); break; case EACCES:
       * printf("EACCES"); break; case EAGAIN: printf("EAGAIN"); break; case
       * ENOMEM: printf("ENOMEM"); break; }

      return vAddress;

Generated by  Doxygen 1.6.0   Back to index