Verifier - Size of Data Types and Constant Values
Verifier - Size of Data Types and Constant Values
Usage: enter the name of a data type or constant declared in a header file.
Examples: DWORD, TBYTE, LVM_GETHEADER (requires commctrl.h), etc.
Set compiler and platform before defining the compiler path.
Windows SDK or Visual Studio
Compiler path: path to CL.EXE. Example:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cl.exe
Batch file: path to VCVARS32.BAT or VCVARS64.BAT or VCVARSX86_AMD64.BAT. Example:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat
MinGW, TDM-GCC
Compiler path: path to GCC.EXE. Example:
C:\Dev-Cpp\bin\gcc.exe
Batch file: only required if the gcc.exe directory is not in the PATH.
Another tool, Structor, is more appropriate for information about structures (size and offsets).
Credits
Thanks to the authors of AHK-SizeOf-Checker and StdoutToVar.
Download (AutoGUI tools)
Last edited by Alguimist on 06 Apr 2018, 06:35, edited 2 times in total.
Re: Size Checker - Check the Size of Structures and Data Types
Looks great =)
Since I used a sizeof checker too, I added 1 more line because I got some probs with calc size on unicode
Since I used a sizeof checker too, I added 1 more line because I got some probs with calc size on unicode
Code: Select all
; some code
; create sizeof.cpp
code := ((A_IsUnicode) ? "#define UNICODE 1`n" : "") ; <--
. "#include ..."
; some code[
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: Size Checker - Check the Size of Structures and Data Types
Thanks, jNizM
Update (version 1.1.0): this tool can also be used to check the offset of structure members and value of constants.
Examples: MSG.time, OPENFILENAME.Flags, WM_USER, TB_AUTOSIZE.
Update (version 1.1.0): this tool can also be used to check the offset of structure members and value of constants.
Examples: MSG.time, OPENFILENAME.Flags, WM_USER, TB_AUTOSIZE.
Re: Size Checker - Check the Size of Structures and Data Types
2 more tips:
EM_SETCUEBANNER
Use EM_SETCUEBANNER with wParam 1 not 0
DllCall("SendMessage", "Ptr", handle, "UInt", 0x1501, "Ptr", 1, "WStr", Text) last Ptr can be removed since the return is bool
To remove the grey border around the buttons border you can use this CtlColorBtns (thx to just me)
EM_SETCUEBANNER
Use EM_SETCUEBANNER with wParam 1 not 0
DllCall("SendMessage", "Ptr", handle, "UInt", 0x1501, "Ptr", 1, "WStr", Text) last Ptr can be removed since the return is bool
Buttons on white Gui'sTRUE if the cue banner should show even when the edit control has focus; otherwise, FALSE. FALSE is the default behavior—the cue banner disappears when the user clicks in the control.
To remove the grey border around the buttons border you can use this CtlColorBtns (thx to just me)
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: Size Checker - Check the Size of Structures and Data Types
That script leaks handles. According to the remarks for CreateSolidBrush():jNizM wrote:Buttons on white Gui's
To remove the grey border around the buttons border you can use this CtlColorBtns (thx to just me)
Moreover, color should be manually changed for different window background colors - cumbersome. What about backgrounds made of pattern brush or image?MSDN wrote:When you no longer need the HBRUSH object, call the DeleteObject function to delete it.
However, using GetStockObject() with NULL_BRUSH as parameter would avoid handle leaks and suit any window color/pattern/image:
MSDN wrote:It is not necessary (but it is not harmful) to delete stock objects by calling DeleteObject.
Code: Select all
; GLOBAL SETTINGS ===============================================================================================================
#NoEnv
#SingleInstance Force
SetBatchLines -1
; GUI ===========================================================================================================================
Gui, +LastFound
Gui, Margin, 10, 10
Gui, Color, AA88FF
Gui, Add, Radio, w100 vRB1, Radio1
Gui, Add, Radio, xm y+10 w100 vRB2, Radio2
Gui, Add, CheckBox, w100 vCB, CheckBox
Gui, Add, Edit, xm w100 h30
Gui, Add, Button, xm y+2 w100 vPB, Button
Gui, Show, w200 h200
WinSet, Redraw
return
; FUNCTIONS =====================================================================================================================
CtlColorBtns()
{
static init := OnMessage(0x0135, "CtlColorBtns")
return DllCall("GetStockObject", "uint", 5, "uptr")
}
; EXIT ==========================================================================================================================
GuiClose:
GuiEscape:
ExitApp
Part of my AHK work can be found here.
Re: Verifier - Size of Data Types and Constant Values
Note: Size Checker was renamed to Verifier.
Who is online
Users browsing this forum: No registered users and 6 guests