s0mApirator 0.98 (31kb)
08/30/2004 updated

MSDN

Iczelion's
site + forum
Apirator
 (masm32)





s0m|exe (28kb)
 de|compiler
via drag&drop


s0m-scripts,
s0mEx-scripts


Sign-0f-Misery
  s0m editor
Run s0mApirator and drag'n'drop this page to INPUT-BOX, then choose example. Each [EXAMPLE] contains one or several CALL-commands (especial -terminated string, maybe - multiline). Double-click each CALL one after another (in case of multiline CALL - double-click its 1-st line only). You'll get some result. Of course you can edit any example 'on-fly'. Or type other CALLs, INFO . See also MSDN + DOUBLE_CLICK
B E L O W   -   S O M E  E X A M P L E S   F O R   D O U B L E - C L I C K I N G



[EXIT] kernel32,,ExitProcess,,0 
[SWAP MOUSE BUTTONS] user32,,SystemParametersInfoA,,33,,1,,0,,0  (Swap) (33=SPI_SETMOUSEBUTTONSWAP) user32,,SystemParametersInfoA,,33,,0,,0,,0  (Set default)
[RUN DEFAULT SCREEN SAVER] user32,,PostMessageA,,{HWND},,#112,,#F140,,0  (#112=WM_SYSCOMMAND, #F140=SC_SCREENSAVE)
[OPEN DEFAULT BROWSER] shell32,,ShellExecuteA,,0,,0,,http://www.geocities.com/xmemor,,0,,0,,3 
[SIMPLE MESSAGEBOX] user32,,MessageBoxA,,{HWND} "Simple API tester by kero � 2k3, 2k4 geocities.com/xmemor",,"About s0mApirator",,#40030  (#40030 = MB_TOPMOST + MB_ICONEXCLAMATION + MB_OK) Try other API-constants for MessageBox: MB_ABORTRETRYIGNORE = #2 MB_NOFOCUS = #8000 MB_APPLMODAL = #0 MB_OK = #0 MB_COMPOSITE = #2 MB_OKCANCEL = #1 MB_DEFAULT_DESKTOP_ONLY = #20000 MB_PRECOMPOSED = #1 MB_DEFBUTTON1 = #0 MB_RETRYCANCEL = #5 MB_DEFBUTTON2 = #100 MB_RIGHT = #80000 MB_DEFBUTTON3 = #200 MB_RTLREADING = #100000 MB_DEFBUTTON4 = #300 MB_SETFOREGROUND = #10000 MB_DEFMASK = #F00 MB_SYSTEMMODAL = #1000 MB_HELP = #4000 MB_TASKMODAL = #2000 MB_ICONEXCLAMATION = #30 MB_TOPMOST = #40000 MB_ICONINFORMATION = #40 = MB_ICONASTERISK MB_TYPEMASK = #F MB_ICONMASK = #F0 MB_USEGLYPHCHARS = #4 MB_ICONQUESTION = #20 MB_USERICON = #80 MB_ICONSTOP = #10 = MB_ICONHAND MB_YESNO = #4 MB_MISCMASK = #C000 MB_YESNOCANCEL = #3 MB_MODEMASK = #3000 user32,,MessageBoxA,,0,,TEXT,,0,,#44123  (Title = 'Error', #44123 = MB_TOPMOST + MB_HELP + MB_DEFBUTTON2 + MB_ICONQUESTION + MB_YESNOCANCEL)
[MESSAGEBOX WITH MSGBOXPARAMS STRUCTURE] user32,,MessageBoxIndirectA,,@4 (@4 = pointer to MSGBOXPARAMS structure) 40 (size of structure in bytes = 10*4) {HWND},,#400000 (#400000 = hInstance) "Simple API tester by kero � 2k3, 2k4 geocities.com/xmemor",,"About s0mApirator",,#40080,,500  (#40080 = MB_TOPMOST + MB_USERICON + MB_OK , 500 = ID of icon in s0mApirator's resources)
[CHOOSE STOCK FONT FOR INPUT-BOX] gdi32,,GetStockObject,,10  (10=OEM_FIXED_FONT) 10=OEM_FIXED_FONT 11=ANSI_FIXED_FONT 12=ANSI_VAR_FONT 13=SYSTEM_FONT 14=DEVICE_DEFAULT_FONT 16=SYSTEM_FIXED_FONT 17=DEFAULT_GUI_FONT user32,,SendDlgItemMessageA,,{HWND},,2002,,#30,,?0,,1  (2002 = ID of INPUT-BOX) (#30=WM_SETFONT)
[CREATE FILE] kernel32,,CreateFileA,,"justcreated.txt" (our file) #C0000000 (#C0000000 = GENERIC_READ or GENERIC_WRITE) 1 (1 = FILE_SHARE_READ) 0,,2 (2 = CREATE_ALWAYS) #80 (#80 = FILE_ATTRIBUTE_NORMAL) 0  ?1  (save file handle) kernel32,,lstrcpy,,$4,,"API demonstrator"  (set text to buffer) kernel32,,lstrlen,,$4  (lenght of text above) ?2  kernel32,,WriteFile,,?1,,$4,,?2,,$,,0  kernel32,,CloseHandle,,?1  (necessary finale!)
[DRAW FRAME CONTROL] user32,,GetDC,,{HWND}  (Store device context handle) (for DFC_CAPTION: user32,,GetWindowDC,,{HWND}  ) ?1  user32,,DrawFrameControl,,?1,,@7 (pointer to RECT structure) 4 (Type: 4=DFC_BUTTON) #400 (State: #400=DFCS_BUTTONCHECK+DFCS_CHECKED) 2,,10,,30,,26  (attached RECT structure: Left,Top,Right,Bottom) Try other API-constants for DrawFrameControl: (Type) (State) 1=DFC_CAPTION Title bar 0=DFCS_CAPTIONCLOSE Close button 1=DFCS_CAPTIONMIN Minimize button 2=DFCS_CAPTIONMAX Maximize button 3=DFCS_CAPTIONRESTORE Restore button 4=DFCS_CAPTIONHELP Help button 2=DFC_MENU Menu bar 0=DFCS_MENUARROW Submenu arrow 1=DFCS_MENUCHECK Check mark 2=DFCS_MENUBULLET Bullet 4=DFCS_MENUARROWRIGHT Submenu arrow pointing left 3=DFC_SCROLL Scroll bar 0=DFCS_SCROLLUP Up arrow of scroll bar 1=DFCS_SCROLLDOWN Down arrow of scroll bar 2=DFCS_SCROLLLEFT Left arrow of scroll bar 3=DFCS_SCROLLRIGHT Right arrow of scroll bar 5=DFCS_SCROLLCOMBOBOX Combo box scroll bar 8=DFCS_SCROLLSIZEGRIP Size grip in bottom-right corner of window #10=DFCS_SCROLLSIZEGRIPRIGHT Size grip in bottom-left corner of window. 4=DFC_BUTTON Standard button 0=DFCS_BUTTONCHECK Check box 1=DFCS_BUTTONRADIOIMAGE Image for radio button (nonsquare needs image) 2=DFCS_BUTTONRADIOMASK Mask for radio button (nonsquare needs mask) 8=DFCS_BUTTON3STATE Three-state button 4=DFCS_BUTTONRADIO Radio button #10=DFCS_BUTTONPUSH Push button #100=DFCS_INACTIVE Button is inactive (grayed) #200=DFCS_PUSHED Button is pushed #400=DFCS_CHECKED Button is checked #800=DFCS_TRANSPARENT 98/Me/2000/XP: The background remains untouched #1000=DFCS_HOT 98/Me/2000/XP: Button is hot-tracked #2000=DFCS_ADJUSTRECT Bounding rectangle is adjusted to exclude the surrounding edge of the push button #4000=DFCS_FLAT Button has a flat border #8000=DFCS_MONO Button has a monochrome border 5=DFC_POPUPMENU 98/Me/2000/XP: Popup menu item
[COMMON DIALOG BOXES: OpenFile, SaveFileAs, ChooseFont, ChooseColor] comdlg32,,GetOpenFileNameA,,@4 (@4 = pointer to OPENFILENAME structure) 76 (size of structure in bytes = 19*4) 0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0  comdlg32,,GetSaveFileNameA,,@4,,76,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0  comdlg32,,ChooseFontA,,@4 (@4 = pointer to CHOOSEFONT structure) 60 (size of structure in bytes = 15*4) 0,,0,,0,,0,,#101,,0,,0,,0,,0,,0,,0,,0,,0,,0,,0  comdlg32,,ChooseColorA,,@4 (@4 = pointer to CHOOSECOLOR structure) 36 (size of structure in bytes = 9*4) 0,,0 0 (rgbResult-member of CHOOSECOLOR / here = 7-member of MemoryForCALLs) @13 (pointer to an array of 16 values...) 0,,0,,0,,0 0  (unused start of array)
[DRAW TEXT] Store device context handle: user32,,GetDC,,{HWND}  (choose other hWnd with help of key F8) ?5  (?5 = handle to DeviceContext) Now choose text color: comdlg32,,ChooseColorA,,@4,,36,,0,,0,,0,,@13,,0,,0,,0,,0,,0  (choose color and click OK-button) Now set text color: gdi32,,SetTextColor,,?5,,_7  Now choose background color: comdlg32,,ChooseColorA,,@4,,36,,0,,0,,0,,@13,,0,,0,,0,,0,,0  (choose color and click OK-button) Now set background color: gdi32,,SetBkColor,,?5,,_7  Now set output string and its lenght: gdi32,,TextOutA,,?5,,10,,10,," Simple Win32 API demonstrator ",,33  (33=lenght of output string)
[SIMPLE TOOLTIP] comctl32,,InitCommonControls  user32,,CreateWindowExA,,0,,Tooltips_class32,,0,,#40,,0,,0,,0,,0,,0,,0,,0,,0  (#40 = TTS_BALLOON) ?1  (?1 = tooltip's hWnd) user32,,SendMessageA,,?1,,#404 (#404 = TTM_ADDTOOL) 0,,@7 (@7 = pointer to TOOLINFO structure) 44 (size of structure in bytes = 11*4) #11 (#11 = TTF_IDISHWND or TTF_SUBCLASS) 0,,{HWND} (target = s0mApirator's window) 0,,0,,0,,0,,0,,"I'm s0mApirator's tooltip !",,0  ("..." - change this text) Now move cursor over s0mApirator window... then go on: user32,,GetDlgItem,,{HWND},,2002  (2002 = INPUT's ID) ?2  (?2 = INPUT's hWnd) user32,,GetDlgItem,,{HWND},,2003  (2003 = OUTPUT's ID) ?3  (?3 = OUTPUT's hWnd) user32,,SendMessageA,,?1,,#404,,0,,@7,,44,,#11,,0,,?2,,0,,0,,0,,0,,0,,"I'm INPUT's tooltip !",,0  user32,,SendMessageA,,?1,,#404,,0,,@7,,44,,#11,,0,,?3,,0,,0,,0,,0,,0,,"I'm OUTPUT's tooltip !",,0  Again move cursor over s0mApirator window... user32,,SendMessageA,,?1,,#10,,0,,0  (close tooltip)
[NEW ITEM TO SYSTEM MENU] Show sysmenu: user32,,PostMessageA,,{HWND},,#205,,0,,#FFFF0001  (#205=WM_RBUTTONUP, #FFFF0001=rel.point(1,-1)) Store sysmenu handle: user32,,GetSystemMenu,,{HWND},,0  ?30  user32,,InsertMenuItemA,,?30,,13,,1,,@7 (@7 = pointer to MENUITEMINFO structure) 44 (size of structure in bytes = 11*4) #32,,0,,#1000,,#ABC2 (#ABC2 = ID of menu item) 0,,0,,0,,0,,"Happy New Year !",,11  ("..." = change this text) Show new item: user32,,PostMessageA,,{HWND},,#205,,0,,#FFFF0001 
[SET IMAGE TO WINDOW] Store some image handles: user32,,LoadIconA,,#400000,,500  (#400000=hInstance) (500 = ID of icon in s0mApirator's resources) ?21  user32,,LoadImageA,,#400000,,500,,1,,16,,16,,0  ?22  user32,,LoadIconA,,0,,32515  (choose ID from 32512...32517, 32868...32873) ?23  user32,,LoadCursorA,,0,,32650  (choose ID from 32512...32516, 32631, 32642...32662, 32868...32883) ?24  user32,,LoadImageA,,#400000,,file.ani,,1,,16,,16,,#10  ?25  user32,,LoadCursorFromFileA,,file.ani  ?26  Now change icon in caption (choose from ?21 ... ?26): user32,,SendMessageA,,{HWND},,#80,,1,,?23  (#80=WM_SETICON) Now create child window (as place for image): user32,,CreateWindowExA,,0,,Static,,text,,#50000203,,2,,2,,32,,32,,{HWND},,12345,,0,,0  (#50000203 = Style = SS_ICON+SS_CENTERIMAGE+WS_VISIBLE+WS_CHILD) Now change image in child window (choose from ?21 ... ?26): user32,,SendDlgItemMessageA,,{HWND},,12345,,#0172,,1,,?23  (#0172=STM_SETIMAGE) Now close child window: user32,,SendDlgItemMessageA,,{HWND},,12345,,#10,,0,,0  (#10=WM_CLOSE)
[SET ICON, TEXT TO STATUSBAR] kernel32,,GetModuleHandleA,,comctl32  (if RetValue=0 then double-click next line: kernel32,,LoadLibraryA,,comctl32 ) comctl32,,CreateStatusWindow,,#50000100,,0,,{HWND},,12345  (#50000100 = Style = SBS_SIZEGRIP or WS_CHILD or WS_VISIBLE) user32,,SendDlgItemMessageA,,{HWND},,12345,,#401,,0,,"This is StatusBar"  (#401=SB_SETTEXT) user32,,LoadImageA,,#400000,,500,,1,,16,,16,,0  ?22  user32,,SendDlgItemMessageA,,{HWND},,12345,,#40F,,0,,?22  (#40F=SB_SETICON) user32,,SendDlgItemMessageA,,{HWND},,12345,,#10,,0,,0  (if you called LoadLibrary then double-click next two lines: kernel32,,GetModuleHandleA,,comctl32  kernel32,,FreeLibrary,,?0 )
[CONVERT DECIMAL INTEGER TO HEXADECIMAL] user32,,wsprintfA,,$5,,"%lu to %lX",,2004,,2004  (2004 = our decimal integer, CHANGE IT) user32,,MessageBoxA,,0,,$5,,"dec to hex",,#40000 
[CONVERT ERROR CODE TO ERROR MESSAGE] kernel32,,FormatMessageA,,#1000,,0,,1015,,0,,$6,,512,,0  (1015 = code of error, CHANGE IT) user32,,MessageBoxA,,0,,$6,,0,,#40000 
[NOT ONLY API...] DLLSkeleton,,TestHello  DLLSkeleton.dll from Iczelion's Win32 Assembly Tutorial part 17
[...CURRENT LOCAL TIME via MSVCRT.DLL] kernel32,,LoadLibraryA,,msvcrt  ?1  msvcrt,,time,,@10  (@10 = pointer to the storage location for time) msvcrt,,localtime,,@10  (convert a time value and correct for the local time zone) ?2  (pointer to the TM structure result) msvcrt,,asctime,,?2  (converts a TM structure to a character string) ?3  (pointer to the character string result) user32,,MessageBoxA,,0,,?3,,"Current Local Time",,#40000  kernel32.dll,,FreeLibrary,,?1 
[...TERRIBLE MESSAGE from MSVCRT.DLL] msvcrt,,abort 
D R A F T S Y N T A X, D R A F T I N F O (+) s0mApirator generates and then keeps up detailed output log (apilog.txt). (+) s0mApirator generates and then keeps up ini-file (s0mApirator.ini): it is just list of call-commands, where 1-st line is user32,,MoveWindow,,{HWND},,{left?},,{top?},,{width?},,{height?},,1  Before exit s0mApirator overwrites this line pursuant last size/position, at once after start - restores this size/position. Of course you can append here any other call-commands. You can drag'n'drop any text-file to INPUT-BOX, if size of this file < 64 kb. [CALL-COMMAND] Texture of CALL-command is cohered with MSDN notifications, but has some features. Say you can type user32,,ClientToScreen,,{HWND},,@5,,{X},,{Y}  as union of ClientToScreen function and POINT structure for this function. Details:
member1  member2  member3  member4  member5  member6  ...
LibraryseparatorFunctionseparatorParameter1separatorParameter2separatorParameter3separatorParameter4separator...
user32separatorClientToScreenseparator{HWND}separator@5separator {X}separator{Y}separator 
YELLOW - for ClientToScreen function, BLUE - for POINT structure.

MemoryForCALLs :
Base +  + 0+ 1*4+ 2*4+ 3*4+ 4*4+ 5*4+ 6*4+ 7*4...+ 255*4
    (serv.field)member1member2member3member4member5member6member7...member255
0dwords  Base + 1*1024Base + 2*1024{HWND}Base + 4*5{X}{Y}.........
+ 1*1024buf $1user32               
+ 2*1024buf $2ClientToScreen           
+ 3*1024buf $3                   
+ 4*1024buf $4                   
+ 5*1024buf $5                   
+ 6*1024buf $6                   
+ 7*1024buf $7                   
....................................
+ 31*1024buf $31                   

Base = offset FuncParams (see script s0mApirator.s0m).

Buffer $ = $(m+1), where m = max for occupied buffers $n .
I.e. for line  [kernel32,,GetModuleFileNameA,,0,,$,,512 ]  $ = $3 .


Of course, s0mApirator is only demonstrator and has visible limitations.

Though it can aught.  For example, max.size of buffer $3 =29kb (see table above).

But we can build new buffer (let its size =64kb):

 kernel32,,VirtualAlloc,,0,,65536,,4096,,4 
 ?1 						

Note: ?1 = pointer to this buffer.


[LIBRARY]

If library (.dll) lies inside current/system directory - type short name (like kernel32),
else you must type its full path (like c:\DLLSkeleton, extension isn't necessary here).

If path\name contains spaces - type it between quotes ("path\name").


[FUNCTION]

Function name is case sensitive, so you must type MessageBoxA, but not MESSAGEBOXA
(a fortiori - not truncated MessageBox).


[PARAMETER]
(DWORD)
(HOW TYPE)
 Decimal 10 
 10 
 Decimal -10 
 -10 
 Hexadecimal 0Ah (0xA) 
 #A 
 ?0

 ?n 
 ?0 = previous RetValue

 You can store previous RetValue to variable:  
 write and double-click line like
 ?5  
 after that previous RetValue is stored in ?5 variable
 (you can use together  1,...,1000  etc  for this).
 
 To store integer (say -2004) to variable (say ?67)
 write and double-click next lines:

 shlwapi,,StrToIntA,,"-2004" 
 ?67 

 Pointer to structure


 @n 
 There are some examples with structures on this page:

   'MessageBox with MSGBOXPARAMS structure',
   'Simple tooltip' (TOOLINFO),
   'New item to system menu' (MENUITEMINFO),
   'Common Dialog Boxes' (OPENFILENAME, CHOOSECOLOR, CHOOSEFONT),
   'Draw Polygon' (array of POINT structures),
   'Draw PolyPolyline' (two arrays of POINT structures),
   'FlashWindowEx' (FLASHWINFO).

 @n = address of n-member of MemoryForCALLs.

 If call-command contains (for example) 14 members - you can
 type @15 instead of pointer to structure and attach all members
 of structure as 'next' (after last 14-th) members of call-command. 
 _n 
 Value of n-member of MemoryForCALLs 
 Pointer to buffer 
 $, $1, ... $31 = pointers to buffers in MemoryForCALLs, see above 
 Pointer to text SomeText 
 You may type SomeText instead of pointer.
 But if this text is multiline, or contains blanks,
 or if its 1-st symbol is  digit  or  #, ?, @, _, $,    -
 type this text between quotes: "SomeText". 
 {HWND} 
 = handle of s0mApirator's window

 (Of course you can replace it with handle of other window) 
 {FHWND} 
 see WindowHandler.txt 
 {X}, {Y}, {POINT} 
 x-, y-coordinates, POINT structure, captured with help of key F8 
 Symbolic API constant 
 Present s0mApirator can't understand symbolic API constants :-(

 So type its numerical value: 0 instead of MB_OK, -20 
 instead of GWL_EXSTYLE, #10 instead of WM_CLOSE...

 Some useful tools-informers: 
 http://www.geocities.com/xmemor/2lz/apirator.html 


[SEPARATOR]
(ASCII SYMBOL)
(ACTION)
 7Fh (, Key Alt+127, Ctrl-Backspace) 
 END OF COMMAND 
 00h...1Fh except 09h 
 END OF PARAMETER + END OF COMMENT 
 09h (Tab), 20h (Space), 2Ch (Comma ,) 
 END OF PARAMETER + START OF COMMENT 
 Next (2-nd and more) Comma 
 END OF COMMENT 
 1-st any other ASCII symbol 
 START OF NEXT PARAMETER
 So you can use oneline and multiline commands (cose for comments).


[COMMENTS]

Comments to members of call-command = text after member, same line.
Can't contain comma if member isn't last.

But: WITH COMMENTS - SPEED DOWN.



M S D N + D O U B L E - C L I C K Let I don't know FlashWindowEx function. Then: 1) goto MSDN LIBRARY, Search, type 'FlashWindowEx', get info:
	FlashWindowEx
	
	The FlashWindowEx function flashes the specified window. 
	It does not change the active state of the window.
	
	BOOL FlashWindowEx(
	  PFLASHWINFO pfwi
	);
	
	Parameters
	pfwi 
	[in] Pointer to the FLASHWINFO structure. 
	
	Return Values
	The return value specifies the window's state before the call to the FlashWindowEx function.
	If the window caption was drawn as active before the call, the return value is nonzero. 
	Otherwise, the return value is zero.
	...
	Library: Use User32.lib
So carcass of needful call-command will be:

 user32,,FlashWindowEx,,@4,,[FLASHWINFO structure] 


2) Again MSDN LIBRARY, Search, type 'FLASHWINFO', get info:

	FLASHWINFO
	
	The FLASHWINFO structure contains the flash status for a window and the number of
	times the system should flash the window.
	
	typedef struct {
	  UINT cbSize;
	  HWND hwnd;
	  DWORD dwFlags;
	  UINT uCount;
	  DWORD dwTimeout;

	} FLASHWINFO,
	*PFLASHWINFO;

	Members

	cbSize
		Size of the structure, in bytes. 
	hwnd 
		Handle to the window to be flashed. The window can be either opened or minimized. 
	dwFlags 
		Flash status. This parameter can be one or more of the following values.
			Value 					Meaning 
		FLASHW_STOP	  Stop flashing. The system restores the window to its original state. 
		FLASHW_CAPTION	  Flash the window caption. 
		FLASHW_TRAY	  Flash the taskbar button. 
		FLASHW_ALL	  Flash both the window caption and taskbar button. This is 
				  equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags. 
		FLASHW_TIMER	  Flash continuously, until the FLASHW_STOP flag is set. 
		FLASHW_TIMERNOFG  Flash continuously until the window comes to the foreground. 
	uCount 
		Number of times to flash the window. 
	dwTimeout 
		Rate at which the window is to be flashed, in milliseconds. 
		If dwTimeout is zero, the function uses the default cursor blink rate.
So needful call-command will be:

 user32,,FlashWindowEx,,@4,,[cbSize],,[hwnd],,[dwFlags],,[uCount],,[dwTimeout] 

Set parameters: [cbSize]=5*4=20, [hwnd]={HWND}, [uCount]=5, [dwTimeout]=0,
[dwFlags]=FLASHW_ALL ... 

...but present s0mApirator can't understand symbolic API constants :-(

3)  Run  ApiViewer 2003  and get info:
	FLASHW_ALL		equ (FLASHW_CAPTION or FLASHW_TRAY)
	FLASHW_CAPTION		equ 1h
	FLASHW_STOP		equ 0
	FLASHW_TIMER		equ 4h
	FLASHW_TIMERNOFG	equ Ch
	FLASHW_TRAY		equ 2h
I.e. FLASHW_ALL = 1 + 2 = 3.


Now run s0mApirator, goto INPUT-BOX, type

 user32,,FlashWindowEx,,@4,,20,,{HWND},,3,,5,,0 

- AND DOUBLE-CLICK IT, AT LAST.



EXAMPLES ELSE


[COMMAND LINE]

 kernel32,,GetCommandLineA 

 ?3 

 user32,,MessageBoxA,,{HWND},,?3,,CommandLine,,#40000 


[MODULE FILE NAME]

 kernel32,,GetModuleFileNameA,,0,,$7,,512 
 
 user32,,MessageBoxA,,{HWND},,$7,,File,,#40000 


[WINDOW THREAD/PROCESS ID]

 user32,,GetWindowThreadProcessId,,{HWND},,@10 

 ?1 

 user32,,wsprintfA,,$8,,"ThreadID=%lX, ProcessID=%lX",,?1,,_10 

 user32,,MessageBoxA,,{HWND},,$8,,"For s0mApirator's window",,#40000 


[SYSERRORBOX]	(Win98)

 user32,,SysErrorBox,,[Message],,[Title],,3,,4,,#8007 

	Change parameters:
				
	0 - (no button)
	1 - OK          #8001 - default
	2 - Cancel      #8002
	3 - Yes         #8003
	4 - No          #8004
	5 - Retry       #8005
	6 - Abort       #8006
	7 - Ignore      #8007
	8 - Close       #8008


[WINDOW SIZING]

 user32,,DefWindowProcA,,{HWND},,#112,,#F000,,0 

	Change parameter:
        
	#F000 - Sizing with keyboard	(#F000=SC_SIZE)
	#F001 - Left edge
	#F002 - Right edge
	#F003 - Upper edge
	#F004 - Upper left corner
	#F005 - Upper right corner
	#F006 - Lower edge
	#F007 - Lower left corner
	#F008 - Lower right corner


[COMBOBOX]

 user32,,CreateWindowExA,,#200,,COMBOBOX,,0,,#50A00242,,100,,2,,170,,100,,{HWND},,54321,,0,,0 

 user32,,SendDlgItemMessageA,,{HWND},,54321,,#145,,0,,*.* 		(#145=CB_DIR)

 user32,,SendDlgItemMessageA,,{HWND},,54321,,#14F,,1,,0 		(#14F=CB_SHOWDROPDOWN)

 user32,,SendDlgItemMessageA,,{HWND},,54321,,#10,,0,,0 		(#10=WM_CLOSE)


[DRAW POLYPOLYLINE]

 user32,,GetDC,,0 

 ?8 							

 gdi32,,PolyPolyline,,?8,,@7,,@23			(@7 and @23 = pointers to arrays)
  2							(number of polylines)
  100,,100,/,100,,200,/,200,,100,/,100,,100		(array of POINT-structures) (polyline_1) 
  200,,200,/,200,,300,/,300,,200,/,200,,200		(polyline_2)
  4,,4 						(array of numbers) (size_1, size_2)


[MIRAGE]

 user32,,SendNotifyMessageA,,{HWND},,#b			(#b = WM_SETREDRAW)
  0							(0=FALSE / 1=TRUE)
  0 


['WINDOW SCANNER' KIT]

 Drag'n'drop WindowHandler.txt to INPUT-BOX, etc.


Hosted by www.Geocities.ws

1