Upload
z4rm4r
View
229
Download
0
Embed Size (px)
Citation preview
7/26/2019 Td Win32asm 025.Asm
1/12
td_win32asm_025.asm;==============================================================================; Test Department's WINDOWS 32 BIT x86 ASSEMBLY example's 025;==============================================================================
;==============================================================================; ==> Part 025 : IP Address Controls;------------------------------------------------------------------------------
; Bonjour,; the IP address control class is very usefull.; We can enter an IP address and must not control the correct input.; We can obtain the IP address via the IPM_GETADDRESS message.; Now we can use the bswap memnonic to convert the address to the correct; notation (bswap is avaible on a 486 machine and upward).; Ready to call API 'gethostbyaddr' to resolve the IP.; There are some more features avaible, look into the help file shellcc.chm !;; The API 'InitCommonControls' is obsolete and do not work with the
; IP address control class !; So, it is necessary to use API 'InitCommonControlsEx' !!!;;;; TD [email protected];
;==============================================================================; Assembler directives;------------------------------------------------------------------------------
.486 ; the processor our program want run on, (bswap=486)
.Model Flat ,StdCall ; always the same for Win9x (32 Bit)option casemap:none ; case sensitive !!!
;==============================================================================; Include all files where API functins resist you want use, set correct path;------------------------------------------------------------------------------include D:\Masm32\include\windows.incincludelib kernel32.libincludelib user32.lib
includelib comctl32.libincludelib wsock32.lib
;==============================================================================; Declaration of used API functions,take a look into WIN32.HLP and *.inc files;------------------------------------------------------------------------------GetModuleHandleA PROTO :DWORDInitCommonControlsEx PROTO :DWORDLoadIconA PROTO :DWORD,:DWORDLoadCursorA PROTO :DWORD,:DWORDRegisterClassExA PROTO :DWORD
CreateWindowExA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD, :DWORD,:DWORD,:DWORD,:DWORD,:DWORDShowWindow PROTO :DWORD,:DWORDUpdateWindow PROTO :DWORD
Page 1
7/26/2019 Td Win32asm 025.Asm
2/12
7/26/2019 Td Win32asm 025.Asm
3/12
7/26/2019 Td Win32asm 025.Asm
4/12
7/26/2019 Td Win32asm 025.Asm
5/12
7/26/2019 Td Win32asm 025.Asm
6/12
7/26/2019 Td Win32asm 025.Asm
7/12
7/26/2019 Td Win32asm 025.Asm
8/12
7/26/2019 Td Win32asm 025.Asm
9/12
7/26/2019 Td Win32asm 025.Asm
10/12
7/26/2019 Td Win32asm 025.Asm
11/12
7/26/2019 Td Win32asm 025.Asm
12/12
td_win32asm_025.asmmov esp,ebp ;delete stack framepop ebp ;ret 4h;##############################################################################
;******************************************************************************; My own subroutine(s) for a compacter code resist here ...
;------------------------------------------------------------------------------My_CleanSystem:;------------------------------------------------------------------------------; API "WSACleanup" terminates use of the Windows Sockets DLL.;------------------------------------------------------------------------------call WSACleanup ;- API Function -ret;******************************************************************************
;==============================================================================; end Main = end of our program code;------------------------------------------------------------------------------end Main ;end of our program code, entry point
;==============================================================================; To create the exe file use this commands with your Microsoft Assembler/Linker;------------------------------------------------------------------------------; ml.exe /c /coff td_win32asm_025.asm ;asm command; rc.exe /v rsrc.rc ;rc command; cvtres.exe /machine:ix86 rsrc.res; link.exe /subsystem:windows td_win32asm_025.obj rsrc.obj ;link command
;==============================================================================
Page 12