Bug 10469 – WinAPI declarations in std.process should be moved to core.sys.windows.windows
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-24T15:25:00Z
Last change time
2013-06-24T23:40:06Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2013-06-24T15:25:08Z
These Windows API declarations should be moved out of std.process and into core.sys.windows.windows:
-----
version (Windows)
{
extern(Windows) BOOL GetHandleInformation(HANDLE hObject,
LPDWORD lpdwFlags);
extern(Windows) BOOL SetHandleInformation(HANDLE hObject,
DWORD dwMask,
DWORD dwFlags);
extern(Windows) BOOL TerminateProcess(HANDLE hProcess,
UINT uExitCode);
extern(Windows) LPWSTR* CommandLineToArgvW(LPCWSTR lpCmdLine,
int* pNumArgs);
enum
{
HANDLE_FLAG_INHERIT = 0x1,
HANDLE_FLAG_PROTECT_FROM_CLOSE = 0x2,
}
enum CREATE_UNICODE_ENVIRONMENT = 0x400;
}
-----
The reason why is because code which uses both the WindowsAPI[1] project and std.process together can fail to build due to conflicts. It's mostly the enum definitions that are the problem, but we should move the function declarations to core.sys.windows.windows as well.
[1] : http://www.dsource.org/projects/bindings/wiki/WindowsApi
Comment #1 by andrej.mitrovich — 2013-06-24T15:38:06Z