Disable "Receive all incoming beams"

  • Thread starter Thread starter maderjc
  • Start date Start date
M

maderjc

Ok I am trying to enable and disable the "Receive all incoming
beams" so that I can use the OpenNETCF port. I am able to update the
registry to make sure that the "IsEnabled" key if 0 'false' when I
open the port. And then return it back to it pervious state when I
close the port.

Below shows the registry entry I am looking at.

subKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Obex",
true);

if (subKey != null && subKey.ValueCount > 0)
{
subKey.SetValue("IsEnabled", iBeamValue);
}
if (subKey != null)
{
subKey.Close();
Registry.LocalMachine.Close();
}


But when I change the "IsEnabled" from 1 'true' to 0
'false' right before I open the port I receive an error that the
port is busy (OpenNETCF.IO.Serial.CommPortException:CreateFile Failed:
55). I look at the registry with a RegEdit utility and it shows the
value at 0 'false'.

So where am I going wrong?
Do I need to refresh the registry after I update the value? How would
I do that?
Am I looking at the wrong registry entry?
Does OpenNETCF port not use the registry to see in the Beams are
enabled?

I am using a Dell Axim x50 running Window Mobile 2003.

Thanks,
Jason
 
That registry entry is documented as indicating the status of the server,
but that doesn't mean that there's some sort of instantaneous connection
between the registry entry and the server. Changing a registry entry never,
by itself, stops or starts a server. I think that what you want to do is
stop the server entirely. If you can live with that, look up activating a
service programmatically...

Paul T.
 
Back
Top