Results 1 to 16 of 16

Thread: VB6 - Viewer

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    VB6 - Viewer

    I used dilettante's Gossamer Web Server control to make an image viewer. The viewer is actually your browser, so in theory it will deliver anything that your browser will support; pictures, HTML, movies etc.

    It is designed to run as a service using the NT Service Control, but will also run as a Desktop application. As provided, it runs as a Desktop application. To create the Service program, change the IsService flag to true and compile. To add it as a service, run the service program from the command prompt with a "/I" argument. If successful, a message "Viewer Service installed successfully." will display. To Uninstall it, use the "/U" argument. The Service Manager (services.msc) can then be used to start or stop the service. If you want to allow access from the Local Area Network (LAN), or the Wide Area Network (WAN), you will have to adjust your Firewall.

    The Service logs service related functions to a date named file in the \Windows\System32\Logfiles\Misc directory. You should create this directory to utilize the Service function. Unlike the Desktop version, which logs individual access to the text box, the Service as provided does not log access.

    As provided, the program uses a default Web page called "Default.htm" in the same directory as the executable. To access it, direct your browser to "localhost:8080". That web page will list 3 sub directories (HTML PAGES, PNG PICTURES, JPEG PICTURES). Simply click on one of them to access a listing of the available items. Clicking on one of them will display the particular item. To view another one, simply use the "Back" button on your browser.

    The viewable items are located in 3 sub directories (\pages, \pngs, & \jpgs). The web page used to access these files is created automatically when it is selected from the default page. You do not have to manually add files to the HTML page. Simply copy your favorite images/pages to the appropriate directory. It is suggested that you change the name of the file to provide some meaning as to it's content, rather than generic names such as "Image(123).png". Web pages are not exactly my forte, so if there is a better way of doing this, I am all ears. I also anticipate that if wide access to these files is to be provided, some sort of limitation on the creation of the HTML pages will have to be provided for. Other than that potential problem, the speed of response on a local network seems very good.

    I wanted to store the parameters in the registry, but the socket software is initialized in the User Control, which occurs before the form itself is run. I suppose the registry could be accessed from the User Control, but that will have to wait for a later version.

    J.A. Coutts

    Edit: The images would not upload. VbForums now says that I have exceeded my limit?
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by couttsj; Sep 18th, 2020 at 10:13 AM.

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

    Re: VB6 - Viewer

    Problem: I haven't NTSVC.ocx
    Windows 10

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: VB6 - Viewer

    Quote Originally Posted by georgekar View Post
    Problem: I haven't NTSVC.ocx
    Windows 10
    Available here:
    http://www.yellowhead.com/documents/ntsvc.zip

    SHA256 Hash
    8B 09 46 FD 6F D0 3F F0 8C 2F 98 94 58 63 8F 9B
    5B 53 9C 5F 32 39 75 5E 83 9D 88 C1 B5 2E 46 71

    J.A. Coutts

  4. #4

  5. #5
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,721

    Re: VB6 - Viewer

    u should try to make the program without the need of any dependencies. otherwise its quite useless.
    a picture viewer can be done very easily already so it need to be something extra to be worth it.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: VB6 - Viewer

    This is not just an image/picture viewer. It is server based, so it can be accessed from multiple locations via LAN/WAN. To quote the original description, "The viewer is actually your browser, so in theory it will deliver anything that your browser will support; pictures, HTML, movies etc.". I have only included support for PNG. JPG, and HTML files, but it can be expanded to suit the need. In reality, it is just a multiuser delivery system.

    J.A. Coutts

  7. #7
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    673

    Re: VB6 - Viewer

    Desktop work well! but connot registered NTSVC.ocx in my pc

  8. #8
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,721

    Re: VB6 - Viewer

    so the question is, what is NTSVC.ocx and can it be avoided by adding the needed coding directly into your module/class? I believe that will make this "service" worth it.

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: VB6 - Viewer

    Quote Originally Posted by baka View Post
    so the question is, what is NTSVC.ocx and can it be avoided by adding the needed coding directly into your module/class? I believe that will make this "service" worth it.
    wqweto developed an alternative based on one by Sergey Merzlikin:
    https://www.vbforums.com/showthread....Service-module
    I simply found NTSVC.ocx easier and quicker to implement.

    J.A. Coutts

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: VB6 - Viewer

    Quote Originally Posted by xxdoc123 View Post
    Desktop work well! but connot registered NTSVC.ocx in my pc
    All I have ever done is add it to the Components window using the Browse feature. It then gets registered automatically. The Zip file also contains a help file, which may offer more suggestions.

    J.A. Coutts

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB6 - Viewer

    The main thing I have used Gossamer for was a UI to get to an NT Service, which can't interact with Desktops any more (post-XP).

    Those are usually fairly simple UIs, providing a way to tweak options and settings in the running Service. As a bonus it becomes easy to do the tweaking from a box elsewhere on the LAN without RDPing into the server box.

    Otherwise I'm not sure when Gossamer makes a lot of sense.

  12. #12
    Hyperactive Member
    Join Date
    Mar 2018
    Posts
    460

    Re: VB6 - Viewer

    Quote Originally Posted by dilettante View Post
    Otherwise I'm not sure when Gossamer makes a lot of sense.
    I use it to pass data back and forth via iphone\android apps. It works great because we can include it as part of our normal program updates without making the user install additional files or config a 3rd party webserver. And since it is part of our project, we have access to all of our functions and don't need to rewrite them in another language or break out into dlls. The only thing missing is ssl

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: VB6 - Viewer

    Quote Originally Posted by DllHell View Post
    The only thing missing is ssl.
    Already working on it. But it will only support TLS 1.3 or better. I strongly suspect that all future protocols will only support Forward Secrecy (sometimes called Perfect Forward Secrecy or PFS). That is to say they will use some sort of ECC (Elliptical Curve Cryptography).

    J.A. Coutts

  14. #14
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB6 - Viewer

    If you just need to support static pages and content you might look into this:

    http://www.analogx.com/contents/down...w/Freeware.htm

  15. #15
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    EspaƱa
    Posts
    506

    Re: VB6 - Viewer

    very good project.
    I've been using Gossamer for a few months now and it's doing quite well for me.

    It would be good to implement login or password to access the files.
    and put options like ftp to copy, cut, rename, download, upload files etc.
    and some formats such as avi video.
    Greetings

  16. #16
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: VB6 - Viewer

    Quote Originally Posted by yokesee View Post
    very good project.
    I've been using Gossamer for a few months now and it's doing quite well for me.

    It would be good to implement login or password to access the files.
    and put options like ftp to copy, cut, rename, download, upload files etc.
    and some formats such as avi video.
    Greetings
    AVI format is a non-issue and basic auth is very simple to implement but ftp support would be like to bring a button and to ask to sew a new coat on it :-))

    cheers,
    </wqw>

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