Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#686 Some minor w32api-3.1 problems

WSL
closed
nobody
None
out-of-date
Known_bugs
2014-08-17
2004-11-23
Kleenex
No

I have found some more problems when using MinGW's
g++ version 3.4.2 and w32api-3.1.

1) missing header file: include\Sddl.h

When compiling the following code:

if (!
ConvertStringSecurityDescriptorToSecurityDescriptor(sddl,
SDDL_REVISION_1, (PSECURITY_DESCRIPTOR*)
&(m_pSecuAttr->lpSecurityDescriptor), NULL))
{
// ...
}

I'll get the errors; SDDL_REVISION_1 and
ConvertStringSecurityDescriptorToSecurityDescriptor
undeclared.

When I include the Sddl.h file from the Windows SDK,
WINADVAPI needs to be defined.

I've added the following lines to MinGW's
'include\WinBase.h' to get it working.

//-------------------------------------
#ifndef WINADVAPI
#ifdef __INSIDE_CYGWIN__
#define WINADVAPI
#else
#define WINADVAPI DECLSPEC_IMPORT
#endif
#endif
//-------------------------------------

2) missing defines in include\CommCtrl.h

//-------------------------------------
#if (_WIN32_IE >= 0x0400)
#define LVM_SORTITEMSEX (LVM_FIRST + 81)
#define ListView_SortItemsEx(hwndLV, _pfnCompare,
_lPrm) \ (BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX,
(WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)
(_pfnCompare))
#endif
//-------------------------------------

//-------------------------------------
#if (_WIN32_IE >= 0x0500)
#define RBBS_USECHEVRON 0x00000200 // display drop-
down button for this band if it's sized smaller than ideal
width
#endif
//-------------------------------------

3) missing typedefs in 'include\Psapi.h'.

//-------------------------------------
typedef struct _PERFORMANCE_INFORMATION {
DWORD cb;
SIZE_T CommitTotal;
SIZE_T CommitLimit;
SIZE_T CommitPeak;
SIZE_T PhysicalTotal;
SIZE_T PhysicalAvailable;
SIZE_T SystemCache;
SIZE_T KernelTotal;
SIZE_T KernelPaged;
SIZE_T KernelNonpaged;
SIZE_T PageSize;
DWORD HandleCount;
DWORD ProcessCount;
DWORD ThreadCount;
} PERFORMANCE_INFORMATION,
*PPERFORMANCE_INFORMATION,
PERFORMACE_INFORMATION,
*PPERFORMACE_INFORMATION;

typedef struct _ENUM_PAGE_FILE_INFORMATION {
DWORD cb;
DWORD Reserved;
SIZE_T TotalSize;
SIZE_T TotalInUse;
SIZE_T PeakUsage;
} ENUM_PAGE_FILE_INFORMATION,
*PENUM_PAGE_FILE_INFORMATION;

typedef BOOL (*PENUM_PAGE_FILE_CALLBACKW) (LPVOID
pContext, PENUM_PAGE_FILE_INFORMATION
pPageFileInfo, LPCWSTR lpFilename);

typedef BOOL (*PENUM_PAGE_FILE_CALLBACKA) (LPVOID
pContext, PENUM_PAGE_FILE_INFORMATION
pPageFileInfo, LPCSTR lpFilename);
//-------------------------------------

Kleenex

Discussion

  • Earnie Boyd
    Earnie Boyd
    2012-10-24

    • milestone: --> Aged_issue
    • status: open --> closed-out-of-date
     
  • Earnie Boyd
    Earnie Boyd
    2013-01-28

    • labels: w32api (deprecated use WSL) -->
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     I have found some more problems when using MinGW's 
     g++ version 3.4.2 and w32api-3.1.
    
    • status: closed-out-of-date --> closed
    • resolution: --> out-of-date
    • category: --> Known_bugs
    • milestone: --> WSL