Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / March 2007

Tip: Looking for answers? Try searching our database.

Needs to get simple update info

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HSS - 20 Mar 2007 19:58 GMT
I've got a ridiculously simple app that "may" need to get updated info
(parameters etc.) from time to time.
Seems like overkill to create a web service just to get this little bit of
info.

Almost seems like downloading the "updated" app altogether would be about as
easy since it is a small app.

Any ideas on a way a PPC app could quickly get a few numbers from a central
location quickly if the device was activesynced to the computer?

May be the web service is the quickest cheapest way to go.

TIA
Harry
Paul G. Tobey [eMVP] - 20 Mar 2007 20:16 GMT
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 a
network, only via ActiveSync.

Paul T.

> I've got a ridiculously simple app that "may" need to get updated info
> (parameters etc.) from time to time.
[quoted text clipped - 11 lines]
> TIA
> Harry
HSS - 20 Mar 2007 20:26 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.