I have an UWP C# application that needs to use printers that are connected via USB. Unfortunately the UWP built-in functionality for these sorts of devices (Windows.Devices.Usb namespace) has some major shortcomings. It doesn't recognize the USB printers as printers without installing the manufacture's driver (because Pnp manager doesn't provide enough info to the registry). Installing a specific driver is something that I don't want to do. I have written a C++ script using CreateFile and WriteFile to access the printers, but unfortunately UWP doesn't offer support for CreateFile and CreateFile2 has limited access only to app's local folder and the package's installed location. Do you have any suggestions how I might be able to bypass the UWP restrictions, or maybe some other way besides CreateFile to get the device handle that I could pass to WriteFile?
How to get a device handle to pass to WriteFile within UWP C#
208 views Asked by user3077276 At
1
There are 1 answers
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in UWP
- How to make that each seller has its own different set of products using sqlite and uwp
- How can i solve SQLITE_IOERR_SEEK on Unreal UWP application on MS Hololens2
- UWP Blank app throws error code: The app didn't start.. Activation phase: COM ActivateExtension
- How can I tell if a control is actually Visible in UWP?
- DEP0700: Registration of the app failed UWP in release mode
- Linker errors when adding a native c++ static library to Windows runtime component (UWP)
- uwp app only accepts input whenever i have opened on conhost/powershell/cmd
- uwp - WebAuthenticationBroker does not show cloudflare captcha
- How do I get the typename of an arbitrary XAML FrameworkElement?
- Apryse PDFTron SetDoc method throws AccessViolationException
- How do you know which items are realized (non-virtualized) in an ItemsRepeater?
- How to copy or drag n drop image from Webview2 to Canvas?
- UWP app Shutdown PC don't work in kiosk mode
- Path denied error when building UWP app in release
- Display Data from Drive D: in the Gridview
Related Questions in WRITEFILE
- Time Delay while sending data through UART using WriteFile intervally for some duration
- Writing large buffer data to a file using Windows API
- The problem with writing a file with the with open construction
- Issue with Writing to File in x64 Assembly using MASM on Windows
- Receiving multiples files from server
- save in own format imagej or imagej2
- Microsoft Detours hook WriteFile
- Problem related to appending the objects in the serialization process
- Store a data stream on hard disk in Windows
- C# using a method from a class to another class, instance, DependencyProperty.Register error
- Electron app restarts automatically after calling fs.writeFile method
- How can multiple processes append to a Windows Terminal Server Client file without overwriting?
- UNBUFFERED READWRITE with Win32 API in C++
- Writing to file gives me other result when I use dictionary values in Python
- how to append comma inbetween json file in cypress
Related Questions in RESTRICTIONS
- Conditions widget in protege 5
- How to slow down load time for a website
- How to get a device handle to pass to WriteFile within UWP C#
- WCF service: restrictions for WebGet and WebInvoke with AD - security roles for a website with anonymous access
- How to restrict app installation on devices which don't have 4K camera?
- Detect anonymous allocations in GNAT predefined libraries
- Bypass IP restriction SSH
- abstract controller connected to repository using restrictions - asp.net core 2
- Limit page creations by user role functions.php
- "SELECT *" except for columns the user is not allowed to view
- Protege: property domain restrictions using other properties
- Ionic App blocked by iOS 'Specific Website Only' restriction
- Append Criteria query to previous query in Hibernate
- Restrict php code to logged in users - Wordpress
- Set Multiple Restrictions for Rows Called to Print in Pandas
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
UWP app run sandboxed, it only can access certain file system locations by default as the document File access permissions. So my suggestion is that you can try to create a classic app to use these specific APIs, then convert it to UWP using Desktop Bridge.