Results 1 to 14 of 14

Thread: Data transfer [SOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Data transfer [SOLVED]

    How do I transfer files from a program on the PC to the Pocket device?
    I've tried to look for a drive with the name 'mobile device',
    but I can't find the drive...
    Last edited by HWijngaarD; Nov 17th, 2005 at 11:23 AM.

  2. #2
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Data transfer

    www.opennetcf.org have a RAPI class that you use with the full framework.
    It works over activesync to transfer files to the device.

    here is the library API
    http://www.opennetcf.org/library/Ope...unication.html

    here is the link to download it
    http://www.opennetcf.org/PermaLink.a...f-70dc239443c2
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Data transfer

    You gotta help me with this.
    Can you give me a hint or anything?

    If I want to transfer from C:\Program files\Bla.exe to
    my pocked pc Program Files\Bla.exe.
    Where do I start?
    (in VBNET please)

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Data transfer


  5. #5
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Data transfer

    yes that article is using the library from www.opennetcf.org

    to transfer the files you need to first of connect via rapi, m_rapi.Connect
    and then there is a method m_rapi.CopyFileToDevice() where you specify the location on the desktop machine and the destination on the device.

    http://www.opennetcf.org/forums/forum.asp?FORUM_ID=23 is the forum for the RAPI
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Angry Re: Data transfer

    really nice...
    Dim MyRapi as New RAPI
    If MyRapi.DevicePresent = TRUE Then
    MyRapi.Connect()
    End IF

    MyRapi Doesn't connect,
    it takes an awfull lot of time and I don't wait that long!
    I'm not crazy you know!

    Am I doing something wrong here?

  7. #7
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Data transfer

    did you download the example from the site of the sample RAPI applicaiton

    You need to create the instance of MyRapi inside the Contructor of the class
    '************************
    'member variables
    '************************
    Private WithEvents m_rapi As RAPI
    Private WithEvents m_activesync As ActiveSync


    Public Sub New()
    MyBase.New()

    'This call is required by the Windows Form Designer.
    InitializeComponent()

    'Add any initialization after the InitializeComponent() call
    Try

    m_rapi = New RAPI
    m_activesync = m_rapi.ActiveSync

    Catch ex As RAPIException
    m_rapi = Nothing
    MsgBox(ex.Message, MsgBoxStyle.Exclamation, "")
    Catch ex As DllNotFoundException
    m_rapi = Nothing
    MsgBox(ex.Message, MsgBoxStyle.Exclamation, "")
    End Try
    End Sub
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Data transfer

    Oh sh...
    Nothing.
    I did exactly what you wrote, but still the same result.
    No connection at all.
    VBNet is waiting for something.

  9. #9
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Data transfer

    is activesync showing that the device is connected.
    what happens if you add the following

    If myrapi.devicepresent = true then
    try
    myrapi.connect
    msgbox "connected"
    catch ex as Rapi.exception
    msgbox ex.message
    finally
    myrapi.disconnect
    end try
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Data transfer

    It's very frustrating.
    Now, I got activesynq running and it made a synq with the pocked PC.
    And when I check the device present it's TRUE!
    But Visual Studio get's stuck on the command myRapi.Connect.
    The taskmanager shows no activity at all at the debugging program
    that contains my Rapi Connect.

    I really don't get it, I'm getting very sick of it
    and I get the bad feeling that I won't succeed to make a connection ever.
    So cheer me up will ya!

  11. #11
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Data transfer

    did you download the sample RAPI application (http://www.opennetcf.org/samples/RAPIVB.zip)

    Did this work for you or did you get the same problem.
    What version of activesync is installed?
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Data transfer

    Cheers man,
    I should have tried this program much urlier.
    This program works fine.
    One thing now...
    If I import the form into my existing program and load it within it, the connect command stucks at that line...
    Although the form on it's own works great. (As it should work!)

    Do you know how to handle this???
    (You got me at least one step further!!!)

  13. #13
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Data transfer

    if you want post your .net solution as an attachment and i will have a look at it!!!!
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Talking Re: Data transfer

    Never mind,
    I started with your opennetcf program and imported the forms and all of the modules and dll's of my program and it works great now!
    Thanks for all the help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width