Les procédures ASM


Dès que l'on attaque la programation en ASM, la petite routine qui va bien vient souvent à faire défaut. C'est en visitant le site de betrayed (http://betrayedgod.virtualave.net) que j'ai eu l'envie de vous proposer un espace où vous pourriez déposer et trouver de telles petites procédures. A vous aussi de savoir faire vivre cette page et faire en sorte qu'elle ne soit plus simplement une copie de celle de...

Home Asm Vb C/C++ Utilities Upload Board Links Guestbook About Contact

Betrayed

           

95

         

Asm Examples

Example: Dialog Url (4.5kb)
By: Betrayed
Description: Written in masm this example shows how to create a colored and clickable url using a static control in a dialog box.  Updated: Some of the code was rewritten and code commenting added.  This example has been tested on both Windows 9x and Nt/2000.

Example: Resource Meter (9kb)
By: Betrayed
Description: A resource meter coded in masm.  It shows how to work with a timer and load dll plus call functions from them.  This is somewhat better commented then my last couple of examples.  This example also shows a little bit about the wsprintf function as well as pushing a variable onto the stack a calling a function.  Do to the 16 bit nature of rsrc32.dll though this program will only run on a windows 9x machine.  Updated Dll's required to make this program work have been added to file.  Add them to your \window\system folder.

Example: Zip downloader (20kb)
By: Iczelion
Description: This program allows you to open up a zip file from the net and choose what files you want to d/l.  This program was coded in MASM and as with anything on this page full source code is included.  Tested on win9x and Nt/2000.

Example: Enumerate Windows (6kb)
By: Betrayed
Description: This example is based on the initial code by hutch.  In his winenum example he enumerates all top level windows  I took it a little bit farther and have it enumerate each windows children too.  Each parent will have its children window labeled directly below the parent  with a ----> Designating it a sub window. Tested in both win9x and Nt/2000.

Example: Password Sniffer ver. 2 (6kb)
By: Betrayed
Description: Version two of my password sniffing program.  This version is a complete rewrite of the above one.  It has a tighter and cleaner code (also much better comments) to improve the overall speed of the program.nbsp; Instead of listing pw's in a textbox it now modify's the pw window to make the text readable.  This product has been tested on both win9x and Nt/2000.  It also has been tested on common edit controls, TEdit control(delphi) and all flavors of vb edit controls.  Note! I know it does not work on web windows.

Example: Ip Dialog (4.5kb)
By: Betrayed
Description: This is my first program using winsock with assembly.  It shows the local computer name and local ip address when loaded.  This program also shows how to create a font and set it to a static text box.  This program has been tested on windows 9x and Nt/2000.

Example: Iq Test (5kb)
By: Betrayed
Description: A simple gag program.  This program tests the users iq by asking them a simple question and showing them an answer depending on the answer.  This program show's a simple subclass of a button and how to move buttons into new positions at runtime.  This program has been tested on Win9x and Windows Nt/2000

Example: Window Sizer (7kb)
By: Betrayed
Description: A tool for the resizing of any visible window on the system.  Demostrates how to enumerate all windows and see which one's are visible by using the isvisble function.  Also shows how to get a windows size and set the windows size and how to work with window rect's and some basic .if statements.  Updated Fixed the minimized window error.  Updated again Fixed piece of code I did not like.  This program has been tested on windows 9x and Nt/2000.

Example: Multi Thread (3.5kb)
By: Betrayed
Description: This example shows how to create a thread to handle a task while your program is free to do other things.  This example has two buttons, one that counts to 10,000 without the help of a thread and one that has the help of a thread.  The one without the help will appear to freeze the program(bad thing in windows), and the one with the thread will allow the window to act as normal because it is handled outside the main program.  This program has been tested on Windows 9x and Nt/2000.

Example: Host/Ip resolver (4kb)
By: Betrayed
Description: Resolve hostnames into ip(127.0.0.1) address's and vice versa.  This is my second example with winsock and this one is a little more in depth then my first one.  It also use a helper thread to do the work so the window does appear to freeze.  This code is also well commented for a little bit more help.  Updated: Rewrote the entire resolving function.  The interface was reworked as a result of the new resolving function.  It is a lot less confusing now.  This program has been tested in windows 9x and NT/2000.

Example: Quick Saver (8kb)
By: Betrayed
Description: Updated This program has had the dll completely rewritten and the main code reworked so it is a little bit cleaner then it was before.  This program sets up a system wide keyboard hook to monitor for the f12 keypress.  When it recieves the keypress it starts the defualt screen saver.  Also demonstrates creating a menu, tracking a popup menu and how to place an icon in the task bar.  This program has been tested in windows 9x and Nt/2000.

Example: Hot Key Adder (4.5kb)
By: Betrayed
Description: This little program shows how to add a hotkey to any top level window.  Shows how to use the hotkey control from the common control library.  Shows how to retrieve the hotkey from the control and set it to a window.  Also shows how to retrieve a hotkey from a window.  Any hot key set with this program will last even after the program is closed.  This program has been tested in win 9x and Nt/2000.

Example: Window's Uptime (3kb)
By: Betrayed
Description: A simple little program to display how long windows has been up.  Shows some simple divsion with use of remainders.  Also shows a use of a timer.  This program has been tested in Windows 9x.

Example: Tooltip example (4kb)
By: Betrayed
Description: This little example shows the implemintation of a tooltip control on a couple of different types's of controls.&bsp; Also shows how to load a string from a string resource and make use of it.  Finally it shows how to enumerate child windows and add each of them to the tooltip control, making adding a tooltip that much easier.  Updated Now has the ability to turn the tips on or off.  This program has been tested in win9x and nt/2000

Example: Color Spy (5kb)
By: Betrayed
Description: Updated  This project shows a lot of things through out its code.  Such as: how respond to a mouse click on a static control, how to change a static control's background color, how to load a cursor and set it, a better use of wsprintf, retrieving a pixels color and extracting the colorref (255 equals red), html (font color="FF0000" equals red) and r,g,b (255,0,0 equals red) from it and last but not least how to capture the mouse and respond to mouse moves outside the main window.  This program has been tested on win9x and nt/2000.

Example: Fast Link (2kb)
By: Betrayed
Description: A small little program that launchs a url in the default web browser.  Uses a messagebox for user input and shellexecute to launch the url.  I use a similiar type program to launch me to msdn library from qeditor.  This program has been tested on win9x and nt/2000.

Example: Common Color Example (3kb)
By: Betrayed
Description: This example shows how to load the common color dialog and retrieve the color chosen from it.  It then updates a static control with that color and displays the decimal value of the color chosen.  Has some minimal error handling to make sure the program does not update the color if the cancel or closes the dialog from the system menu.  This could and should be added to the color spy to make it so the user can choose a color even if they do not have an example of it.  This program has been tested in win9x and nt/2000

Example: Screen Wrapper (3.5kb)
By: Lazarus (Modified by Betrayed)
Description: This program show a couple of different things.  First how to get the max height and width of a window can be.  Then the interesting part when the mouse gets to the edge of the screen it gets wrapped to the other side in essance making your monitor sorta psuedo round.  Read the source code to see which parts i modified from Lazarus's orginal code and idea.  This program has been tested in win9x and nt/2000

Example: Registry Exampler (3kb)
By: Betrayed
Description: This example shows how to do a basic read and write from the registry.  It looks for a key on whether it has been run before, if it has it displayes a message box saying so.  If not it adds the registry key so the user will know it has been run before.  This program has been tested in win9x and nt/2000

Example: Wav Play (30kb) Wav Play 2 (57kb)
By: Betrayed
Description: A simple example that shows the most basic way of laying a wav file.  This example shows how to create a window and draw text to the center of it.  Most of this file size is do to the included wav file.  The second version of the program shows how to have the wav file included in the exe file.  Both programs have been tested in win9x and nt/2000

Example: System Cleaner (1.5kb)
By: Betrayed
Description: This tiny application will clean the user recent document list and empty the recycle bin.  This is accomplished through a couple a of calls to shell32.dll.  This program has been tested on win9x and nt/2000.  Please note while it does work on win 95 it requires ie4+.

Example: Window's Shutdown (1.5kb)
By: Betrayed
Description: Another tiny example but this one is a bit complicated.  Shutting down windows in 9x is as simple as calling exitwindowex with the right flags.  In Nt/2k it is more complicated because you have to give your program the privledge to shut down windows.  This example shows how to determine if the user is running nt or 9x and if nt is running how to adjust the privledges to be able to shut the system down.  This program has been tested in Windows9x and Windows nt/2000

Example: String Tokenizer (8.5kb)
By: Rudeboy
Description: Manipulating a string is always a pain.  This example by Rudeboy makes it a little bit easier.  The dll breaks a string down at the token a user requires.  Or it can use a defualt token which I think are space,tab,comma and period.  Full source is included for the dll.  Added by me was a simple example that breaks up a string and presents a message box for every token.  Full source for the example also included.  Be sure to read the help file that comes a long with the dll.  This example has been tested on win9x and NT/2000

Example: Choose Font (4.5kb)
By: Betrayed
Description: This example shows how to use the choose font common dialog.  This example displays all the info about the font as well as showing it in the choices the user defines.  Such as color, size, bold, underline, strike and italic.  This example also shows a way to adujst how the information is shown to make sure it is not overwritten if the user chooses a an odd font or size.  Last some simple gdi is shown.  Such as creating a font, setting a text color and backcolor as well.  Updated: Fixed a error so it would work with nt/2000  This example has been tested in win9x and NT/2000.

Example: Clipboard Clear (1.5kb)
By: Betrayed
Description: Example on opening the clipboard an checking whether or not it has data on it.  Then it gives the option of clearing the contents of the clipboard.  Has some minor error handling such as alerting the user if there is another program using it.  This example has been tested on win9x and NT/2000

Example: Open File Dialog (1.2kb)
By: Betrayed
Description: This example shows how to use the open file dialog from the common control library.  If the user chooses a file from the dialog box it will then attempt to shellexecute the program the user has chosen.   This example also checks to make sure that it does not try to shell a null string if the user clicks cancel or closes the window from the system menu.  This example has been tested in Win9x and Nt/2000

Example: Write to clipboard (3.0kb)
By: Unknown
Description: This one shows how to write to the clipboard.  Also interesting on this example is that it shows how to parse the command line into the data you want to recieve.  This is nice because GetCommandLine returns the command line as well as the full location of the program which is not needed. Also shown is the odd way in which we write to the clipboard.  Globaly allocing the memory but then not freeing the space up in the end as we usally would in a GlobalAlloc call.  This example has been tested on win9x and NT/2000

Example: Background Randomizer (4.5kb)
By: Betrayed
Description: This little example shows quite a few things such as seeding and using a random number(not a very good random number system but good enough for this porject), searching through the directory that the bianary is in for .bmp files and changing the registry to match the new random background as well as refreshing the system to show the new background..  Also shown is how to use a resource file to add version info to the bianary.  Has been tested in win9x a win2k version will be made as soon as I have access to a win2k machine.

Copie d'une des pages du site de betrayed: http://betrayed.virtualave.net/