Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement _STARTUPINFO and associated contants #74

Merged
merged 3 commits into from
Apr 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pywincffi/core/cdefs/headers/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,21 @@
#define TIMER_MODIFY_STATE ...
#define TIMER_QUERY_STATE ...

// STARTUPINFO
#define STARTF_FORCEONFEEDBACK ...
#define STARTF_FORCEOFFFEEDBACK ...
#define STARTF_PREVENTPINNING ...
#define STARTF_RUNFULLSCREEN ...
#define STARTF_TITLEISAPPID ...
#define STARTF_TITLEISLINKNAME ...
#define STARTF_USECOUNTCHARS ...
#define STARTF_USEFILLATTRIBUTE ...
#define STARTF_USEHOTKEY ...
#define STARTF_USEPOSITION ...
#define STARTF_USESHOWWINDOW ...
#define STARTF_USESIZE ...
#define STARTF_USESTDHANDLES ...

// For the moment, we can't define this here. When cffi
// parses the header this returns -1 and cffi seems to
// only handle positive integers right now.
Expand Down
22 changes: 22 additions & 0 deletions pywincffi/core/cdefs/headers/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,25 @@ typedef struct _BY_HANDLE_FILE_INFORMATION {
DWORD nFileIndexHigh;
DWORD nFileIndexLow;
} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;

// https://msdn.microsoft.com/en-us/library/ms686331
typedef struct _STARTUPINFO {
DWORD cb;
LPTSTR lpReserved;
LPTSTR lpDesktop;
LPTSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
} STARTUPINFO, *LPSTARTUPINFO;
1 change: 1 addition & 0 deletions pywincffi/core/cdefs/sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Extra constants which are not defined in all versions of Windows or
// that pywincffi creates.
static const int FILE_FLAG_SESSION_AWARE = 0x00800000;
static const int STARTF_UNTRUSTEDSOURCE = 0x00008000;

HANDLE handle_from_fd(int fd) {
return (HANDLE)_get_osfhandle(fd);
Expand Down