Thanks Paul,
Yes it'd be an ActiveSync connection so it could hit the web service this
way to get inforamtion if the application was running.
Harry
I was just wondering if the app could pull down a file quickly - I've used
the ol'
Dim wr As HttpWebRequest = CType(m_rec.Create(FullFilePath), HttpWebRequest)
Dim ws As HttpWebResponse = CType(wr.GetResponse(), HttpWebResponse)
Dim str As Stream = ws.GetResponseStream()
Dim inBuf(1000000) As Byte
Dim bytesToRead As Integer = CInt(inBuf.Length)
Dim bytesRead As Integer = 0
Try
While bytesToRead > 0
Dim n As Integer = str.Read(inBuf, bytesRead, bytesToRead)
If n = 0 Then
Exit While
End If
bytesRead += n
bytesToRead -= n
End While
Dim fi As FileInfo
If File.Exists("\Application\" & strJustTheFileName) Then
fi = New FileInfo("\Application\" & strJustTheFileName)
fi.Attributes = FileAttributes.Normal
End If
Dim fstr As New FileStream("\Application\" & strJustTheFileName,
FileMode.Create)
fstr.Write(inBuf, 0, bytesRead)
str.Close()
fstr.Close()
inBuf = Nothing
fi.Attributes = FileAttributes.ReadOnly
Catch ex As Exception
End Try
Next
> You can write a desktop application using the Remote API, RAPI, to do
> various things to the device. You wouldn't be able to get that done over
[quoted text clipped - 17 lines]
>> TIA
>> Harry
Paul G. Tobey [eMVP] - 20 Mar 2007 20:39 GMT
Well, since you're connected to the device, in the ActiveSync case, you
don't need a Web service at all. It could stop the application if it's
running, copy a new version, and start the new version behind the scenes.
You could do what you describe, more or less, yes. For that matter, you
could just put the settings file, maybe a .txt file, in the synchronized
files folder on the PC and it would be copied to the device any time it was
newer. You'd have to be careful not to modify the file on the device, so it
didn't get synced the other direction, of course.
Paul T.
> Thanks Paul,
>
[quoted text clipped - 86 lines]
>>> TIA
>>> Harry
HSS - 23 Mar 2007 21:56 GMT
Thanks Paul,
Updated info on a central server....so the file sync - would that still
work? I 'd figure i'll just do a web service and let the device use an http
connection to access the web service for the updated info.
> Well, since you're connected to the device, in the ActiveSync case, you
> don't need a Web service at all. It could stop the application if it's
[quoted text clipped - 99 lines]
>>>> TIA
>>>> Harry
Paul G. Tobey [eMVP] - 23 Mar 2007 22:51 GMT
You'd have to play with things and see if putting a shortcut to a server
folder in your synchronized files folder for AS would sync the contents from
the server. But, you're right, that is a potential stumbling block.
Note that, if the application has to be updated (the EXE), you'll have to
have some means of exiting the application, copying the new file (note that
the application, obviously, can't be the one to do this), and then
restarting the application.
Paul T.
> Thanks Paul,
>
[quoted text clipped - 105 lines]
>>>>> TIA
>>>>> Harry