Application to transfer data to desktop

Last post 02-15-2008 14:25 by ctacke. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-14-2008 10:37

    Application to transfer data to desktop

    I am writing an application for Datalogic Memor barcode scanner to transfer scanned barcodes to my .NET 2.0 application on desktop. So the app on the device would have a transfer button and all it does is copies over the file to desktop. After trying bunch of different things I thought RAPI is the way to go. I had a few questions though.

     I downloaded the desktop communication sample in C# which is developed in VS 2003 from this website. The application works great. It is a desktop application that runs on the PC. After searching through the forums, I couldn't figure out if I could create an application that will sit on my barcode scanner device using the Desktop communication library.

    Basically, my question is, is it possible to create a Smart Device application in Visual Studio 2005 and transfer or copy over data (or a file) from my device to PC using Desktop communication library? Or is it just meant to be used for apps sitting on the desktop?

    Will it be able to copy over the file from device to the desktop using either CopyFileToDevice() or CopyFileFromDevice() functions??

     

    Please let me know if you have a sample code that could briefly show this.

    Thanks for your time and comments

    Csharpkid 

     

  • 02-14-2008 14:23 In reply to

    Re: Application to transfer data to desktop

    I got my answer after reading Neil's reply in this post:

    http://community.opennetcf.com/forums/t/9451.aspx

    Since RAPI is going to use ActiveSync, I won't be able to initiate transfer from the device. It has to be from the desktop. 

  • 02-15-2008 3:42 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,152

    Re: Application to transfer data to desktop

     Actually, it's the other way around: ActiveSync uses RAPI.

     As explained in the post you link to, you cannot initiate RAPI operations from the device. This is by design.

     


  • 02-15-2008 10:53 In reply to

    Re: Application to transfer data to desktop

     Yeah, I read somewhere that ActiveSync uses RAPI. Thanks for the info though.

    I got one more thing to figure out, may be you can help. I figured CopyFileFromDevice() does help me get the data over to the PC. I am actually looking for a way to import scanned barcodes into my .NET app. CopyFileFromDevice puts one constraint on the users that the file has to be copied somewhere on the desktop before I can start reading it to import the barcodes from that file. This would mean writing it to some folder where the user has permission. Not all the users would have write access.

    Rather than going this route, I was wondering if it is possible to merely read the file on the device in a stream or something or may be transmit the contents of a file on the device somehow without saving them to a file on the desktop?? Do you happen to know any way to do this or any other idea that comes to your mind? Please let me know.

     
    Thanks 

     

  • 02-15-2008 11:06 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 1,939

    Re: Application to transfer data to desktop

    Yes, it's very possible.  Take a look at the source for CopyFileFromDevice.  You'll see that it opens the device file and reads from it into a memory buffer which it then writes to the PC file.  You could use just the read half and not bother writing to the PC file.  There currently isn't any method to just open the device file as a managed Stream (though it would be easy to implement) 

  • 02-15-2008 11:12 In reply to

    Re: Application to transfer data to desktop

     Thanks Chris, that was a quick reply.

    I am new to this. I may sound stupid but does this mean I will need to download sourcecode, modify it, build it into a new OpenNETCF.Desktop.Communication DLL or something and then use the modified DLL in my code?? Is there any other posting or tutorial or something that will briefly show how to do this? I don't mind writing a new function or modifying the CopyFileFromDevice method.

     

    Please let me know, thanks.. 

  • 02-15-2008 13:31 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 1,939

    Re: Application to transfer data to desktop

    Yes, you'll have to download, modify and rebuild the library.  No tutorials on how to do it other than just general development articles.  No magic going on here - it's  just a standard desktop C# class library.

  • 02-15-2008 14:15 In reply to

    Re: Application to transfer data to desktop

    So, how would I go about doing this? All I would have is C# library? Or can I download the project/solution somewhere??  Where can I get the source-code?

    I could get to this link from one of your postings that referred to the source-code but its no longer available.

    http://www.opennetcf.org/getfile.asp?file=SmartDeviceFramework13&dir=src 

    Please help.

  • 02-15-2008 14:25 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 1,939

    Re: Application to transfer data to desktop

    All the source and project files are in our source control repository:

    http://svn.opennetcf.com/

     

Page 1 of 1 (9 items)