Call a windows service on pc while cradled

G

Guest

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... :)
 
G

Guest

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();
 
I

Ilya Tumanov [MS]

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 said:
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 said:
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... :)
 
G

Guest

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
 
G

Guest

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.

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 said:
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... :)
 
G

Guest

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 said:
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.

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 said:
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... :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top