More functions in funclist.proto.
This commit is contained in:
parent
1f4d7dc374
commit
ecf9efd6d7
|
@ -9,21 +9,6 @@ static HRESULT lastErrorToHRESULT(DWORD lasterr, const char *funcname)
|
|||
return hr;
|
||||
}
|
||||
|
||||
@BOOL UnregisterClassW LPCWSTR className HINSTANCE hInstance == 0
|
||||
@*HWND CreateWindowExW DWORD exstyle LPCWSTR className LPCWSTR title DWORD style int x int y int width int height HWND parent HMENU menu HINSTANCE hInstance LPVOID lpParam == NULL
|
||||
@BOOL DestroyWindow HWND hwnd == 0
|
||||
@BOOL UpdateWindow HWND hwnd == 0
|
||||
@BOOL AdustWindowRectEx LPRECT r DWORD style BOOL hasMenu DWORD exStyle == 0
|
||||
|
||||
@*BOOL GetMessageW LPMSG msg HWND hwnd UINT minMsg UINT maxMsg < 0
|
||||
@BOOL PostMessageW HWND hwnd UINT uMsg WPARAM wParam LPARAM lParam == 0
|
||||
@UINT_PTR SetTimer HWND hwnd UINT_PTR id UINT time TIMERPROC proc == 0
|
||||
@BOOL KillTimer HWND hwnd UINT_PTR id == 0
|
||||
|
||||
@int GetWindowTextW HWND hwnd LPWSTR str int n == 0
|
||||
@BOOL SetWindowTextW HWND hwnd LPCWSTR str == 0
|
||||
@BOOL SetWindowPos HWND hwnd HWND insertAfter int x int y int cx int cy UINT flags == 0
|
||||
$typedef WINDOWPLACEMENT *uiprivLPWINDOWPLACEMENT;
|
||||
@BOOL GetWindowPlacement HWND hwnd uiprivLPWWINDOWPLACEMENT wp == 0
|
||||
$typedef const WINDOWPLACEMENT *uiprivLPCWINDOWPLACEMENT;
|
||||
@BOOL SetWindowPlacement HWND hwnd uiprivLPCWINDOWPLACEMENT wp == 0
|
||||
|
|
|
@ -1,5 +1,83 @@
|
|||
# 8 august 2018
|
||||
|
||||
# TODO preserve lpRect on failure
|
||||
func: {
|
||||
name: "AdjustWindowRectEx"
|
||||
arg: "_Inout_ LPRECT lpRect"
|
||||
arg: "_In_ DWORD dwStyle"
|
||||
arg: "_In_ BOOL bMenu"
|
||||
arg: "_In_ DWORD dwExStyle"
|
||||
ret: "BOOL"
|
||||
failval: "0"
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "CreateWindowExW"
|
||||
arg: "_In_ DWORD dwExStyle"
|
||||
arg: "_In_opt_ LPCWSTR lpClassName"
|
||||
arg: "_In_opt_ LPCWSTR lpWindowName"
|
||||
arg: "_In_ DWORD dwStyle"
|
||||
arg: "_In_ int X"
|
||||
arg: "_In_ int Y"
|
||||
arg: "_In_ int nWidth"
|
||||
arg: "_In_ int nHeight"
|
||||
arg: "_In_opt_ HWND hWndParent"
|
||||
arg: "_In_opt_ HMENU hMenu"
|
||||
arg: "_In_opt_ HINSTANCE hInstance"
|
||||
arg: "_In_opt_ LPVOID lpParam"
|
||||
ret: "HWND"
|
||||
failval: "NULL"
|
||||
save: true
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "DestroyWindow"
|
||||
arg: "_In_ HWND hWnd"
|
||||
ret: "BOOL"
|
||||
failval: "0"
|
||||
cleanup: true
|
||||
}
|
||||
|
||||
# TODO failexpr is < 0
|
||||
func: {
|
||||
name: "GetMessageW"
|
||||
arg: "_Out_ LPMSG lpMsg"
|
||||
arg: "_In_opt_ HWND hWnd"
|
||||
arg: "_In_ UINT wMsgFilterMin"
|
||||
arg: "_In_ UINT wMsgFilterMax"
|
||||
ret: "BOOL"
|
||||
failval: "-1"
|
||||
}
|
||||
|
||||
# TODO write a L'\0' to lpString[0] on failure
|
||||
# TODO also add extra checks to make sure lpString is not NULL
|
||||
func: {
|
||||
name: "GetWindowTextW"
|
||||
arg: "_In_ HWND hWnd"
|
||||
arg: "_Out_writes_(nMaxCount) LPWSTR lpString"
|
||||
arg: "_In_ int nMaxCount"
|
||||
ret: "int"
|
||||
failval: "0"
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "KillTimer"
|
||||
arg: "_In_opt_ HWND hWnd"
|
||||
arg: "_In_ UINT_PTR uIDEvent"
|
||||
ret: "BOOL"
|
||||
failval: "0"
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "PostMessageW"
|
||||
arg: "_In_opt_ HWND hWnd"
|
||||
arg: "_In_ UINT Msg"
|
||||
arg: "_In_ WPARAM wParam"
|
||||
arg: "_In_ LPARAM lParam"
|
||||
ret: "BOOL"
|
||||
failval: "0"
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "RegisterClassW"
|
||||
arg: "_In_ CONST WNDCLASSW *lpWndClass"
|
||||
|
@ -8,6 +86,37 @@ failval: "0"
|
|||
save: true
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "SetTimer"
|
||||
arg: "_In_opt_ HWND hWnd"
|
||||
arg: "_In_ UINT_PTR nIDEvent"
|
||||
arg: "_In_ UINT uElapse"
|
||||
arg: "_In_opt_ TIMERPROC lpTimerFunc"
|
||||
ret: "UINT_PTR"
|
||||
failval: "0"
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "SetWindowPos"
|
||||
arg: "_In_ HWND hWnd"
|
||||
arg: "_In_opt_ HWND hWndInsertAfter"
|
||||
arg: "_In_ int X"
|
||||
arg: "_In_ int Y"
|
||||
arg: "_In_ int cx"
|
||||
arg: "_In_ int cy"
|
||||
arg: "_In_ UINT uFlags"
|
||||
ret: "BOOL"
|
||||
failval: "0"
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "SetWindowTextW"
|
||||
arg: "_In_ HWND hWnd"
|
||||
arg: "_In_opt_ LPCWSTR lpString"
|
||||
ret: "BOOL"
|
||||
failval: "0"
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "UnregisterClassW"
|
||||
arg: "_In_ LPCWSTR lpClassName"
|
||||
|
@ -16,3 +125,10 @@ ret: "BOOL"
|
|||
failval: "0"
|
||||
cleanup: true
|
||||
}
|
||||
|
||||
func: {
|
||||
name: "UpdateWindow"
|
||||
arg: "_In_ HWND hWnd"
|
||||
ret: "BOOL"
|
||||
failval: "0"
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
./hresultwrap funclist.textpb
|
|
@ -1,4 +1,3 @@
|
|||
rm -f hresultwrap.pb.go hresultwrap &&
|
||||
protoc --go_out=. hresultwrap.proto &&
|
||||
go build hresultwrap.go hresultwrap.pb.go &&
|
||||
./hresultwrap funclist.textpb
|
||||
go build hresultwrap.go hresultwrap.pb.go
|
||||
|
|
Loading…
Reference in New Issue