VirtualRPC
David Feugey (2125) 2709 posts |
Hi all. I plan to ‘try to switch’ to RISC OS for some of my professional software. I would like to use it for example to print a PDF under Windows from command line, or to check the Windows screen resolution to set RISC OS resolution accordingly. Source code of VirtualAMP could help here :) My idea is to have an autoswitch script that will always boot VirtualRPC-DL in the same resolution than Windows (in fullscreen mode of course). And a simple way to print files generated by RISC OS (with a command line call to GS). I’ll need too to mount Windows discs under RISC OS (to put backups on USB discs). Easy with HostFS, but is there a way to hide a specific Disc icon (it’s only for internal use, not for users)? Else I could launch the CP command from RISC OS with a CreateProcessAsUser call. It would be could too to hack Rick’s Midi module to use midiOutShortMsg calls under Windows. But that’s a completely different story :) |
Steve Pampling (1551) 8172 posts |
MiniDisc? |
David Feugey (2125) 2709 posts |
Yep, but they still appear inside the menu. Anyway, if MiniDisc/Director can remove disc icons, I can too. With GetLogicalDriveStrings I can get the list of drives, and with GetDriveType I can detect removable drives. Both should work with CallWin32. So I could know in realtime which disc to use or not. With HostFS2, I can mount discs from RISC OS, but not with HostFS1. My idea is to configure mounts for all windows discs from a: to z: and to check if there are present when I need to backup something. For example d: for the USB drive needed to put my backup. Problem: I need to hide icons of all mounted drives (except the USB key). Not sure it’ll work. That’s just a way to recreate PopupDisc behaviour :) |
Rick Murray (539) 13851 posts |
A brief look at the (terse) documentation suggests that it should be too hard to call Win32 functions, but getting Windows to call into RISC OS looks like it may require you to write a DLL on the Windows side. I can imagine this would be nifty and messy in roughly equal measure…
For the first, The second, you’ll want to call GetSystemMetrics twice. Once with SM_CXSCREEN (0) to get the width (in pixels) and again with SM_CYSCREEN (1) to get the height (in pixels). I think Omni ought to let you mount a Windows share. Yup. Shared my personal files folder read only (XP) and Omni found it right away. On the other side, !smbserver will share RISC OS files with Windows. I didn’t get passwords working with XP, but since I’m on a LAN and this is isolated from the world, I set the Pi’s SD card to share with Guest allowed, and Read only. Then Why am I saying this? Because I’m wondering if you might not be better using a real RISC OS machine to run RISC OS, as every year that passes, the emulators are just going to get longer and longer in the tooth. The RiscPC, that these programs emulate, was cutting edge twenty two years ago. Time we all moved on… |
Rick Murray (539) 13851 posts |
BTW, while you should see GetDriveType return DRIVE_FIXED for an external USB harddisc and DRIVE_REMOVABLE for USB flash device, this distinction is made by the driver, not by Windows. It may also depend upon the format in use (ie a flash drive formatted NTFS vs one formatted FAT32). |
David Feugey (2125) 2709 posts |
Does not seems so complex.
Yes, yes and yes. Nota: there is another call to make difference between USB and non USB discs.
Yes, and that’s my main objective. But if the client do not want, I have also a Iyonix speed PC solution to propose, but for 30 quids more. Speed is good, printing is easy (but I want to make it even easier), integration is good too (and could be almost perfect). You can deploy the solution on a PC with good integration (VirtualRPC), on PC/Mac/Linux with a bit less integration but for free (RPCEmu), perhaps under ARM server with Qemu (new version simulates a Pi2), and under native hardware. Not so bad. I’m just a bit afraid with full screen mode (a big problem under RPCEmu). |
Rick Murray (539) 13851 posts |
Sorry, that’s what happens when you’re typing and Cat Wants Attention NOW. Should have been “shouldn’t”. What’s the call to differentiate USB and non USB? I don’t see anything obvious is my 2001 copy of the Windows API. While a PC sounds like a good solution, it’s a lot more power hungry too, compared to native hardware. I have only fired up my main PC to watch Kara no Kyōkai. Could do it on the Pi, I suppose, but that means faffing around with USB sticks (as the files are on a a harddisc). I’m writing this on an iPad. |
David Feugey (2125) 2709 posts |
https://msdn.microsoft.com/en-us/library/windows/desktop/ff800840%28v=vs.85%29.aspx
Especially with emulation… |
Steve Pampling (1551) 8172 posts |
Hmmm, furriness presence. I’m currently getting a one tap, two tap, three tap encouragement to sort the food shortage. |