Writing my own Windows mobile 5.0 Phone Application

G

Guest

Hi,
I want to write an my own Windows mobile 5.0 Phone Application with two forms.

Form1: To make Call
contains 1 Text box and 2 Button ( 1 Call, 1 END Call)
The User enters the Phone No. in the Text Box and Clicks Call button to call
that mobile no... and he clicks the End Call button to Terminate the Call.

Form2: This Form is Displayed when the Phone Receives a Phone Call.
This has Two buttons...Accept Button to Accept the Phone Call and End button
to End the Phone Call before Accepting it or with out Accepting the phone
Call....

Can some one Tell me how to start with this Application.
I am new to TAPI....Any Sample code is very much appreciated.

Thanks in Advance,
Murthy
 
G

Guest

Unfortunaltely TAPI isn't so easy or so well documented. What I'd suggest
is that you first modify the dialer app to work in your region - that way
you have a base of (hopefully) known-good code. Once that is working, then
migrate to a managed solution that calls the same APIs with the same
parameters.

-Chris


Murthy said:
Thanks Chris for your Reply...
I know that we need to P/Invoke the OpenLine, MakeLineCall and other APIs
to
Make a Call....But i don't know the order and the Parameters that these
methods accepts....

I have only the below code...

[DllImport("coredll", SetLastError = true)]
public static extern int lineMakeCall(IntPtr hLine, out IntPtr
lphCall, string lpszDestAddress, int dwCountryCode, byte[] lpCallParams);

[DllImport("coredll", SetLastError = true)]
private static extern LineErrReturn lineGenerateDigits(IntPtr hCall,
int dwDigitMode, String lpszDigits, int dwDuration);

But i do not know how to call these....

I have come across a Telephone Dialer application (VC++) in the below
path.

http://msdn2.microsoft.com/en-us/library/ms880691.aspx

But this is not working for my country ( INDIA )....
Is there any similar C# Application or any other application which works
Globally.

Thanks in Advance,
Murthy

There are no TAPI classes included with the CF. You have to P/Invoke the
TAPI calls directly, or use a 3rd-party library such as this:

http://www.opennetcf.com/cf/products/telephony.ocf


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
 
G

Guest

Thanks Chris for your reply.
But I am a c# programmer i don't have much exposure to VC++....
Also i tried to modify the dialer app to work in our region (India) but it
is not working....I am not sure what are the modifications that i need to
do...Since i am a newbie to VC++ that task became even tougher.

Is there any other sample code snippet in c# or a code that works globally
in VC++ or C#....

Thanks
Murthy

Unfortunaltely TAPI isn't so easy or so well documented. What I'd suggest
is that you first modify the dialer app to work in your region - that way
you have a base of (hopefully) known-good code. Once that is working, then
migrate to a managed solution that calls the same APIs with the same
parameters.

-Chris


Murthy said:
Thanks Chris for your Reply...
I know that we need to P/Invoke the OpenLine, MakeLineCall and other APIs
to
Make a Call....But i don't know the order and the Parameters that these
methods accepts....

I have only the below code...

[DllImport("coredll", SetLastError = true)]
public static extern int lineMakeCall(IntPtr hLine, out IntPtr
lphCall, string lpszDestAddress, int dwCountryCode, byte[] lpCallParams);

[DllImport("coredll", SetLastError = true)]
private static extern LineErrReturn lineGenerateDigits(IntPtr hCall,
int dwDigitMode, String lpszDigits, int dwDuration);

But i do not know how to call these....

I have come across a Telephone Dialer application (VC++) in the below
path.

http://msdn2.microsoft.com/en-us/library/ms880691.aspx

But this is not working for my country ( INDIA )....
Is there any similar C# Application or any other application which works
Globally.

Thanks in Advance,
Murthy

There are no TAPI classes included with the CF. You have to P/Invoke the
TAPI calls directly, or use a 3rd-party library such as this:

http://www.opennetcf.com/cf/products/telephony.ocf


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


Hi,
I want to write an my own Windows mobile 5.0 Phone Application with two
forms.

Form1: To make Call
contains 1 Text box and 2 Button ( 1 Call, 1 END Call)
The User enters the Phone No. in the Text Box and Clicks Call button to
call
that mobile no... and he clicks the End Call button to Terminate the
Call.

Form2: This Form is Displayed when the Phone Receives a Phone Call.
This has Two buttons...Accept Button to Accept the Phone Call and End
button
to End the Phone Call before Accepting it or with out Accepting the
phone
Call....

Can some one Tell me how to start with this Application.
I am new to TAPI....Any Sample code is very much appreciated.

Thanks in Advance,
Murthy
 
G

Guest

You're going to have to get used to samples not always being in your
language of choice. Being a newbie is fine, but you have to learn some time
and now seems like a good place to start. The reality is that if you're
going to be doing complex P/Invoking you really need to understand how C/C++
works anyway or you'll simply be writing code based on guesswork, which is
near certain to fail and which you can't debug.

I know of existing TAPI code in C#, yes. It's the link I sent earlier to
the commercial product we sell. The fact that we spent time writing a
commercial product to do it should tell you that there probably aren't any
other good, free libraries out there, and that writing one is not simple.
If there were it would not have made sense for us to do it.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


Murthy said:
Thanks Chris for your reply.
But I am a c# programmer i don't have much exposure to VC++....
Also i tried to modify the dialer app to work in our region (India) but it
is not working....I am not sure what are the modifications that i need to
do...Since i am a newbie to VC++ that task became even tougher.

Is there any other sample code snippet in c# or a code that works globally
in VC++ or C#....

Thanks
Murthy

Unfortunaltely TAPI isn't so easy or so well documented. What I'd
suggest
is that you first modify the dialer app to work in your region - that way
you have a base of (hopefully) known-good code. Once that is working,
then
migrate to a managed solution that calls the same APIs with the same
parameters.

-Chris


Murthy said:
Thanks Chris for your Reply...
I know that we need to P/Invoke the OpenLine, MakeLineCall and other
APIs
to
Make a Call....But i don't know the order and the Parameters that these
methods accepts....

I have only the below code...

[DllImport("coredll", SetLastError = true)]
public static extern int lineMakeCall(IntPtr hLine, out IntPtr
lphCall, string lpszDestAddress, int dwCountryCode, byte[]
lpCallParams);

[DllImport("coredll", SetLastError = true)]
private static extern LineErrReturn lineGenerateDigits(IntPtr hCall,
int dwDigitMode, String lpszDigits, int dwDuration);

But i do not know how to call these....

I have come across a Telephone Dialer application (VC++) in the below
path.

http://msdn2.microsoft.com/en-us/library/ms880691.aspx

But this is not working for my country ( INDIA )....
Is there any similar C# Application or any other application which
works
Globally.

Thanks in Advance,
Murthy

:

There are no TAPI classes included with the CF. You have to P/Invoke
the
TAPI calls directly, or use a 3rd-party library such as this:

http://www.opennetcf.com/cf/products/telephony.ocf


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


Hi,
I want to write an my own Windows mobile 5.0 Phone Application with
two
forms.

Form1: To make Call
contains 1 Text box and 2 Button ( 1 Call, 1 END Call)
The User enters the Phone No. in the Text Box and Clicks Call button
to
call
that mobile no... and he clicks the End Call button to Terminate the
Call.

Form2: This Form is Displayed when the Phone Receives a Phone Call.
This has Two buttons...Accept Button to Accept the Phone Call and
End
button
to End the Phone Call before Accepting it or with out Accepting the
phone
Call....

Can some one Tell me how to start with this Application.
I am new to TAPI....Any Sample code is very much appreciated.

Thanks in Advance,
Murthy
 
G

Guest

Thanks Simon / Chris for your help.
i just started to write my own TAPI Wrapper.
Can you help me.
i am not able to find anywhere in what format i should send the
lpszDestAddress parameter for the linemakecall.

LONG lineMakeCall(
HLINE hLine,
LPHCALL lphCall,
LPCWSTR lpszDestAddress,
DWORD dwCountryCode,
LPLINECALLPARAMS const lpCallParams
);

it is just mentioned as "the standard dialable number format"
Can you tell me what this standard dialable number format is ??

Thanks in Advance,
Murthy


Simon Hart said:
As Chris posted, check out the OpenNETCF Telephoney library. I have written
my own TAPI library in pure C# as their was nothing around at the time.
Although I cannot share it as it doesn't belong to me, but this might help
you get started:
http://msdn2.microsoft.com/en-us/library/ms737219.aspx

It is no easy task, but once written it is well worth it.

Simon.

Murthy said:
Thanks Chris for your reply.
But I am a c# programmer i don't have much exposure to VC++....
Also i tried to modify the dialer app to work in our region (India) but it
is not working....I am not sure what are the modifications that i need to
do...Since i am a newbie to VC++ that task became even tougher.

Is there any other sample code snippet in c# or a code that works globally
in VC++ or C#....

Thanks
Murthy

Unfortunaltely TAPI isn't so easy or so well documented. What I'd suggest
is that you first modify the dialer app to work in your region - that way
you have a base of (hopefully) known-good code. Once that is working, then
migrate to a managed solution that calls the same APIs with the same
parameters.

-Chris


Thanks Chris for your Reply...
I know that we need to P/Invoke the OpenLine, MakeLineCall and other APIs
to
Make a Call....But i don't know the order and the Parameters that these
methods accepts....

I have only the below code...

[DllImport("coredll", SetLastError = true)]
public static extern int lineMakeCall(IntPtr hLine, out IntPtr
lphCall, string lpszDestAddress, int dwCountryCode, byte[] lpCallParams);

[DllImport("coredll", SetLastError = true)]
private static extern LineErrReturn lineGenerateDigits(IntPtr hCall,
int dwDigitMode, String lpszDigits, int dwDuration);

But i do not know how to call these....

I have come across a Telephone Dialer application (VC++) in the below
path.

http://msdn2.microsoft.com/en-us/library/ms880691.aspx

But this is not working for my country ( INDIA )....
Is there any similar C# Application or any other application which works
Globally.

Thanks in Advance,
Murthy

:

There are no TAPI classes included with the CF. You have to P/Invoke the
TAPI calls directly, or use a 3rd-party library such as this:

http://www.opennetcf.com/cf/products/telephony.ocf


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


Hi,
I want to write an my own Windows mobile 5.0 Phone Application with two
forms.

Form1: To make Call
contains 1 Text box and 2 Button ( 1 Call, 1 END Call)
The User enters the Phone No. in the Text Box and Clicks Call button to
call
that mobile no... and he clicks the End Call button to Terminate the
Call.

Form2: This Form is Displayed when the Phone Receives a Phone Call.
This has Two buttons...Accept Button to Accept the Phone Call and End
button
to End the Phone Call before Accepting it or with out Accepting the
phone
Call....

Can some one Tell me how to start with this Application.
I am new to TAPI....Any Sample code is very much appreciated.

Thanks in Advance,
Murthy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top