Results 1 to 6 of 6

Thread: How can i check if my local network connection is fine ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Location
    Brazil
    Posts
    28

    Unhappy How can i check if my local network connection is fine ?

    Hi guys!

    I've a problem with my program...

    i need to connect with a network printer, but... before i need to check if i'm connect in a local network and if i can use this connection.

    It's possible?

    i need to find only this answer to finish my program.

    One more thing, i'm working with a class to care all about printes.

    i'm waiting for any help

    thanks

  2. #2

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Location
    Brazil
    Posts
    28

    Re: How can i check if my local network connection is fine ?

    Thank you a lot!

    More 1 question...

    it's possible to print something directly to network printer, only using the printer.print command?

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How can i check if my local network connection is fine ?

    Quote Originally Posted by Rumblefish View Post
    More 1 question...

    it's possible to print something directly to network printer, only using the printer.print command?
    If you connect to a remote printer via Windows Networking ("File and Printer Sharing") then the printer is "owned by" the Windows Print Spooler. That means you must use Printer.Print and related methods or API equivalents, which "talk to" the printer driver which passes data on to the Spooler.

    Even if you prevented the printer from being a Print Spooler device and tried to connect to it directly from your program over TCP/IP you'd have to implement a remote printing protocol (LPR, etc.) that the server hosting it supports. Yes, many printers now have built in print servers but that doesn't change anything.


    Another possibility is to print from your VB6 program though the Spooler but bypassing the printer driver. The printer driver is what normally converts between GDI printer "markup" and a printer's native markup language (or command set). This is usually far less effort than trying to use something like a Winsock control and write the code to look like an LPR client.

    See How To Send Raw Data to a Printer Using the Win32 API from Visual Basic

    Of course if you do this your program will need some way to tell which kind of printer it is dealing with and produce the required markup or commands that a specific printer requires. This is similar to the bad old DOS days, when programs had to be written to handle each kind of printer they needed to print to.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Location
    Brazil
    Posts
    28

    Re: How can i check if my local network connection is fine ?

    thank you a lot

  6. #6
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: How can i check if my local network connection is fine ?

    Don't forget to mark the thread "Resolved".
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Tags for this Thread

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