|
-
Nov 15th, 2005, 07:23 AM
#1
Thread Starter
Hyperactive Member
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.
-
Nov 15th, 2005, 09:00 AM
#2
Fanatic Member
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
-
Nov 15th, 2005, 09:24 AM
#3
Thread Starter
Hyperactive Member
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)
-
Nov 15th, 2005, 09:57 AM
#4
Thread Starter
Hyperactive Member
-
Nov 15th, 2005, 11:45 AM
#5
Fanatic Member
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
-
Nov 16th, 2005, 02:30 AM
#6
Thread Starter
Hyperactive Member
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?
-
Nov 16th, 2005, 04:42 AM
#7
Fanatic Member
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
-
Nov 16th, 2005, 06:18 AM
#8
Thread Starter
Hyperactive Member
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.
-
Nov 16th, 2005, 06:24 AM
#9
Fanatic Member
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
-
Nov 16th, 2005, 02:24 PM
#10
Thread Starter
Hyperactive Member
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!
-
Nov 17th, 2005, 04:10 AM
#11
Fanatic Member
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
-
Nov 17th, 2005, 08:48 AM
#12
Thread Starter
Hyperactive Member
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!!!)
-
Nov 17th, 2005, 11:01 AM
#13
Fanatic Member
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
-
Nov 17th, 2005, 11:23 AM
#14
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|