All source code in Visual Basic Ask a Visual Basic Pro Discussion Forum Categories All jobs in Visual Basic
API,CLASS,ASM,EnumWindows,requires,EnumProcBy
   Code/Articles � |  Newest/Best � |  Community � |  Jobs � |  Other � |  Goto � | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 10,269,388. lines
 Jobs: 279. postings

 How to support the site

 
Sponsored by:
Quick Search for:  in language:    
You are in:
 
Login





Latest postings for Visual Basic.
Click here to see a screenshot of this code!Bezier ART v.0
By reexre on 3/11

(Screen Shot)

Lista Mp3
By Massimiliano Ganzaborn on 3/17


Click here to see a screenshot of this code!Swarm of Gnats
By Paul Bahlawan on 7/15

(Screen Shot)

Click here to see a screenshot of this code!Air Line Travelling History System
By Muhammad Faraz Shaikh on 3/11

(Screen Shot)

Click here to see a screenshot of this code!Create runtime popup menu
By Red Corn on 3/11

(Screen Shot)

Click here to see a screenshot of this code!Time Engine 7.7.661
By Kaveh Abdollahi on 3/10

(Screen Shot)

Click here to see a screenshot of this code!DM Timepicker
By Frank Donckers on 3/10

(Screen Shot)

Click here to put this ticker on your site!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!



 
 
   

EliteXp® ASM EnumWindows (In a Class, Not a Module)

Print
Email
 
winzip icon
Submitted on: 11/19/2009 8:52:39 AM
By: EliteXP Software Solutions  
Level: Advanced
User Rating: Unrated
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 1945 times.
 
author picture
(About the author)
 
     EnumWindows API requires an EnumProc(Byval hWnd as long,Byval lParam as long) as long and We pass it by Addressof EnumProc. This EnumProc is in a Module and is not flexible for firing events and Stopping Enumeration. Now, EliteXp Presents you the Enumeration of Windows in a Class(.CLS) file such that the CLASS can Fire events as well as Stop the enumeration for you. The whole capability has been possible due to ASM (Assembly Binary Code). Here's the idea. 1> Allocate the ASM Binary Opcodes in Memory. 2> We call EnumWindows API as EnumWindows( <Binary Opcode Mem. Address>, <lParam>) Hence, Each Enumeration of Windows By API first calls, the BinaryOpcode. The duty of Binary Opcode is to call the 1st Public Procedure of the Object Owner. ie PATCH_01. So, we now don't need Enumeration in a Module. A class file can enumerate windows with callback Procedure from ASM.
 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

'**************************************
'Windows API/Global Declarations for :El
'     iteXp® ASM EnumWindows (In a Class,
'     Not a Module)
'**************************************
---------------------------------------------------------
'if error occurs when loading project, t
'     hen
'1> at PSCODE.COM, Search For EliteXp
'     ,it will list out all my postings
'2> Download "PE File Information Vie
'     wer (+Winapi32.tlb)" Posting
'3> It contains Winapi32.tlb which co
'     ntains all API needed by my project + lo
'     ts of WINAPI. 
'	(I am lazy to type "Declare Function .
'     ..... lib .....". 
'4> All you need to do is to Referenc
'     e this ".TLB" file from your Project Men
'     u.
'5>	Get rid of all the API Declaratio
'     n laziness. More than 300 API Declaratio
'     ns,Constants and Structures
'	Note: This TLB file can be referenced 
'     in all of your projects
'	After Referencing,
'		You just type the API Name, eg: GetTi
'     ckCount. You will see its already declar
'     ed
---------------------------------------------------------			
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 22 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
11/20/2009 6:37:45 AMThe_Jokez

Sorry, but got some problems :
- "CallWindowProc" not found.
- "wshom.ocx" is referenced in your project but is not an ActiveX object
- No "Option Explicit" ahead, to prevent mistakes
- No code indentation (hard to read)
(If this comment was disrespectful, please report it.)

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Games | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright� 1997-2010 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.