#167 Missing FILE_SEGMENT_ELEMENT

Feature_requests
closed-fixed
2014-08-26
2002-07-28
No

I am trying to get the latest version of ACE
(www.cs.wustl.edu/~schmidt) working with MingW32
3.1. I run now into the problem that
FILE_SEGMENT_ELEMENT is not in winnt.h.

From the Borland compiler I have taken the following
typedef that is in winnt.h of Borland

Can this be added to MingW or did I miss something?

typedef union _FILE_SEGMENT_ELEMENT {
PVOID64 Buffer;
ULONGLONG Alignment;
}FILE_SEGMENT_ELEMENT,
*PFILE_SEGMENT_ELEMENT;

Discussion

  • Johnny Willemsen

    Logged In: YES
    user_id=585332

    Also in combination with the missing typedef above, the
    following method is missing. Will this be added in mingw?

    WIN32_Asynch_IO.cpp:1277: `::ReadFileScatter' undeclared
    (first use here)
    WIN32_Asynch_IO.cpp: In member function `virtual int

     
  • Johnny Willemsen

    Logged In: YES
    user_id=585332

    For getting this working the following must be added to winnt.h

    // Define stuff for PVOID64
    #if !defined(_MAC) && (defined(_M_MRX000) || defined
    (_M_ALPHA) || defined(_M_IA64)) && (_MSC_VER >= 1100)
    && !(defined(MIDL_PASS) || defined(RC_INVOKED))
    #define POINTER_64 __ptr64
    typedef unsigned __int64 POINTER_64_INT;
    #if defined(_AXP64_)
    #define POINTER_32 __ptr32
    #else
    #define POINTER_32
    #endif
    #else
    #if defined(_MAC) && defined(_MAC_INT_64)
    #define POINTER_64 __ptr64
    typedef unsigned __int64 POINTER_64_INT;
    #else
    #define POINTER_64
    typedef unsigned long POINTER_64_INT;
    #endif
    #define POINTER_32
    #endif

    typedef void * POINTER_64 PVOID64;

    //
    // Define segement buffer structure for scatter/gather
    read/write.
    //
    typedef union _FILE_SEGMENT_ELEMENT {
    PVOID64 Buffer;
    ULONGLONG Alignment;
    }FILE_SEGMENT_ELEMENT,
    *PFILE_SEGMENT_ELEMENT;

     
  • Johnny Willemsen

    Logged In: YES
    user_id=585332

    For ReadFileScatter and WriteFileScatter the following must
    be added to winbase.h

    BOOL
    WINAPI
    ReadFileScatter(
    IN HANDLE hFile,
    IN FILE_SEGMENT_ELEMENT aSegmentArray[],
    IN DWORD nNumberOfBytesToRead,
    IN LPDWORD lpReserved,
    IN LPOVERLAPPED lpOverlapped
    );

    BOOL
    WINAPI
    WriteFileGather(
    IN HANDLE hFile,
    OUT FILE_SEGMENT_ELEMENT aSegmentArray[],
    IN DWORD nNumberOfBytesToWrite,
    IN LPDWORD lpReserved,
    IN LPOVERLAPPED lpOverlapped
    );

     
  • Danny Smith

    Danny Smith - 2002-07-31

    Logged In: YES
    user_id=11494

    The problem you report has caused modification in some fashion in the official CVS for the given package. The w32api and
    mingw-runtime official CVS reside in the winsup CVS directory tree for Cygwin. Those package CVS trees are periodically
    merged into the MinGW CVS tree. If you still find problems then please open a new report.

     
  • Danny Smith

    Danny Smith - 2002-07-31
    • status: open --> closed-invalid
     
  • Danny Smith

    Danny Smith - 2002-07-31
    • status: closed-invalid --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks