Important alert: (current site time 7/16/2013 2:44:16 AM EDT)
 

winzip icon

DeepLook 4.12 (UPDATED 26th Sep 2006)

Email
Submitted on: 9/25/2006 10:58:40 PM
By: Dean Camera  
Level: Intermediate
User Rating: By 60 Users
Compatibility: VB 6.0
Views: 36964
author picture
(About the author)
 
     Yes, it's back; yet another version of my award-winning VB source code scanning program. For those who don't know, DeepLook can scan your VB projects and return a detailed treeview showing statistics on almost every aspect. Other functions include the ability to copy all the files required by yor project into a single directory, create HTML/TXT reports and report unused variables. Incorporating many new bug-fixes and features, this release includes a feature that many users have requested even since its conception: HTML reports. After beginning the HTML template code, I got frustrated with the clumsyness of the method I was using so decided to use XML reports instead with a HTML formatting template. The result is that a XML report is saved as two files, the actual XML report data and a XML stylesheet (which, incidentally, is a Microsoft template that I altered to suit DeepLook). This method means smaller and faster XML report saving code. In case you already have a DeepLook text report saved on your computer, you can now "scan" the text file to produce a XML report directly. Other additions include making the code MUCH more robust as well as fixing what I think I can safely say all the remaining bugs in the Unused Variable Scanner. The UVS also takes into account (ignores) case-preserving variables that are encapsulated in the "#if false" and "#end if" headers. Other new additions/corrections are listed below. Screenshot note: the daughter windows are NOT transparent in the actual program, that just saves space. No votes please, this is just an update (and i've already won once!) but I WOULD appreciate some constructive comments. Zip ~350kb. +++ MAJOR ADDITIONS IN THIS VERSION: Array handling fixed for a major speed increase, Quick access Addin This contains a few bugfixes I implemented since the major Nov update. Fixed bugs described by Lorin, Morgan and Robert in the comments, as well as a bug I found in the Recent Scanned Items list. ### UPDATE: Fixed an issue which may cause an infinite loop or incorrect results, thanks to Steve Redmyer###

 

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 :DeepLook 4.12 (UPDATED 26th Sep 2006)
'**************************************
Works best when compiled - 940kb, or ~220kb when compressed with the UPX (upx.sourceforge.net) EXE compressor or FSG EXE packer.
Currently scans at about 1500 lines per second on a 700MHz computer.
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 5 submission(s) by this author

 


Report Bad Submission
Use this form to tell 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 Intermediate 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

6/2/2005 8:43:16 AMLight Templer

Imo growing on supporting a larger project is a very good way to improve programming skills. The history above shows that you are still taking your project very serious AFTER winning COTM.
My respect and my 5 ***** for.
Maybe you will never say 'last version' again ... ;-))) Great projects are never done forever.
Regards - LiTe
(If this comment was disrespectful, please report it.)

 
6/2/2005 9:04:46 AMRobert Rayment

All looks good to me. It correctly identified a couple of unused variables in my latest prog, where I had moved a block of code from one Sub to another and forgotten to erase unecessary variables. I will vote if only to get it up 4 so there's a chance of it being seen before it vanishes down the pages.



(If this comment was disrespectful, please report it.)

 
6/2/2005 10:45:01 AMMatthew R. Usner

I can see it now - "MoMoYa Ilia HD.I.AM. Look deep codes!" Wrote by MoMoYa Corp"

Great job as usual Dean.
(If this comment was disrespectful, please report it.)

 
6/2/2005 11:00:22 AMKwickDoc

It is interesting to see the fonts in the dependancy list ( copy dependancy) But I could not locate the declaration of the dependancy. Since there were several fonts in the list i wanted to use a single font. SO the location where it is refrenced will be helpful
In my opinion some previus versions were more helpful than the current version. The simplicity is gone along with the usefullness
(If this comment was disrespectful, please report it.)

 
6/2/2005 12:55:02 PMTom Pydeski

Very professionally done.
5 planets from me...
(If this comment was disrespectful, please report it.)

 
6/3/2005 5:23:45 AMDean Camera

KwikDoc, could you elaborate please? The fonts listed are the fonts that are being used by controls in the project (unfortunatly not the ones referenced in code because that would be neigh on impossible). What exactly don't you like about the new version?
(If this comment was disrespectful, please report it.)

 
6/3/2005 6:32:24 AMShukri Zahari

the program is nicely done, i'm giving you 5 star no matter what you said!!!!
(If this comment was disrespectful, please report it.)

 
6/3/2005 12:17:57 PMTerriTop

Thanks for sharing this, and making improvments. Having followed the development of this work, it is great to see you take advantage of technologies like XLM. Whats next on the horizon?

TerriTop
(If this comment was disrespectful, please report it.)

 
6/3/2005 6:08:49 PMHeriberto Mantilla Santamaría

Hi Dean, you should create a page for this spectacular program in which you can upgrade it without problem.

My reverences, and clear my five cents.
(If this comment was disrespectful, please report it.)

 
6/3/2005 6:41:19 PMMatthew R. Usner

Ya know Heriberto that's a good idea. A site just for this, because it deserves it. (Don't tell Ilia HD MoMoYa)


(If this comment was disrespectful, please report it.)

 
6/3/2005 10:32:54 PMHeriberto Mantilla Santamaría

If Matthew R. Usner, that would be genial, I wait Dean has in mind this alternative.
(If this comment was disrespectful, please report it.)

 
6/4/2005 12:44:56 AMDean Camera

That's probably a good idea. I'll try to rig up a site soon. Thanks for the kind words everyone!

- Dean
(If this comment was disrespectful, please report it.)

 
6/5/2005 7:21:06 PMMatthew R. Usner

I just tried out the latest version; it seems no harder to operate than before...not sure what KwicDoc was referring to. Anyway, 5 globes, don't quit you day job because you're dam good at it.
(If this comment was disrespectful, please report it.)

 
6/7/2005 5:05:59 AMD. HANIB

Very good work Dean,

but i have a problem..
when i'am clicking on the Exit Buton, the form hide but the program does'nt stop.
I have force the end on the IDE buton..

W98 - VB6 SP6

Driss
(If this comment was disrespectful, please report it.)

 
6/11/2005 9:13:08 PMTanner "DemonSpectre" Helland

Quite possibly the most *useful* project I've ever downloaded from PSC. 5 balls, Dean - great work!
(If this comment was disrespectful, please report it.)

 
6/13/2005 2:03:05 PMJim Jose

Hi Dean,

Although the project core consist of many excellent codes by others, you realy won to get together those and build a great/useful project.

May you won Again!! and one more, Sice Smile :-)))

Jim Jose

(If this comment was disrespectful, please report it.)

 
6/14/2005 1:57:27 AMDean Camera

Thanks for the comment. Remember; the GUI uses components made by others (see credits on the About page) but the scanning core and accociated forms and modules were written completly by me - with a few suggestions from others of course. Any file in the project that has a "DeepLook" comment headder was written by me (others should have the original headers intact). - Dean
(If this comment was disrespectful, please report it.)

 
6/15/2005 7:28:12 AMRuturaj

I'm following this program from its very first appearance on PSC and it has gone a way ahead since then ! It's really nice to see your well directed efforts ... Keep up the good work freind !

What I can do max is voting ***** for you !
(If this comment was disrespectful, please report it.)

 
6/15/2005 7:48:16 AMDean Camera

Thanks Rutaraj, I remember you from my previous submissions. Seems everyone thinks the update's great, anyone tried the XML reports? I've been wondering, you all may like the idea, but does anyone (besides me) every actually USE DeepLook reguarly?
(If this comment was disrespectful, please report it.)

 
7/6/2005 5:57:43 PMMatthew R. Usner

Congratulations again!
(If this comment was disrespectful, please report it.)

 
7/11/2005 4:29:10 AMAndrew Murphy

Very Cool :)

Let's see an add in to VB6 to run it with the current project, with your forms inside....
(If this comment was disrespectful, please report it.)

 
7/13/2005 8:24:43 AMAJ Hill

Nice little app - and I do use it quite a bit, as well as using the XML output, but it would be much more useful if you included the file routines, events, variables, etc - this would mean you could (in theory) develop a set of standard XSL files to display particular aspects of the project (and deliver them through a web-based technology, making it easier to colab on a project).
(If this comment was disrespectful, please report it.)

 
7/13/2005 8:47:21 AMDean Camera

Hmm, interesting idea. Wouldn't be too hard to implement - but I am proverbially SWAMPED with projects at the moment. I'll keep that idea in mind though.

- Dean
(If this comment was disrespectful, please report it.)

 
7/14/2005 7:56:48 AMSK Jameel Ahmed

great job Dean , amazing, i have searching a same programe since last few weeks , find your , great one too :), will comment on it later , i just downloade and not tried in detail ... BTW , still ,5 globs from me :)
(If this comment was disrespectful, please report it.)

 
7/16/2005 1:21:35 PMWilliam

Congratulations, this one of the most professional and useful applications I’ve seen. Thanks for sharing your work. Even if you don’t need the vote, as appreciation I vote 5 stars
(If this comment was disrespectful, please report it.)

 
7/31/2005 9:46:50 AMJase

Wa, so complex i cannot understand...that is y although i download the code but have error when running i also cannot fix myself...sad
can u help me?
(If this comment was disrespectful, please report it.)

 
7/31/2005 5:36:20 PMDean Camera

Jase, what error are you getting? Does DeepLook crash when you scan a program, or when you click the start button?

- Dean
(If this comment was disrespectful, please report it.)

 
11/19/2005 9:36:08 AMRichard Mewett

Nice update - significant performance boost. [where did you get the idea from ;)]
(If this comment was disrespectful, please report it.)

 
11/19/2005 7:00:07 PMDean Camera

Yes, thanks to Richard and IRBME for their excellent suggestions.

This update does carry a fantastic performance increase, mainly due to the abolishment of collections. Also, it now features a VB6 addin for easy scanning!

- Dean
(If this comment was disrespectful, please report it.)

 
1/26/2006 6:09:50 PMmichael doering

Hey Dean,
thanks for this update.
(If this comment was disrespectful, please report it.)

 
1/26/2006 11:19:48 PMspermodot

I get crash too when i run your project under win98 (on XP everything works fine ofcourse) and i get "Method Hwnd of 'IRichText' failed".
(If this comment was disrespectful, please report it.)

 
1/27/2006 1:46:48 AMDean Camera

98 can't create the Ritch Text Box handle? That seems a little odd - 98 has full support for Rich Text. I assume you're talking about the main project and not the addin? Could you please post the offending line so I can take a look.

Thanks,
- Dean
(If this comment was disrespectful, please report it.)

 
1/28/2006 8:03:24 PMMDSW

Great project
But seems to leave a VBG file open and the program in the task list when running it on a group file.
5 * Balls, Keep up the great work on this project.
Thanks Ken
(If this comment was disrespectful, please report it.)

 
1/29/2006 7:22:52 AMWavicle! Group

This is invariably one of the best pieces of code I have ever witnessed. I feel adventurous about applying similar ideas for analyzing projects composed in other languages too. Keep it up!
(If this comment was disrespectful, please report it.)

 
1/29/2006 10:57:44 AMKaymatrix

Goood work dean!
i give you 5
N more thin'
PLEASE! UPDATE U'R IMAGE!

(If this comment was disrespectful, please report it.)

 
1/30/2006 1:16:57 AMspermodot

"Could you please post the offending line so I can take a look."
Dean i get the error immediatly after when i press the analyse button in main project, FrmReport, LockRefresh sub,'SendMessage rtbReportText.hwnd, WM_SETREDRAW, (Not YesNo), 0'
(If this comment was disrespectful, please report it.)

 
1/30/2006 3:56:16 AMDean Camera

Duly noted. I won't be able to debug until I reinstall VB6 (lent the CD to a friend). The group bug should be easy to fix, and i'll see if I can determine the cause of spermodot's problem. Has anyone else run into a similar problem?

I suspect, spermodot, that your 98 system has the Ritch Text Box OCX wrapper registered incorrectly.

- Dean
(If this comment was disrespectful, please report it.)

 
1/30/2006 4:23:44 PMLorin

Interesting code:
1) problem - the following valid code will report a unused variable
DIM lFnbr as long

Open MyFile For Binary as #lFnbr
Close #lFnbr

2) Feature to add
a) click the unused item and have the source open at that location
b) comment out unused in the source so it is easy to Find.
c) have an option to either

3) Feature to add
sorted list of all variable e.g.
variable-name form/module/class line-number
This would be very helpful for debugging when you "accidentally" DIMed a variable within a Sub when it really should have been the Global.

(If this comment was disrespectful, please report it.)

 
1/31/2006 7:39:59 AMspermodot

"I suspect, spermodot, that your 98 system has the Ritch Text Box OCX wrapper registered incorrectly."
Hmmm, then why the previous version of your project runs smoothly without problems?It has the same routine in it.
(If this comment was disrespectful, please report it.)

 
2/1/2006 6:01:59 AMDean Camera

Spermodot: Yes, now i'm wondering too. I do not believe I have changed the dependancies - can you open up the report form without problems?

Lorin: Thanks. The problem looks easy to fix once I get VB6 back. The other features would depend on how many people are still interested in this project, since I am not doing as much VB6 programming as I used to (moved to C on microcontrollers, and am migrating to VB.NET).

- Dean
(If this comment was disrespectful, please report it.)

 
2/4/2006 12:03:34 AMspermodot

"can you open up the report form without problems?"
VB crashes when i do it.
(If this comment was disrespectful, please report it.)

 
2/4/2006 12:20:55 AMDean Camera

Hmmm, sounds like either your Rich Text Box has somehow become unregistered, or you're using an old version of the OCX.

Can you try START->RUN->"regsvr32 c:\windows\system32\richtx32.ocx" (without the quotes) and then try the project? Also, please check that your VB6 components list contains "Rich Textbox Control 6.0".

- Dean
(If this comment was disrespectful, please report it.)

 
2/5/2006 3:09:02 AMspermodot

I did and the problem remains. :/
Also, the previous version of your project which has the same control reference runs in perfect way.
(If this comment was disrespectful, please report it.)

 
2/9/2006 5:18:07 PMMorgan Haueisen

This version has the same problem as the previous versions; your program line counts are wrong. Create a simple 1 Form project with three lines of code and you will see what I am talking about.
(If this comment was disrespectful, please report it.)

 
2/10/2006 10:00:17 PMDean Camera

Morgan, fixed the problem. Turns out the first line of each VB file was being skipped; this mean that if the first line of a file wasn't blank (or a comment) then several problems surfaced. Code updated. Spermadot, i'm at a loss. All the computers i've tested this on work perfectly and thus I can't find a solution to your problem. Still think it's very odd considering there are no differences in that section I believe to the previous version. Hmmm.

- Dean
(If this comment was disrespectful, please report it.)

 
2/11/2006 1:36:00 AMRobert Rayment

Dean: In a Sub I put 3 local variables ie Dim x As Single, y As Single, z As Single --- and only used x. So y and z are unused. DeepLook only found that z was unused, it missed y.
(If this comment was disrespectful, please report it.)

 
2/11/2006 2:36:14 AMDean Camera

Robert, fixed. I wasn't updating a counter inside the code designed to split the lines into individual declares.

- Dean
(If this comment was disrespectful, please report it.)

 
2/11/2006 3:15:22 AMRobert Rayment

Dean: That has fixed that simple example but now it's finding dozens of false unused variables. For example unused variables in Subs where there is no mention of such a local variable or in it's parameters. Maybe that counter you changed has other effects?
(If this comment was disrespectful, please report it.)

 
2/11/2006 3:18:41 AMRobert Rayment

Dean: just tried running DeepLook on DeepLook - again gets loads of false unused variables!?
(If this comment was disrespectful, please report it.)

 
2/11/2006 3:57:01 AMDean Camera

Whoops! Guess I should have tested the patch more rather than hastily release it. Rest assured i've halted my current C project and am working on it furiously. So much for leaving this one to stagnate :).

- Dean
(If this comment was disrespectful, please report it.)

 
2/11/2006 4:44:11 AMUlli

DeepLook reports:
Lines (Inc Blanks) 109 [98.2%]
Lines (No Blanks) 113 [102.7%] (!!)
Lines (Comment) 2 [1.8%]

and the code in fact has 116 lines
(If this comment was disrespectful, please report it.)

 
2/11/2006 5:28:48 AMDean Camera

Could you email me the project, please Ulli? *Sigh*. Also, as for the total lines, I believe DL works correctly. DL counts lines in an odd way by design; blanks bewteen SPFs are skipped, as are blanks before the first sub (plus a few other rules). If anyone is sufficiently interested, I could write out the rules which DL follows for line counts. Cheers! - Dean
(If this comment was disrespectful, please report it.)

 
2/11/2006 8:05:32 AMDean Camera

I've fixed Morgan's bug, but currently cannot upload the new code due to a PSC error. I've emailed the appropriate people about it. If anyone wants it before then, please email me. - Dean
(If this comment was disrespectful, please report it.)

 
2/11/2006 5:54:00 PMDean Camera

Fixed and reuploaded.

- Dean
(If this comment was disrespectful, please report it.)

 
7/8/2006 9:17:42 PMaz1d

Been using this project for months, along-side MZTools.

There are a couple of this I'd like to request though:

1) I know it is by design, but the default font "MS Sans Serif" doesn't show up in "Used Fonts". As you are /were migrating to VB.NET - you'll understand that this font is evil, and perhaps it could be coded in a way so that if no alternative font is used then report "MS Sans Serif"?

2) How difficult would it be to have the "Unused Variables" feature, give the ability to double click the variable, and have VB's IDE scroll to the offending variable?

Anyway, great program. 5 Vote
-az1d
(If this comment was disrespectful, please report it.)

 
8/8/2006 5:53:39 AMShane Croft

I downloaded this from a prev. version 4.9, and when I ran it my project jumped from 19,000 lines of code to 29,000 lines of code, and I didnt know why, when I checked it was saying my DataEnvironment1.Dsr had 10,000 lines of code in it!! So this is a bug, but at least I know to subtract that from the totals from now on untill hopefully you can get that fixed. Feel free to contact me.
(If this comment was disrespectful, please report it.)

 
8/8/2006 7:12:02 AMDean Camera

az1d,

A thousand apologies; looks like the automated feedback alert email was eaten by my spam filter. Please excuse my late reply.

1) Sounds like an interesting idea, but would require a lot of work - I'd have to create tests to check each component and determine the start, end, type and whether a font was selected. Not all controls can have a font property, and if the default font is used then no font property is specified in the VB files. Annoying.

2) Also interesting, but I'd imagine would require some serious voodoo to get working. I'd have to learn how to hook the IDE, open code panes remotely, determine cursor positions, etc. I lack the abilities but if someone smarter than I wishes to collaborate...
(If this comment was disrespectful, please report it.)

 
8/8/2006 7:13:06 AMDean Camera

Shane, I've answered your feedback offline via email. Once I've fixed the problem I'll update the zip here.

- Dean
(If this comment was disrespectful, please report it.)

 
9/26/2006 8:06:26 AMKeerthi

Really Great .. I am Downloading Many Codes From this Site, But Really First time Felt to Comment ..
Good Work and Thanks ..
- Keerthi
(If this comment was disrespectful, please report it.)

 
9/26/2006 5:26:53 PMJames Miller

I haven't been coding in a while, but you definitely deserve a vote! ¤¤¤¤¤ from me.
James
(If this comment was disrespectful, please report it.)

 
9/26/2006 8:35:43 PMMarino

Excellent Deam! Very good! You are the best!
(If this comment was disrespectful, please report it.)

 
10/21/2006 10:23:55 AMWalter

Thanks for the update.
I am still using your previous version.
It is very usefull to me.
5 start from me (well deserved)

(If this comment was disrespectful, please report it.)

 
4/5/2007 7:40:29 AMJoaquin Marcher

come baaaack and develop a new version, you allways have the best ideas!
(If this comment was disrespectful, please report it.)

 
4/11/2007 6:21:04 AMBen Daniels

This is something that I would not expect to see here with the code in all its glory! I'd say lock it up and go freeware. Or not, cause we all love a good piece of code to gander at!! Love your work and keep it up, at 13 you've got a lot ahead of you! Once again, cheers mate!
(If this comment was disrespectful, please report it.)

 
4/11/2007 7:37:43 AMDean Camera

Cheers Joaquin! I'm not dead, but University's sapping most of my time - as is my microcontroller (electronics) hobby.

Ben: Little older than 13 - I'm 18 as of a few months ago. Must have been around 14 when I wrote my first versions (V1-3), so I guess that does count. I'd be able to re-write it to be significantly cleaner and faster now, but I don't have the time. Thanks for the kudos!

- Dean
(If this comment was disrespectful, please report it.)

 
3/31/2011 2:47:33 AMDave Carter

Thanks Dean. Wish I'd seen your work before I got carried away with my code browser. I hope all these years later that everything is fine and good with you. All the best, Dave :)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.