Call a windows service on pc while cradled
I have need to call a windows service on the PC while the device is cradled.
Essentially I have a windows service that handles creating a file that I need
to transfer to the device. I need the windows service for this as the file
to be transferred is an sdf and is created and populated by the windows
service from a very large XML file.
I have tried several variations of the Process and ProcessInfo classes to
accomplish this but continuessly get the following error.
<CODE>
[8/17/07 4:18:02 PM]:Attempt to execute the windows service on the PC failed.
[8/17/07 4:18:05 PM]:Win32Exception
[8/17/07 4:18:05 PM]:at System.Diagnostics.Process.StartWithShellExecuteEx()
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start()
at Xterprise.Wellspan.AssetMgmt.WSEquipmentTransfer.SyncData()
at Xterprise.Wellspan.AssetMgmt.frmMain.mnuSync_Click()
at System.Windows.Forms.MenuItem.OnClick()
at System.Windows.Forms.Menu.ProcessMnuProc()
at System.Windows.Forms.Form.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at Xterprise.Wellspan.AssetMgmt.StubForm..ctor()
at Xterprise.Wellspan.AssetMgmt.Program.Main()
</CODE>
I am using Windows Mobile 6 to attempt this.
Thanks for any help... :)
Date:Fri, 17 Aug 2007 16:52:01 -0700
Author:
|
RE: Call a windows service on pc while cradled
BTW I am running this on a Symbol 9090 device. A sample of the code follows:
Latest try:
System.Diagnostics.Process p= new System.Diagnostics.Process();
p.StartInfo.FileName = @"\Program Files (x86)\Xterprise
Inc\Wellspan\XAMData\StartJob.bat";
p.Start();
"webdink" wrote:
> I have need to call a windows service on the PC while the device is cradled.
> Essentially I have a windows service that handles creating a file that I need
> to transfer to the device. I need the windows service for this as the file
> to be transferred is an sdf and is created and populated by the windows
> service from a very large XML file.
>
> I have tried several variations of the Process and ProcessInfo classes to
> accomplish this but continuessly get the following error.
>
> <CODE>
> [8/17/07 4:18:02 PM]:Attempt to execute the windows service on the PC failed.
> [8/17/07 4:18:05 PM]:Win32Exception
> [8/17/07 4:18:05 PM]:at System.Diagnostics.Process.StartWithShellExecuteEx()
> at System.Diagnostics.Process.Start()
> at System.Diagnostics.Process.Start()
> at Xterprise.Wellspan.AssetMgmt.WSEquipmentTransfer.SyncData()
> at Xterprise.Wellspan.AssetMgmt.frmMain.mnuSync_Click()
> at System.Windows.Forms.MenuItem.OnClick()
> at System.Windows.Forms.Menu.ProcessMnuProc()
> at System.Windows.Forms.Form.WnProc()
> at System.Windows.Forms.Control._InternalWnProc()
> at Microsoft.AGL.Forms.EVL.EnterMainLoop()
> at System.Windows.Forms.Application.Run()
> at Xterprise.Wellspan.AssetMgmt.StubForm..ctor()
> at Xterprise.Wellspan.AssetMgmt.Program.Main()
> </CODE>
>
> I am using Windows Mobile 6 to attempt this.
>
> Thanks for any help... :)
Date:Fri, 17 Aug 2007 17:08:10 -0700
Author:
|
Re: Call a windows service on pc while cradled
You need a "listener" app on the PC that will receive commands (likely TCP)
from the device and then act on them. You can't directly "call" the PC, not
can you run a batch file on the device (as it has no command processor).
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
"webdink" wrote in message
news:5E670231-D7D9-4262-B503-7525DD176E87@microsoft.com...
>I have need to call a windows service on the PC while the device is
>cradled.
> Essentially I have a windows service that handles creating a file that I
> need
> to transfer to the device. I need the windows service for this as the
> file
> to be transferred is an sdf and is created and populated by the windows
> service from a very large XML file.
>
> I have tried several variations of the Process and ProcessInfo classes to
> accomplish this but continuessly get the following error.
>
> <CODE>
> [8/17/07 4:18:02 PM]:Attempt to execute the windows service on the PC
> failed.
> [8/17/07 4:18:05 PM]:Win32Exception
> [8/17/07 4:18:05 PM]:at
> System.Diagnostics.Process.StartWithShellExecuteEx()
> at System.Diagnostics.Process.Start()
> at System.Diagnostics.Process.Start()
> at Xterprise.Wellspan.AssetMgmt.WSEquipmentTransfer.SyncData()
> at Xterprise.Wellspan.AssetMgmt.frmMain.mnuSync_Click()
> at System.Windows.Forms.MenuItem.OnClick()
> at System.Windows.Forms.Menu.ProcessMnuProc()
> at System.Windows.Forms.Form.WnProc()
> at System.Windows.Forms.Control._InternalWnProc()
> at Microsoft.AGL.Forms.EVL.EnterMainLoop()
> at System.Windows.Forms.Application.Run()
> at Xterprise.Wellspan.AssetMgmt.StubForm..ctor()
> at Xterprise.Wellspan.AssetMgmt.Program.Main()
> </CODE>
>
> I am using Windows Mobile 6 to attempt this.
>
> Thanks for any help... :)
Date:Fri, 17 Aug 2007 21:01:56 -0500
Author:
|
Re: Call a windows service on pc while cradled
It looks like you're trying to execute something on your desktop from device
which could not possibly work.
If you need to "call" something on another host you should use Web Services
or other means of remote communications, e.g. sockets.
--
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
*** Want to find answers instantly? Here's how... ***
1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
"webdink" wrote in message
news:9F369CA8-2392-4A74-95E0-EE9138FA47FF@microsoft.com...
> BTW I am running this on a Symbol 9090 device. A sample of the code
> follows:
>
> Latest try:
>
> System.Diagnostics.Process p= new System.Diagnostics.Process();
> p.StartInfo.FileName = @"\Program Files (x86)\Xterprise
> Inc\Wellspan\XAMData\StartJob.bat";
> p.Start();
>
> "webdink" wrote:
>
>> I have need to call a windows service on the PC while the device is
>> cradled.
>> Essentially I have a windows service that handles creating a file that I
>> need
>> to transfer to the device. I need the windows service for this as the
>> file
>> to be transferred is an sdf and is created and populated by the windows
>> service from a very large XML file.
>>
>> I have tried several variations of the Process and ProcessInfo classes to
>> accomplish this but continuessly get the following error.
>>
>> <CODE>
>> [8/17/07 4:18:02 PM]:Attempt to execute the windows service on the PC
>> failed.
>> [8/17/07 4:18:05 PM]:Win32Exception
>> [8/17/07 4:18:05 PM]:at
>> System.Diagnostics.Process.StartWithShellExecuteEx()
>> at System.Diagnostics.Process.Start()
>> at System.Diagnostics.Process.Start()
>> at Xterprise.Wellspan.AssetMgmt.WSEquipmentTransfer.SyncData()
>> at Xterprise.Wellspan.AssetMgmt.frmMain.mnuSync_Click()
>> at System.Windows.Forms.MenuItem.OnClick()
>> at System.Windows.Forms.Menu.ProcessMnuProc()
>> at System.Windows.Forms.Form.WnProc()
>> at System.Windows.Forms.Control._InternalWnProc()
>> at Microsoft.AGL.Forms.EVL.EnterMainLoop()
>> at System.Windows.Forms.Application.Run()
>> at Xterprise.Wellspan.AssetMgmt.StubForm..ctor()
>> at Xterprise.Wellspan.AssetMgmt.Program.Main()
>> </CODE>
>>
>> I am using Windows Mobile 6 to attempt this.
>>
>> Thanks for any help... :)
Date:Fri, 17 Aug 2007 18:58:29 -0700
Author:
|
Re: Call a windows service on pc while cradled
I suppose being cradled has no effect on the ability to make the call to the
windows service on the desktop. I can certainly use a web service to handle
this and likely run all of the code from the web service and eliminate the
windows service. Just figured I would give the windows service "route" a
whirl first.
Thanks for the assistance.
"<ctacke/>" wrote:
> You need a "listener" app on the PC that will receive commands (likely TCP)
> from the device and then act on them. You can't directly "call" the PC, not
> can you run a batch file on the device (as it has no command processor).
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Managed Code in an Embedded World
> www.OpenNETCF.com
>
>
> "webdink" wrote in message
> news:5E670231-D7D9-4262-B503-7525DD176E87@microsoft.com...
> >I have need to call a windows service on the PC while the device is
> >cradled.
> > Essentially I have a windows service that handles creating a file that I
> > need
> > to transfer to the device. I need the windows service for this as the
> > file
> > to be transferred is an sdf and is created and populated by the windows
> > service from a very large XML file.
> >
> > I have tried several variations of the Process and ProcessInfo classes to
> > accomplish this but continuessly get the following error.
> >
> > <CODE>
> > [8/17/07 4:18:02 PM]:Attempt to execute the windows service on the PC
> > failed.
> > [8/17/07 4:18:05 PM]:Win32Exception
> > [8/17/07 4:18:05 PM]:at
> > System.Diagnostics.Process.StartWithShellExecuteEx()
> > at System.Diagnostics.Process.Start()
> > at System.Diagnostics.Process.Start()
> > at Xterprise.Wellspan.AssetMgmt.WSEquipmentTransfer.SyncData()
> > at Xterprise.Wellspan.AssetMgmt.frmMain.mnuSync_Click()
> > at System.Windows.Forms.MenuItem.OnClick()
> > at System.Windows.Forms.Menu.ProcessMnuProc()
> > at System.Windows.Forms.Form.WnProc()
> > at System.Windows.Forms.Control._InternalWnProc()
> > at Microsoft.AGL.Forms.EVL.EnterMainLoop()
> > at System.Windows.Forms.Application.Run()
> > at Xterprise.Wellspan.AssetMgmt.StubForm..ctor()
> > at Xterprise.Wellspan.AssetMgmt.Program.Main()
> > </CODE>
> >
> > I am using Windows Mobile 6 to attempt this.
> >
> > Thanks for any help... :)
>
>
>
Date:Fri, 17 Aug 2007 19:50:06 -0700
Author:
|
Re: Call a windows service on pc while cradled
When the device is connected via the cradle you effectively have a local
network and the PC is another machine on the network which acts as the
gateway.
--
Simon Hart
http://simonrhart.blogspot.com
"webdink" wrote:
> I suppose being cradled has no effect on the ability to make the call to the
> windows service on the desktop. I can certainly use a web service to handle
> this and likely run all of the code from the web service and eliminate the
> windows service. Just figured I would give the windows service "route" a
> whirl first.
>
> Thanks for the assistance.
>
> "<ctacke/>" wrote:
>
> > You need a "listener" app on the PC that will receive commands (likely TCP)
> > from the device and then act on them. You can't directly "call" the PC, not
> > can you run a batch file on the device (as it has no command processor).
> >
> >
> > --
> >
> > Chris Tacke, Embedded MVP
> > OpenNETCF Consulting
> > Managed Code in an Embedded World
> > www.OpenNETCF.com
> >
> >
> > "webdink" wrote in message
> > news:5E670231-D7D9-4262-B503-7525DD176E87@microsoft.com...
> > >I have need to call a windows service on the PC while the device is
> > >cradled.
> > > Essentially I have a windows service that handles creating a file that I
> > > need
> > > to transfer to the device. I need the windows service for this as the
> > > file
> > > to be transferred is an sdf and is created and populated by the windows
> > > service from a very large XML file.
> > >
> > > I have tried several variations of the Process and ProcessInfo classes to
> > > accomplish this but continuessly get the following error.
> > >
> > > <CODE>
> > > [8/17/07 4:18:02 PM]:Attempt to execute the windows service on the PC
> > > failed.
> > > [8/17/07 4:18:05 PM]:Win32Exception
> > > [8/17/07 4:18:05 PM]:at
> > > System.Diagnostics.Process.StartWithShellExecuteEx()
> > > at System.Diagnostics.Process.Start()
> > > at System.Diagnostics.Process.Start()
> > > at Xterprise.Wellspan.AssetMgmt.WSEquipmentTransfer.SyncData()
> > > at Xterprise.Wellspan.AssetMgmt.frmMain.mnuSync_Click()
> > > at System.Windows.Forms.MenuItem.OnClick()
> > > at System.Windows.Forms.Menu.ProcessMnuProc()
> > > at System.Windows.Forms.Form.WnProc()
> > > at System.Windows.Forms.Control._InternalWnProc()
> > > at Microsoft.AGL.Forms.EVL.EnterMainLoop()
> > > at System.Windows.Forms.Application.Run()
> > > at Xterprise.Wellspan.AssetMgmt.StubForm..ctor()
> > > at Xterprise.Wellspan.AssetMgmt.Program.Main()
> > > </CODE>
> > >
> > > I am using Windows Mobile 6 to attempt this.
> > >
> > > Thanks for any help... :)
> >
> >
> >
Date:Sat, 18 Aug 2007 03:12:02 -0700
Author:
|