Can't print in parallel port using Windows Host and FreeDOS Guest

Discussions related to using VirtualBox on Windows hosts.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by mpack »

"it crashes" is not very informative. I'd need to see a log file from a crash session.
psaez
Posts: 14
Joined: 12. Jan 2019, 10:36

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by psaez »

HostParallel#0: Could not get direct access to the host parallel port!! (rc=VERR_INTERNAL_ERROR_3) (VERR_INTERNAL_ERROR_3).
Parallel device 0 cannot attach to host driver (VERR_INTERNAL_ERROR_3).

Result Code: E_FAIL (0x80004005)
Componente: ConsoleWrap
Interfaz: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by mpack »

That is an error message, not a crash.

Did you disable the host printer and reboot the host?
psaez
Posts: 14
Joined: 12. Jan 2019, 10:36

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by psaez »

yes, it's the same error report when it's diabled and when not, even rebooting.

when this error report is displayed, the virtual machine is being closed, it's the same behaviour when a crash stops a program

please, what more can I try to make this working?
Last edited by socratis on 15. Jan 2019, 13:42, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by mpack »

Giving an error message then not proceeding is not at all the same thing as a crash. If your car stops and says you ran out of fuel, is that the same thing as a car crash? One is intentional behaviour, the other is not.

Your VM recipe requires a LPT1 connection, unfortunately VirtualBox cannot make that connection hence it cannot proceed. There is not much more I can suggest at the moment, though it might help if you provided that VM log that I asked for: make sure the VM is fully shut down, then right click it in the manager. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.

I would also like you to prove to me that LPT1 exists on your host, i.e. post a screenshot of the opened "Ports (COM & LPT)" branch of the host's Device Manager.

Please also include a copy of your <vmname>.vbox file in the zip with the log.
psaez
Posts: 14
Joined: 12. Jan 2019, 10:36

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by psaez »

i attached the zip here

in this screenshot you can see enabled the printer, but I tryed disabled too and after reboot.
Attachments
mpack.zip
(57.14 KiB) Downloaded 22 times
Last edited by socratis on 15. Jan 2019, 17:27, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by Martin »

"HostParallel#0: Could not get direct access to the host parallel port!!"
You are running Windows 10 1809.
Can you check that DeviceGuard is not active?
psaez
Posts: 14
Joined: 12. Jan 2019, 10:36

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by psaez »

I tryed disabling windows antivirus real time protection, same result
Last edited by socratis on 15. Jan 2019, 17:27, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by Martin »

DeviceGuard (and CredentialGuard, Sandbox and other Hyper-V based security features of Windows 10) has nothing to do with antivirus real time protection.
psaez
Posts: 14
Joined: 12. Jan 2019, 10:36

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by psaez »

wow, as I can see here device guard is a major thing: https://www.tenforums.com/tutorials/689 ... -10-a.html

can't believe it's necessary to do those tricks with the registry to make virtualbox able to use parallel port.

this computer is in a company and I can't disable something like that, it's too much. Are you sure that this is the problem? I think not because I was having exactly the same problem with Windows 7. I migrated to this computer yesterday, so I'm pretty sure device guard it's not related with the issue if windows 7 is giving the same problem, and windows 7 doesn't have device guard
Last edited by socratis on 15. Jan 2019, 17:28, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by mpack »

I would be surprised if that is the problem. I would be more inclined to believe there has been some change to the structure of a printer driver on Windows hosts. On the other hand, if you search for your error message you'll find that it has been reported before, with some people reporting that printing works in 5.1.2 but not in versions since then. Also Klaus (dev and admin here) mentions in another ticket that LPT1 is correct and not "LPT1:" - which is contrary to what I know as a developer myself. I would need Klaus to clarify that statement: perhaps he means that VBoxManage itself treats LPT1 and LPT1: as equivalent.

Bear in mind that DeviceGuard uses Hyper-v. If DeviceGuard is enabled then VirtualBox 5.x will not work. In theory v6.x will work, but the feature allowing co-existence with Hyper-v is new and not well proven.
psaez
Posts: 14
Joined: 12. Jan 2019, 10:36

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by psaez »

Hi

Sorry for the delay in the answer. I tryed again, now with VirtualBox 6.0.2, the last version, and I tryed using "LPT1" instead of "LPT1:". Using LPT1, the virtual machine loads correctly, but I can't print. When trying to print with the old dos program, it gives "runtime error 160 at 0000:0466" exception and closes. The error code 160 means "Device write fault", it's when a program gets an error trying to print with a printer, for example. I can see some similar reports in google, but without using virtualbox. I tryed another program, the "EDIT" program included in FreeDOS, loading EDIT program I tryed to print a "hello world" text and it don't print the text, instead of printing, the LPT1 printer starts to extract paper continuously until I stop it (it's a Dot-Matrix Printer with a roll of paper). So as I can understand there is a problem communicating with the printer, with my old program and with other programs like EDIT.

I'm pretty sure that LPT1 and printer works because in one of my tests I was able to install and load freedos and I was able to print correctly with my program. But having a partition with freedos is not an allowed solution in the company. I need to make it work in a virtual machine :/

Any idea about how to solve this?
Last edited by socratis on 19. Jan 2019, 05:18, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by mpack »

psaez wrote:loading EDIT program I tryed to print a "hello world" text and it don't print the text, instead of printing, the LPT1 printer starts to extract paper continuously until I stop it
Well, at least that proves you are talking to the host LPT port.
psaez wrote:Any idea about how to solve this?
I'll have to leave others to answer that, since we've already covered my ideas. Worst case you can always print to a file and print the file on the host. Or, perhaps you can get network printing to work.
psaez
Posts: 14
Joined: 12. Jan 2019, 10:36

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by psaez »

network print? but its a very old LPT1 printer, what do you mean?
Last edited by socratis on 19. Jan 2019, 05:19, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't print in parallel port using Windows Host and FreeDOS Guest

Post by mpack »

Network printer redirection existed in the DOS era too you know. Businesses had PCs which needed to share a printer. The only question is whether you can get a modern host to create a printer interface that DOS would understand. You should Google for that. At least the fact that it's a FreeDOS guest should make the networking aspects easier.
Post Reply