473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

What values I should use?!

I use this codes for receving SMS inside a managed app. by C#.net (Compact
Framework - Pocket PC 2003):
private static string SMS_MSGTYPE_TEXT = "Microsoft Text SMS
Protocol";
private static long SMS_MODE_RECEIVE = 0x00000002;

[DllImport("sms.dll")]
private static extern IntPtr SmsOpen(String ptsMessageProtocol,
IntPtr dwMessageModes, ref IntPtr psmshHandle, IntPtr
phMessageAvailableEvent);

[DllImport("sms.dll")]
private static extern IntPtr SmsReadMessage(String smshHandle,
long psmsaSMSCAddress, string psmsaSourceAddress, long pstReceiveTime, byte
pbBuffer, long dwBufferSize, long pbProviderSpecificBuffer, long
dwProviderSpecificDataBuffer, long pdwBytesRead);

[DllImport("sms.dll")]
private static extern IntPtr SmsClose(IntPtr smshHandle);

and this function for receiving:

public static void ReadSMS()
{
IntPtr hSms = IntPtr.Zero;
IntPtr res = SmsOpen(SMS_MSGTYPE_TEXT,
(IntPtr)SMS_MODE_RECEIVE, ref hSms, IntPtr.Zero);
if (res != IntPtr.Zero)
{
MessageBox.Show("Can't open sms!");
}
else
{
MessageBox.Show(" sms");
IntPtr resMS = SmsReadMessage(?,?,?, ?, ?,?,?,?,?);
if (resMS != IntPtr.Zero)
{
MessageBox.Show("Can't Recive SMS");
}
else
{
MessageBox.Show(?); //? should carry the message
of sms
}
SmsClose(hSms);
}
}

I think you understand my problem, I don't know hat valuse I should use for
SmsReadMessage function.
(Sms open successfuly but can't receive)

Aug 17 '06 #1
0 1362

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

86
by: Michael Kalina | last post by:
Because when I asked for comments on my site-design (Remember? My site, your opinion!) some of you told me never to change anything on font-sizes! What do you guys think of that:...
9
by: datastructure | last post by:
Copyright (c) 2003 by James J. Perry. All Rights Reserved. char Square::validList = {'r', 'g', 'b'}; //missing an element, is 0 int Square::numValues = 3; Square::Square() { value =...
5
by: Jerzy Karczmarczuk | last post by:
I thought that the following sequence gl=0 def gen(x): global gl gl=x yield x s=gen(1)
51
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
39
by: VidTheKid | last post by:
THE PROBLEM The % symbol is too vague when defining dimensions in CSS and HTML. It can relate to an inherited value, a measure of the containing element (which can differ between box models) or...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
2
by: riceyeh | last post by:
Hi, What does <xsl:if test="not($values)"mean? What I do not understand is $values? Here, means array? And . = $value means current node is equal to the variable value? So the total meaning is...
3
ADezii
by: ADezii | last post by:
Null as it relates to database development is one of life's little mysteries and a topic of total confusion for novices who venture out into the database world. A Null Value is not zero (0), a zero...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.