Oh, and one more thing... if you connect/disconnect a USB AND charger
(combo USB cable), you'll get two notifications per action, one for
the USB and one for the charger.


On Thu, Jul 31, 2008 at 1:29 PM, Jeff Loucks <[EMAIL PROTECTED]> wrote:
> A quick test with a TX tells me that notifyDetailsP doesn't point to
> the 16 bit value value, it IS the 16 bit value cast as a 32 bit
> pointer. Simply use (UInt16)notifyParamsP->notifyDetailsP.
>
> BTW, be sure to check notifyParamsP->notifyType is the correct
> notification in your handler.
>
> On Thu, Jul 31, 2008 at 12:34 PM, Jeff Loucks <[EMAIL PROTECTED]> wrote:
>> RE: UserDataP - I meant notifyDetailsP, and the Palm docs say it
>> points to a UInt16 value - like I said, a quick test will tell you.
>>
>> On Thu, Jul 31, 2008 at 12:31 PM, Jeff Loucks <[EMAIL PROTECTED]> wrote:
>>> According to "Palm Developer Guide, Palm OS Platform, Rev. F [page]
>>> 39", the following devices will send these values;
>>>
>>> DEVICES: Treo™ 650, Treo™ 680, Treo™ 700p, and Treo™ 755p smartphones,
>>> Tungsten™ T5 and Tungsten™ E2 handhelds and LifeDrive™ mobile managers
>>>
>>> VALUES: Power notification == 0x0008. Serial notification == 0x0040,
>>> USB notification == 0x0010
>>>
>>> Further discussed at "Palm Developer Guide, Palm OS Platform, Rev. F
>>> [page] 287".
>>>
>>> I believe the UserDataP doesn't point to anything. Instead, the value
>>> is passed cast as a pointer. Casting it back to UInt16 should give you
>>> the correct value. A quick test would tell you.
>>>
>>> On Thu, Jul 31, 2008 at 11:15 AM, Christopher Stamper
>>> <[EMAIL PROTECTED]> wrote:
>>>>
>>>> I'm writing an application that uses the sysExternalConnectorAttachEvent 
>>>> notification. When I respond to the notification, I need to determine what 
>>>> kind of device was connected.
>>>>
>>>> The docs say:
>>>>
>>>> "The notifyDetailsP field points to a UInt16 that identifies which type of 
>>>> device was attached."
>>>>
>>>> So, I've done something like this in PilotMain:
>>>>
>>>> UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
>>>> {
>>>>
>>>> UInt16     DeviceType = 1;
>>>>
>>>> switch (cmd)
>>>> {
>>>>      case sysAppLaunchCmdNotify:
>>>>           If (((SysNotifyParamType*)cmdPBP)->notifyDetailsP == &DeviceType)
>>>>                //Do action for that device 1
>>>>           and so on...
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>> Is this how I should do it?
>>>>
>>>>  If so, what values should I use for DeviceType? I've searched the 
>>>> headers, and I can't find any references to this. Shouldn't there be some 
>>>> constants that I can use? Or do I really have to use the trail-and-error 
>>>> method for determining device type numbers(isn't working so far)?
>>>>
>>>> Basically, I only want to be sure that the device is a sync cable (usb, 
>>>> serial, etc) and not just a charger/modem/whatever else.
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> Christopher Stamper
>>>>
>>>> Email: [EMAIL PROTECTED]
>>>> Web: http://tinyurl.com/2ooncg
>>>> gTalk: http://tinyurl.com/6e359r
>>>> Skype: cdstamper
>>>>
>>>> --
>>>> For information on using the ACCESS Developer Forums, or to unsubscribe, 
>>>> please see http://www.access-company.com/developers/forums/
>>>
>>>
>>> --
>>> [Jeff Loucks, Gig Harbor, WA, USA]
>>>
>>> Power notification == 0x0008
>>>
>>> Serial notification == 0x0040
>>>
>>> USB notification == 0x0010
>>>
>>> As of that document, these devices;
>>>
>>> --
>>> For information on using the ACCESS Developer Forums, or to unsubscribe, 
>>> please see http://www.access-company.com/developers/forums/
>>>
>>
>>
>>
>> --
>> [Jeff Loucks, Gig Harbor, WA, USA]
>>
>> --
>> For information on using the ACCESS Developer Forums, or to unsubscribe, 
>> please see http://www.access-company.com/developers/forums/
>>
>
>
>
> --
> [Jeff Loucks, Gig Harbor, WA, USA]
>
> --
> For information on using the ACCESS Developer Forums, or to unsubscribe, 
> please see http://www.access-company.com/developers/forums/
>



-- 
[Jeff Loucks, Gig Harbor, WA, USA]

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to