Hi,
I'm trying to change the dial type of the modem connection through my
program.
Some settings, like redial count, are changing just like I need, but the
dial type really doesn't work.
I can't use the connection manager (cause the program is for palmOS 2.0), so
I'm using the Net Library. Accordingly to the documentation, the function
NetLibIFSettingSet() should help me, but...
The function always return 0 (success) and really changes the settings -
except PulseDial.
My code:
Err func()
{
Word ifErrs;
Err err;
DWord ifCreator;
Word ifInstance;
Byte value;
Word wval;
Word size;
char sn[32];
sn[0] = '\0';
err = SysLibFind("Net.lib", &AppNetRefnum);
if (err) return err;
err = NetLibIFGet(AppNetRefnum, 0, &ifCreator, &ifInstance);
if (err) return err;
value = 1;
size = sizeof(value);
// I dont know if this is needed...
err = NetLibIFSettingSet(AppNetRefnum, ifCreator, ifInstance,
netIFSettingUseModem, &value, size);
if (err) return err;
// Set pulse dial.
err = NetLibIFSettingSet(AppNetRefnum, ifCreator, ifInstance,
netIFSettingPulseDial, &value, size);
if (err) return err;
// just to see if the value I've put is ok, and it's always ok...
err = NetLibIFSettingGet(AppNetRefnum, ifCreator, ifInstance,
netIFSettingPulseDial, &value, &size);
if (err) return err;
// Set redial count = 3.
wval = 3;
size = sizeof(wval);
err = NetLibIFSettingSet(AppNetRefnum, ifCreator, ifInstance,
netIFSettingRedialCount, &wval, size);
if (err) return err;
// Set service name "test".
StrCopy(sn, "test");
err = NetLibIFSettingSet(AppNetRefnum, ifCreator, ifInstance,
netIFSettingServiceName, sn, 32);
if (err) return err;
// Connect... it performs a tone dial... sh**!!
err = NetLibOpen(AppNetRefnum, &ifErrs);
...
}
I'm using a PalmIII device.
Any idea would be very useful...
Thanks,
Marcio Ballo
PS. thanks for the help about Palm devices speed!! that was exactly what I
was looking for!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html