Page 7 of 7 FirstFirst ... 4567
Results 241 to 260 of 260

Thread: [vb6] Project Scanner

  1. #241

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6] Project Scanner

    I managed to remove a lot and just show a bit and the functions that resulted in the missing variables.
    Thank you. I'll begin looking at it later this week, also to add in that other duplication check you suggested.

    I found the bug where the last variable in a line with 2+ variables is being ignored. So that was an easy fix. If interested, you can fix that now... but the same fix needs to be applied in two different areas:

    module: modMain, method: pvParseName_Variable
    module: clsValidation, method: pvParseDeclares
    change:
    Code:
    from...
            If n = p Then Exit Do
    to...
            If n = p And lMode = 0 Then Exit Do
    edited: the patch needed to be applied in 2 methods, not one. Above has been updated
    Last edited by LaVolpe; Sep 9th, 2020 at 12:46 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  2. #242
    Addicted Member
    Join Date
    Nov 2016
    Location
    GB
    Posts
    141

    Re: [vb6] Project Scanner

    Really useful! many thanks LaVolpe!

  3. #243
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: [vb6] Project Scanner

    Useful tool - thanks for making this available!

    I think I've found a bug... On the Standard Scan report window, the Save to File menu doesn't work. It appends a portion of the text from some other line of the report to the end of the current line. Strange behavior.

  4. #244

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6] Project Scanner

    Quote Originally Posted by AAraya View Post
    Useful tool - thanks for making this available!

    I think I've found a bug...
    Egads, that's embarrassing. You found some test code I forgot to remove.
    Open the frmValidationHelp form and in the mnuMain_Click event, remove the 6 test-lines starting with "Dim s$"
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #245
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: [vb6] Project Scanner

    Quote Originally Posted by LaVolpe View Post
    Egads, that's embarrassing. You found some test code I forgot to remove.
    Open the frmValidationHelp form and in the mnuMain_Click event, remove the 6 test-lines starting with "Dim s$"
    Happens to all of us - glad to help with the code clean-up!

  6. #246

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [vb6] Project Scanner

    Quote Originally Posted by AAraya View Post
    Happens to all of us - glad to help with the code clean-up!
    Hmmm, how to get the scanner to alert on test code
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #247
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: [vb6] Project Scanner

    Attachment 178750

    Checked. M2000 Environment (M2000 Language)..

  8. #248
    Addicted Member
    Join Date
    Nov 2016
    Location
    GB
    Posts
    141

    Re: [vb6] Project Scanner

    Sorry. Trying project scanner on a vb6 project of mine, just after loading the project the application stops with this error message. Why? How can i remedy?
    Attachment 179969
    Attachment 179968

  9. #249
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: [vb6] Project Scanner

    If you want to explain a huge BB 6 project works, you should use multi-threading, the speed can be increased by five to ten times.

  10. #250
    Member Dragokas's Avatar
    Join Date
    Aug 2015
    Location
    Ukraine
    Posts
    740

    Re: [vb6] Project Scanner

    Impressive work !
    Thanks a much for this great tool !!!
    Malware analyst, VirusNet developer, HiJackThis+ author || my CodeBank works

  11. #251
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,421

    Re: [vb6] Project Scanner

    Are there any ways or tricks to make LaVolpe's ProjectScanner 10x faster?

  12. #252
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,421

    Re: [vb6] Project Scanner

    Quote Originally Posted by xiaoyao View Post
    If you want to explain a huge BB 6 project works, you should use multi-threading, the speed can be increased by five to ten times.
    Have you done any of the tests, or are you just guessing?

  13. #253
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: [vb6] Project Scanner

    If you need to use the CPU for computing, parsing code, lexical analysis, multithreading can certainly improve the speed. Six-core CPUs are now the norm. Six people doing a job at the same time must be faster than one person.

  14. #254
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: [vb6] Project Scanner

    One of the things I used to do is to need a control or a module in the project. How to delete all other useless modules or codes? It's always done by hand. First copy the module to a file, and then run the missing function. Or the above structures are copied one by one, sometimes it takes a few minutes to an hour. If possible, specify a project file or a function to leave behind. The process of removing any superfluous files and code is required for the self-burst. For example, some people have developed a lot of controls that support Unicode, but I only need one text box control inside, so I have to manually delete them one by one, while keeping the other modules that are useful.

    以前我经常做的一件事情是:需要工程里面的一个控件或者一个模块.如何把其他没用的模块或者代码全部删除?一直是手工做的。先把模块复制到一个文件,然后运行缺少哪个函数.或者缺少上面结构体一个一个复制过来,有 的时候需要花费几分钟到一个小时.。如果可以,指定某个工程文件,或者某个函数留下来。自暴流相关需要的啊过程,删除任何多余的文件和代码,

    比如有的人开发了一大堆的支持unicode的控件,但是我只需要里面的一个文本框控件,所以我只能手工一个个删除,同时要保留有用的那些其他模块。

  15. #255
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: [vb6] Project Scanner

    Your project is a great invention. If the project file can be perfectly parsed into a tree structure or a JSON data format, if the declaration of each function or API can be split into words and become JSON elements.
    I have a friend who is working on turning his project into VC + +. Forms are now supported, as are many controls. The main thing is that it can be compiled into a 64-bit program.

    Maybe this is the principle of twinbasic.

    b4a is a program that uses VB syntax to develop Android APP. It has been perfectly realized for more than 10 years. Its principle is to turn VB code into Java code and compile it into app.

  16. #256
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: [vb6] Project Scanner

    Quote Originally Posted by dreammanor View Post
    Edit:

    My VBP is stored in the U-Disk (USB flash disk). I copied the VBP from the U-Disk to the hard disk and re-tested it. The test results did not change much:

    Old PrjScan:
    Time1: 423.61 seconds; Time2(DataClone): 5.98 seconds (frmMain.tvItems(0).Nodes.Count = 16)

    New PrjScan:
    Time1: 415.86 seconds; Time2(DataClone): 0.59 seconds (frmMain.tvItems(0).Nodes.Count = 14)

    In addition, there are 507 files in Elroy's project and 567 in my project. IMO, the time of scanning depends not only on the speed of the computer and the number of project files, but also on the number of lines of source code. Krool's ComCtlsDemo.vbp has 107 files,which is one-fifth of my project, but it takes only one-twentieth of the time of my project.
    I can offer some advice. Scan the project and copy all the files to a memory hard disk.
    You can also save all the scanning results of the entire project and the module function API to many tables in a database.

    If most people in the airport program, it can be based on tabular input. For example, to call a windows API, it has four parameters, and we only need to enter these four values in the market of the table.Its structure is parameter name and parameter type. Chinese name. A detailed introduction. Optional Value

    This is what I used to deal with a lot of web POS requests to submit data.The website needs to deal with re-login, ah, to extract, to deal with the post of more than a dozen pages.Each POS machine may contain 10 to 50 items of data.So I always make it into a table and input it manually.Which values are extracted from the previous page, which values are fixed, and which values are extracted from that variable?

    If a project has dozens or hundreds of files, multithreading can certainly speed things up.

  17. #257
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: [vb6] Project Scanner

    It would be better if some functions could be made into modules for others to call.Such as parsing project files. Parse module files, parse functions.

    For example, add runtime detection to every function or procedure in the program.
    It takes tens to hundreds of seconds for your tool to detect some large-scale projects. You can detect which function most of the time is spent in, and then you can optimize there. Or multithread that process. Let the CPU run at full capacity. If the CPU is 6 cores and 12 threads. Let the most CPU-heavy process be handled by the other 11 threads.

    If there are many duplicate module files on the computer, some of them may have some improvements. If you can analyze how many functions there are, two modules, which module has more functions? Is the same function code different? If you do code formatting for modules and functions. It should be possible to compare more accurately.

    I usually like to put some public modules in a fixed directory, and then different projects are referenced from it. This will cause the module paths to be wrong if the project is moved. It would be better to add a function of moving the project, or export all the files of the project to a directory (you can specify which modules and put them in subfolders). Add the function of generating installation files, package the DLLs OCX used in the project together, use the bat or VBS method, and register those DLLs with the administrator permission method

  18. #258
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: [vb6] Project Scanner

    How do you figure out how much time each function consumes, and how do you add a few lines of code in front of each procedure? How do I add some more code at the end of the function? If you exit in the middle of the process, how do you add the code?

    Code:
    test bas
    function add()
    startLogTime "test.add"
    *** code
    *** code
    if a then exit function
    
    if a then endlogTime "test.add":exit function
    
    *** code
    
    endlogTime "test.add"
    end gunction
    or only use logtime


    Code:
    test bas
    function add()
    LogTime "test.add"
    *** code
    *** code
    if a then exit function
    
    *** code
    end gunction
    
    test2.bas
    function method2()
    LogTime "test2.add"2
    *** code
    *** code
    if a then exit function
    *** code
    end gunction
    sub logtime(functionName)

    end function
    Last edited by xiaoyao; Mar 22nd, 2023 at 07:05 PM.

  19. #259
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,421

    Re: [vb6] Project Scanner

    Quote Originally Posted by xiaoyao View Post
    One of the things I used to do is to need a control or a module in the project. How to delete all other useless modules or codes? It's always done by hand. First copy the module to a file, and then run the missing function. Or the above structures are copied one by one, sometimes it takes a few minutes to an hour. If possible, specify a project file or a function to leave behind. The process of removing any superfluous files and code is required for the self-burst. For example, some people have developed a lot of controls that support Unicode, but I only need one text box control inside, so I have to manually delete them one by one, while keeping the other modules that are useful.

    以前我经常做的一件事情是:需要工程里面的一个控件或者一个模块.如何把其他没用的模块或者代码全部删除?一直是手工做的。先把模块复制到一个文件,然后运行缺少哪个函数.或者缺少上面结构体一个一个复制过来,有 的时候需要花费几分钟到一个小时.。如果可以,指定某个工程文件,或者某个函数留下来。自暴流相关需要的啊过程,删除任何多余的文件和代码,

    比如有的人开发了一大堆的支持unicode的控件,但是我只需要里面的一个文本框控件,所以我只能手工一个个删除,同时要保留有用的那些其他模块。
    Good advice

  20. #260
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,421

    Re: [vb6] Project Scanner

    Quote Originally Posted by xiaoyao View Post
    Your project is a great invention. If the project file can be perfectly parsed into a tree structure or a JSON data format, if the declaration of each function or API can be split into words and become JSON elements.
    I have a friend who is working on turning his project into VC + +. Forms are now supported, as are many controls. The main thing is that it can be compiled into a 64-bit program.

    Maybe this is the principle of twinbasic.

    b4a is a program that uses VB syntax to develop Android APP. It has been perfectly realized for more than 10 years. Its principle is to turn VB code into Java code and compile it into app.
    LaVolpe, the author of ProjectScanner, is no longer coming to this forum. IMO, what you want seems to need to be done with a specialized lexical analyzer.

Page 7 of 7 FirstFirst ... 4567

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width