I was trying to get Win CE device information using Microsoft.SmartDevice.Connectivity dll from a desktop application. I was able to connect , get system info, get running processes and disconnect. I am trying to fetch directories and files existing on device and i am not able to. If any one knows how to get them , please provide some code samples. That will be helpful.
When i was going through link given by ctacke, i found some more parts of it available. I went through CoreCon API - Part V and Followed his steps, it worked. Infact he has a provided a sample application too.
The CoreCon APIs (Microsoft.SmartDevice.Connectivity) cannot inherently give you a list if files on the device. It provides some rudimentary capabilities to get device info and push a file, but it's main purpose it to provide an API pipeline to allow you to create your own client tools. The VSD team did blog an example of using the CoreCon APIs to get a list of files from a connected device in a console app, which should get you most of the way to what you're after.
Related
I'm a relatively new Developer building my first app.
Right now I'm in the process of developing a UWP app and I am needing to get the Hard Drive Serial number from the PC from the Views (OnNavigatedTo), then after a few more fields are filled out, to then save all values to a SQL Server.
What I have discovered up to this point:
Grabbing some values like Hard Drive SN are not so easy with UWP.
I don't seem to have access to Registry HKLM via UWP
I can grab it very easily with PowerShell, and write it to a JSON or XML file. which I plan to do with a Service Account when PC is imaged.
I Don't know where to put the file where the App can see it.
Writing to Sql Server can only be done by creating a webservice and making HTTP / JSON calls via App. (I have this part setup but have not started accessing it via app yet)
So the part I really need help with I guess, is Where to Put JSON/XML file that App will be able to see and read from. Unless of course, someone knows of another way to get Hard Drive SN into a UWP app.
Thanks for Any Help
The recommended way to do this (if you want to go to the Windows Store) is to use a FileOpenPicker and have the user choose the file manually.
If this is for side-loading only (not going to the Windows Store) you can write the file to the user's Documents folder and then the UWP can read it using documentsLibrary capability without any user intervention. You could also use a fullTrust extension to run the PowerShell script and to put the file in the app's data folder. You can check out the Desktop Bridge docs for more info on fullTrust extensions.
This is more a question if I am taking a 'wrong path' to accomplish the task.
I need to print Data to Receipt Printers from Web Application.
Based on what I understand from various posts on net, it seems best option would be to create something like a Print Server (not sure about the name). This will be C# desktop application running as a service. I am planning to put messages in queue and Print Server to pull messages from queue and print it to reconfigured LAN printers. I will be using POS.NET to connect to POS devices.
Added advantage (to using Javascript/pdf solutions) is that I can enhance the same "Print Server" to send information to display system. The message system could be decoupled to be on cloud so as to print in a different geographical area, like warehouse.
If I target Framework 3.5 for the service, I can get rid of POS.NET issues with Framework 4.0 plus versions.
Am I reinventing something that is already available in .Net or possibly an open-source application?
I found these kind of similar questions
How to print from web application to receipt printer?
Configuring a POS printer for remote printing
which were helpful but did not answer my question in full.
I had a to do exactly this, and after many hours of searching, I could not find anything. I achieved this by installing Thunderbird (any email client will do) and send the receipt via email to the account linked up to that client, I then setup a rule on the email client to print out anything it recieved.
I took me several time and days to research and try some codes applicable to my problem but unfortunately I wasn't able to see codes that pair and receive files (text, images etc..NOT audio or video in particular) from a mobile device.
Most of the examples found are for SENDING only (From PC to Mobile).
I have bluetooth device (USB) physically attached to my PC.
Summary:
All I need is a sample code that automatically detect/pair when a device is trying to send the file (like in Kodak kiosk but not limited to images only).
I also wanted to understand and study the code.
Perhaps use my 32feet.NET library and its ObexListener class see e.g. http://32feet.codeplex.com/wikipage?title=Server-side&referringTitle=OBEX
For more advanced scenarios use Andy Hume's Brecham.Obex library and his server sample application. See http://inthehand.co.uk/files/folders/objectexchange/entry9942.aspx
Which Bluetooth stack does your PC have installed? Microsoft, Widcomm, BlueSoleil...? See e.g. http://32feet.codeplex.com/wikipage?title=Supported%20Hardware%20and%20Software On Widcomm for instance the build-in OBEX server would have to be disabled to allow your server to get all the incoming connections...
well guys, i am part of one team. (I dont have the project yet, i am new).
They did a application using gps, problem is it fail sometimes...
why? they think gps fails because users has the device in "energy saving" mode; then the device hibernates
after 5 minutes if they dont use it.
GPS brings sometimes bad coordinates (for example coordinate shows users is on "SEA" or in "Japan". I repeat, My partners thinks problem is because device is in "energy saving" mode. how can i change this configuration with C# while application is running (maybe back old configuration when application has been closed).
I am using this library.
using Microsoft.WindowsMobile.Samples.Location;
I can't check if it works because now i dont have a device, and i my computer doesn't have GPS, do you have any idea for i can check the application?.
i am using
`"Windows Mobile 6.0 SDK"`
You can install networking functionality while using the Microsoft Device Emulator. This blog explains how to setup network functionality on Windows 7. Follow the official documentation if you're not using Windows 7.
You can emulate GPS functionality using the FakeGPS program supplied by Microsoft. If you want anything close to real data you'll need a text file containing raw NMEA to feed into FakeGPS. You can simply record bytes passed through the GPS COM port to a file to generate a NMEA file. If fake GPS doesn't like your file then remove the non-standard NMEA lines and try again.
You should do some research on Windows Mobile Power Management first to understand the problem. The quickest hack is to simply call SystemIdleTimerReset() more frequently than the battery idle timeout (use SystemParametersInfo() and SPI_GETBATTERYIDLETIMEOUT) to prevent the device from sleeping. This will decrease the battery life of the device! There are other more elegant solutions available such as using the Power Management API.
I am using Visual Studio Team System 2008, C#, .NET 3.5, IIS 7.0, and ASP.NET. I am using Silverlight 3.0 as well. I want to read the content of a USB flash disk at the client side, using the information in the USB flash disk as a user profile identifier -- just like an online bank service is using a USB key to store a client certificate (but my security requirement is not that high).
How the content of a specific file in a USB flash disk in a web application (at the client side) be read? Could we do this in Silverlight (if can not, any alternative solution to read USB flash disk content)?
BTW: I want to read the content automatically, and I do not want the user to manually select the specific file on the USB flash disk to read.
You can not do this in Silverlight. You can read a file on the user's machine, but not without user intervention. The security model built into Silverlight will not allow it.
The best you can do is to read a user-specified file is to have them browse to it with a
file-open dialog box.
You can access the USB/flash drive if you are using a console/Windows Forms/WPF application locally. You can find the drives using the DriveInfo class, then iterate over them or use a LINQ query to find the drive you want to access. See the Stack Overflow question "How to find USB drive letter?" for details. Once you have a path, you can search it for the file you want. You do not need a special API or library, the Windows OS treats the USB drive as a normal drive, same as a "permanent" HDD connected to your system, and will do all the dirty work for you at that level. Just use the .NET I/O classes. However, if you wish to access the drive in an independent manner that does not depend on any OS, then you should use a 3rd party library.
I don't think what you're asking for is possible. If it IS possible, that's scary stuff... To allow a web site to grab stuff without user intervention? Uh-Uh. No way.\
Edit - Added after reading the comment
Using only the standard framework, no. USB support is not something that comes standard. You'd think there would be some classes in the System.IO namespace for USB ports like there are for COM ports, but no such luck. However, there are some libraries that will handle this. Here are some links to get you started.
http://weblogs.asp.net/israelio/archive/2005/08/15/422637.aspx
http://www.icsharpcode.net/OpenSource/SharpUSBLib/