Hello everyone,

Need to access the phone' log history - Incoming, outgoing, missed etc.

I cannot find any info accept for MSDN showing P/Invoke. Downloaded a VS
solution which has both C# and a VB project. Both compile and run but the
Phone test shows incorrect info! This application was created with 2003. The
only thing it does do correct is how many records there are (used a loop
with different amount of log entries).

I have waded through lots of web sites and have found no new material -
everyone points to the msdn article/sample which does not work. Anyone
knowing how to accomplish this task or know of a resource please let me
know!

-James

Re: Phone logs by Christopher

Christopher
Tue Feb 12 22:13:05 CST 2008

Hi,

"James" <james_devitt@hotmail.comi> wrote in message
news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a VS
> solution which has both C# and a VB project. Both compile and run but the
> Phone test shows incorrect info!

As far as I know that is the only way to do it (call PhoneOpenCallLog etc).

When you say the information is incorrect what do you mean? Is the entire
structure showing wrong values, or is this something isolated to one or two
fields, such as the phone number, or a timestamp being incorrect?

Does this happen in a phone enabled emulator or only on an actual device?

Hope this helps,
Christopher Fairbairn


Re: Phone logs by James

James
Wed Feb 13 09:09:57 CST 2008

"Christopher Fairbairn" <christopher@christec.co.nz> wrote in message
news:B1BBF024-84C8-4E8D-8414-F08953C65A6A@microsoft.com...
> Hi,
>
> "James" <james_devitt@hotmail.comi> wrote in message
> news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
>> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a VS
>> solution which has both C# and a VB project. Both compile and run but the
>> Phone test shows incorrect info!
>
> As far as I know that is the only way to do it (call PhoneOpenCallLog
> etc).
>
> When you say the information is incorrect what do you mean? Is the entire
> structure showing wrong values, or is this something isolated to one or
> two fields, such as the phone number, or a timestamp being incorrect?
>
> Does this happen in a phone enabled emulator or only on an actual device?
>
> Hope this helps,
> Christopher Fairbairn


Hello Christopher,
None of the structure is correct. Only the number of records was correct.
Here is the link to the code downloaded from MSDN
http://msdn.microsoft.com/msdnmag/issues/04/10/NET/ go to the bottom of this
page and you will see the code link (NETColumn0410.exe).

There is a function there that passes back an array of typed records. Using
For Each I use name and number which are wrong for each record. I remove a
log entry from my phone and the loop is correct but all fields are wrong!

I have looked at the structure and it looks correct. I used an emulator
using 2003 and also my device with is an HTC Touch with WM6. WM6 would make
sense but not the 2003 as the code is from vs2003.

Any thoughts you have would be very very helpful.


-James


Re: Phone logs by Peter

Peter
Wed Feb 13 10:52:57 CST 2008

That code doesn't include call log. Can you post your definition of
CALLLOGENTRY and the code you are using to call it.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

"James" <james_devitt@hotmail.comi> wrote in message
news:0822DF63-C074-4287-823C-5CF97391F9EA@microsoft.com...
> "Christopher Fairbairn" <christopher@christec.co.nz> wrote in message
> news:B1BBF024-84C8-4E8D-8414-F08953C65A6A@microsoft.com...
>> Hi,
>>
>> "James" <james_devitt@hotmail.comi> wrote in message
>> news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
>>> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a VS
>>> solution which has both C# and a VB project. Both compile and run but
>>> the Phone test shows incorrect info!
>>
>> As far as I know that is the only way to do it (call PhoneOpenCallLog
>> etc).
>>
>> When you say the information is incorrect what do you mean? Is the entire
>> structure showing wrong values, or is this something isolated to one or
>> two fields, such as the phone number, or a timestamp being incorrect?
>>
>> Does this happen in a phone enabled emulator or only on an actual device?
>>
>> Hope this helps,
>> Christopher Fairbairn
>
>
> Hello Christopher,
> None of the structure is correct. Only the number of records was correct.
> Here is the link to the code downloaded from MSDN
> http://msdn.microsoft.com/msdnmag/issues/04/10/NET/ go to the bottom of
> this page and you will see the code link (NETColumn0410.exe).
>
> There is a function there that passes back an array of typed records.
> Using For Each I use name and number which are wrong for each record. I
> remove a log entry from my phone and the loop is correct but all fields
> are wrong!
>
> I have looked at the structure and it looks correct. I used an emulator
> using 2003 and also my device with is an HTC Touch with WM6. WM6 would
> make sense but not the 2003 as the code is from vs2003.
>
> Any thoughts you have would be very very helpful.
>
>
> -James


Re: Phone logs by James

James
Wed Feb 13 11:20:20 CST 2008

Hello Peter,

I used code from MSDN. In my app I just imported the 3 class files to run
Phone.vb. Please see

http://msdn.microsoft.com/msdnmag/issues/04/10/NET/ go to the bottom of this
page and you will see the code link (NETColumn0410.exe).

Note, in my 2003 emulator I recd "12/31/00 5:00:00PM" for all records and
"12/31/00 4:00:00PM" on my touch/wm6 - perhaps not significant but the only
thing I can add.

Found different sources for the structure but all are the same!
Experimenting with the structure after but made no head way. You will see it
can tell how many records there are, just not translating the info. In the
structure you will see the filetime is the first field and it is incorrect
too!

I thought the cbsize was wrong as it is declared Integer - maybe its should
be int16 so I tried it and also int32 - no difference?!

There must be a way!!!

-James





"Peter Foot" <feedback@nospam-inthehand.com> wrote in message
news:FBF354D3-5DF2-4745-B73F-4B344108E9D5@microsoft.com...
> That code doesn't include call log. Can you post your definition of
> CALLLOGENTRY and the code you are using to call it.
>
> Peter
>
> --
> Peter Foot
> Microsoft Device Application Development MVP
> www.peterfoot.net | www.inthehand.com
> In The Hand Ltd - .NET Solutions for Mobility
>
> "James" <james_devitt@hotmail.comi> wrote in message
> news:0822DF63-C074-4287-823C-5CF97391F9EA@microsoft.com...
>> "Christopher Fairbairn" <christopher@christec.co.nz> wrote in message
>> news:B1BBF024-84C8-4E8D-8414-F08953C65A6A@microsoft.com...
>>> Hi,
>>>
>>> "James" <james_devitt@hotmail.comi> wrote in message
>>> news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
>>>> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a
>>>> VS solution which has both C# and a VB project. Both compile and run
>>>> but the Phone test shows incorrect info!
>>>
>>> As far as I know that is the only way to do it (call PhoneOpenCallLog
>>> etc).
>>>
>>> When you say the information is incorrect what do you mean? Is the
>>> entire structure showing wrong values, or is this something isolated to
>>> one or two fields, such as the phone number, or a timestamp being
>>> incorrect?
>>>
>>> Does this happen in a phone enabled emulator or only on an actual
>>> device?
>>>
>>> Hope this helps,
>>> Christopher Fairbairn
>>
>>
>> Hello Christopher,
>> None of the structure is correct. Only the number of records was correct.
>> Here is the link to the code downloaded from MSDN
>> http://msdn.microsoft.com/msdnmag/issues/04/10/NET/ go to the bottom of
>> this page and you will see the code link (NETColumn0410.exe).
>>
>> There is a function there that passes back an array of typed records.
>> Using For Each I use name and number which are wrong for each record. I
>> remove a log entry from my phone and the loop is correct but all fields
>> are wrong!
>>
>> I have looked at the structure and it looks correct. I used an emulator
>> using 2003 and also my device with is an HTC Touch with WM6. WM6 would
>> make sense but not the 2003 as the code is from vs2003.
>>
>> Any thoughts you have would be very very helpful.
>>
>>
>> -James
>

Re: Phone logs by Peter

Peter
Wed Feb 13 12:20:42 CST 2008

I couldn't see anything int that source other than power management etc
functionality. You may want to give the Evaluation version of our library a
try which has a managed wrapper for the Call History -
http://inthehand.com/content/Mobile.aspx
InTheHand.WindowsMobile.Telephony.CallHistory class.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

"James" <james_devitt@hotmail.comi> wrote in message
news:F7B27214-6564-4969-B38B-488FF522E337@microsoft.com...
> Hello Peter,
>
> I used code from MSDN. In my app I just imported the 3 class files to run
> Phone.vb. Please see
>
> http://msdn.microsoft.com/msdnmag/issues/04/10/NET/ go to the bottom of
> this
> page and you will see the code link (NETColumn0410.exe).
>
> Note, in my 2003 emulator I recd "12/31/00 5:00:00PM" for all records and
> "12/31/00 4:00:00PM" on my touch/wm6 - perhaps not significant but the
> only thing I can add.
>
> Found different sources for the structure but all are the same!
> Experimenting with the structure after but made no head way. You will see
> it can tell how many records there are, just not translating the info. In
> the structure you will see the filetime is the first field and it is
> incorrect too!
>
> I thought the cbsize was wrong as it is declared Integer - maybe its
> should be int16 so I tried it and also int32 - no difference?!
>
> There must be a way!!!
>
> -James
>
>
>
>
>
> "Peter Foot" <feedback@nospam-inthehand.com> wrote in message
> news:FBF354D3-5DF2-4745-B73F-4B344108E9D5@microsoft.com...
>> That code doesn't include call log. Can you post your definition of
>> CALLLOGENTRY and the code you are using to call it.
>>
>> Peter
>>
>> --
>> Peter Foot
>> Microsoft Device Application Development MVP
>> www.peterfoot.net | www.inthehand.com
>> In The Hand Ltd - .NET Solutions for Mobility
>>
>> "James" <james_devitt@hotmail.comi> wrote in message
>> news:0822DF63-C074-4287-823C-5CF97391F9EA@microsoft.com...
>>> "Christopher Fairbairn" <christopher@christec.co.nz> wrote in message
>>> news:B1BBF024-84C8-4E8D-8414-F08953C65A6A@microsoft.com...
>>>> Hi,
>>>>
>>>> "James" <james_devitt@hotmail.comi> wrote in message
>>>> news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
>>>>> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a
>>>>> VS solution which has both C# and a VB project. Both compile and run
>>>>> but the Phone test shows incorrect info!
>>>>
>>>> As far as I know that is the only way to do it (call PhoneOpenCallLog
>>>> etc).
>>>>
>>>> When you say the information is incorrect what do you mean? Is the
>>>> entire structure showing wrong values, or is this something isolated to
>>>> one or two fields, such as the phone number, or a timestamp being
>>>> incorrect?
>>>>
>>>> Does this happen in a phone enabled emulator or only on an actual
>>>> device?
>>>>
>>>> Hope this helps,
>>>> Christopher Fairbairn
>>>
>>>
>>> Hello Christopher,
>>> None of the structure is correct. Only the number of records was
>>> correct. Here is the link to the code downloaded from MSDN
>>> http://msdn.microsoft.com/msdnmag/issues/04/10/NET/ go to the bottom of
>>> this page and you will see the code link (NETColumn0410.exe).
>>>
>>> There is a function there that passes back an array of typed records.
>>> Using For Each I use name and number which are wrong for each record. I
>>> remove a log entry from my phone and the loop is correct but all fields
>>> are wrong!
>>>
>>> I have looked at the structure and it looks correct. I used an emulator
>>> using 2003 and also my device with is an HTC Touch with WM6. WM6 would
>>> make sense but not the 2003 as the code is from vs2003.
>>>
>>> Any thoughts you have would be very very helpful.
>>>
>>>
>>> -James
>>


Food for Thought Re: Phone logs by James

James
Wed Feb 13 12:43:26 CST 2008

Hello Peter,
Came across some interesting info. My assumption is the structure is
correct.

TimeStamp is in fact
int64 -->>>http://msdn2.microsoft.com/en-us/library/ms724284.aspx

Placement of the timestamp sounds to easy (place these four bytes in the
front?!)... given the fact this is compact .net, perhaps it is in a
different format? I was looking over the page at
http://msdn2.microsoft.com/en-us/library/aa446536.aspx#netcfintrotointerp_topic3
(Marshaling Data) and found the following:

"
...
In the case of
System.Char
and
System.String,
this is due to the fact that, as mentioned previously, the .NET Compact
Framework only supports Unicode, and so the marshaler always marshals the
former as a 2-byte Unicode char and the latter as a Unicode array. In the
case of
System.Boolean
, the .NET Compact Framework marshaler uses a 1-byte integer value, whereas
the full .NET framework uses a 4-byte integer value.

Warning Although
System.String
is a blittable type in the .NET Compact Framework, it is not blittable when
used inside a complex object, such as a structure or class. This situation
will be explored in detail in a later paper.
"

-James


"Peter Foot" <feedback@nospam-inthehand.com> wrote in message
news:FBF354D3-5DF2-4745-B73F-4B344108E9D5@microsoft.com...
> That code doesn't include call log. Can you post your definition of
> CALLLOGENTRY and the code you are using to call it.
>
> Peter
>
> --
> Peter Foot
> Microsoft Device Application Development MVP
> www.peterfoot.net | www.inthehand.com
> In The Hand Ltd - .NET Solutions for Mobility
>
> "James" <james_devitt@hotmail.comi> wrote in message
> news:0822DF63-C074-4287-823C-5CF97391F9EA@microsoft.com...
>> "Christopher Fairbairn" <christopher@christec.co.nz> wrote in message
>> news:B1BBF024-84C8-4E8D-8414-F08953C65A6A@microsoft.com...
>>> Hi,
>>>
>>> "James" <james_devitt@hotmail.comi> wrote in message
>>> news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
>>>> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a
>>>> VS solution which has both C# and a VB project. Both compile and run
>>>> but the Phone test shows incorrect info!
>>>
>>> As far as I know that is the only way to do it (call PhoneOpenCallLog
>>> etc).
>>>
>>> When you say the information is incorrect what do you mean? Is the
>>> entire structure showing wrong values, or is this something isolated to
>>> one or two fields, such as the phone number, or a timestamp being
>>> incorrect?
>>>
>>> Does this happen in a phone enabled emulator or only on an actual
>>> device?
>>>
>>> Hope this helps,
>>> Christopher Fairbairn
>>
>>
>> Hello Christopher,
>> None of the structure is correct. Only the number of records was correct.
>> Here is the link to the code downloaded from MSDN
>> http://msdn.microsoft.com/msdnmag/issues/04/10/NET/ go to the bottom of
>> this page and you will see the code link (NETColumn0410.exe).
>>
>> There is a function there that passes back an array of typed records.
>> Using For Each I use name and number which are wrong for each record. I
>> remove a log entry from my phone and the loop is correct but all fields
>> are wrong!
>>
>> I have looked at the structure and it looks correct. I used an emulator
>> using 2003 and also my device with is an HTC Touch with WM6. WM6 would
>> make sense but not the 2003 as the code is from vs2003.
>>
>> Any thoughts you have would be very very helpful.
>>
>>
>> -James
>

Re: Phone logs by James

James
Wed Feb 13 12:56:36 CST 2008

My mistake Peter, the msdn code in question comes from
http://msdn2.microsoft.com/en-us/library/aa446550.aspx at the top click down
load sample. Sample includes:

Input
Memory
Memory Status
Performance Counters
Power Status
SIP
System Reset
System Time
Wave Out
Wave In
Windows
Registry
Phone
Folders
Keyboard

How does the structure there compare to what you use?


-James


"James" <james_devitt@hotmail.comi> wrote in message
news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
> Hello everyone,
>
> Need to access the phone' log history - Incoming, outgoing, missed etc.
>
> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a VS
> solution which has both C# and a VB project. Both compile and run but the
> Phone test shows incorrect info! This application was created with 2003.
> The only thing it does do correct is how many records there are (used a
> loop with different amount of log entries).
>
> I have waded through lots of web sites and have found no new material -
> everyone points to the msdn article/sample which does not work. Anyone
> knowing how to accomplish this task or know of a resource please let me
> know!
>
> -James


Re: Phone logs by James

James
Thu Feb 14 16:33:05 CST 2008

Thanks Peter, got it running, whew.



"James" <james_devitt@hotmail.comi> wrote in message
news:FE24C5BA-4A37-4398-9A0E-2DF528439E34@microsoft.com...
> My mistake Peter, the msdn code in question comes from
> http://msdn2.microsoft.com/en-us/library/aa446550.aspx at the top click
> down load sample. Sample includes:
>
> Input
> Memory
> Memory Status
> Performance Counters
> Power Status
> SIP
> System Reset
> System Time
> Wave Out
> Wave In
> Windows
> Registry
> Phone
> Folders
> Keyboard
>
> How does the structure there compare to what you use?
>
>
> -James
>
>
> "James" <james_devitt@hotmail.comi> wrote in message
> news:4F6149BD-6A4C-4D81-85B8-0C132A5F66C7@microsoft.com...
>> Hello everyone,
>>
>> Need to access the phone' log history - Incoming, outgoing, missed etc.
>>
>> I cannot find any info accept for MSDN showing P/Invoke. Downloaded a VS
>> solution which has both C# and a VB project. Both compile and run but the
>> Phone test shows incorrect info! This application was created with 2003.
>> The only thing it does do correct is how many records there are (used a
>> loop with different amount of log entries).
>>
>> I have waded through lots of web sites and have found no new material -
>> everyone points to the msdn article/sample which does not work. Anyone
>> knowing how to accomplish this task or know of a resource please let me
>> know!
>>
>> -James
>