Blog Stats
  • Posts - 132
  • Articles - 0
  • Comments - 28
  • Trackbacks - 0

 

Back Chat

On Friday,  I needed a way for a Windows Mobile device connected via USB cable to Active-Sync/Windows Mobile Device Centre (WMDC)  to talk back to the local web-server running on the host PC.

I’d never done this before,  it suddenly struck me,  what IP address do I need to talk to? More importantly how could this IP address be obtained on the connecting device.

Here’s the solution -

System.Net.IPAddress ip = Dns.GetHostEntry("ppp_peer").AddressList[0];

This will always give you a reference to the attached machine.

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © Richard Jones