is dwp a pointer? | developer.brewmp.com is dwp a pointer? | developer.brewmp.com

Developer

is dwp a pointer?

Forums:

Hi, thank you for interest. I have some problem with sending event to my app.
i use func like this:
ISHELL_SendEvent(pMe->m_pIShell, 0x02009FF0,EVT_APP_MESSAGE, SMS_ENCODING_ASCII, (char*)STRCPY( gbuf,"sent event"));
I wanted to send EVT_APP_MESSAGE to my app and to screen "sent event" on the display. As i know the last parameter of ISHELL_SendEvent(IShell * po, AEECLSID clsApp,AEEEvent evt, uint16 wp, uint32) may be the pointer. And that's my way. But compiler said HELLO.c:155: warning: passing arg 6 of pointer to function makes integer from pointer without a cast. Can somebody give me a clue?

ISHELL_SendEvent(pMe->m_pIShell, 0x02009FF0,EVT_APP_MESSAGE, SMS_ENCODING_ASCII, (uint32)(char*)STRCPY( gbuf,"sent event"));

ISHELL_SendEvent(pMe->m_pIShell, 0x02009FF0,EVT_APP_MESSAGE, SMS_ENCODING_ASCII, (uint32)(char*)STRCPY( gbuf,"sent event"));

thank you widewave.
That string mean that parameter is uint32 that is a pointer (contain an adress) to a returned value of func strcpy?
As i can guess it is right to use just pointer to char buffer (uint32)gbuf?
Besides i have no idea about such thing that when i call
ITAPI_SendSMS(pApp->pITapi, 0, "Hello",0x02009FF0,MOSMSNotify,pApp);
i easely receive EVT_APP_MESAGE and get "Hello".
But in case
ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0,MOSMSNotify,pApp);
sms is not sending.
what's your oppinion?

thank you widewave.
That string mean that parameter is uint32 that is a pointer (contain an adress) to a returned value of func strcpy?
As i can guess it is right to use just pointer to char buffer (uint32)gbuf?
Besides i have no idea about such thing that when i call
ITAPI_SendSMS(pApp->pITapi, 0, "Hello",0x02009FF0,MOSMSNotify,pApp);
i easely receive EVT_APP_MESAGE and get "Hello".
But in case
ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0,MOSMSNotify,pApp);
sms is not sending.
what's your oppinion?

Hi Antsu,
ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0,MOSMSNotify,pApp);
here ur classID is 0.u have to specify the classId of ur receiving application.the first one is working b'caz there is classId.so make it as
ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0x02009FF0,MOSMSNotify,pApp);
I think it will work now.
Regards,
sharmila.

Hi Antsu,
ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0,MOSMSNotify,pApp);
here ur classID is 0.u have to specify the classId of ur receiving application.the first one is working b'caz there is classId.so make it as
ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0x02009FF0,MOSMSNotify,pApp);
I think it will work now.
Regards,
sharmila.

Hello, sharmila. Thank you. I read your posts on go4expert and sent a private message to u, because there was no your email.
You r right that instead of NULL i must use CLSID of my app, but it is only when i want to sent SMS to some app. When i use CLSID = 0x02009FF0 app sent "pseudo" SMS to itsself.
1. But then i wanted to send SMS to my another phone. I guess in this case CLSID may be = Null.
About your code:
static void sendNotifier(void* user,int status)
{
DBGPRINTF("inside function sendNotifier--%d",status);
switch(status)
{
case AEEMOSMS_ERR_NO_ERR:
STRCPY((char*)user,"Message send sucessesfully"); break;
case AEEMOSMS_ERR_OUTOF_RESOURCES:
default:
STRCPY((char*)user,"Unknown ERROR");

DBGPRINTF("end of fun.--%s",(char*)user);}
2. Where did you get error codes like AEEMOSMS_ERR_NO_ERR?
3. Besides, the last parameter of ITAPI_SendSMS is the user data ptr. In my case it's ptr to my structure. I suppose smthng less in it. Something necessary like TAPIStatus and etc.

Hello, sharmila. Thank you. I read your posts on go4expert and sent a private message to u, because there was no your email.
You r right that instead of NULL i must use CLSID of my app, but it is only when i want to sent SMS to some app. When i use CLSID = 0x02009FF0 app sent "pseudo" SMS to itsself.
1. But then i wanted to send SMS to my another phone. I guess in this case CLSID may be = Null.
About your code:
static void sendNotifier(void* user,int status)
{
DBGPRINTF("inside function sendNotifier--%d",status);
switch(status)
{
case AEEMOSMS_ERR_NO_ERR:
STRCPY((char*)user,"Message send sucessesfully"); break;
case AEEMOSMS_ERR_OUTOF_RESOURCES:
default:
STRCPY((char*)user,"Unknown ERROR");

DBGPRINTF("end of fun.--%s",(char*)user);}
2. Where did you get error codes like AEEMOSMS_ERR_NO_ERR?
3. Besides, the last parameter of ITAPI_SendSMS is the user data ptr. In my case it's ptr to my structure. I suppose smthng less in it. Something necessary like TAPIStatus and etc.

Repetition:
ITAPI_SendSMS(pApp->pITapi, number, sms,0,MOSMSNotify,pApp);
number is a buffer with MSISDN. When i send SMS (localy) to my own app i change number to NULL and 0 to 0x02009FF0. And it is working.
When i make a call to real phone number it is working. And app receive SUSPEND and RESUME events.
But in case of sending SMS to real phone number app did not get SUSPEND and RESUME.
pApp is ptr to my structure.
1. Notif. func. will receive this data, but what for?
If i know it may be i should know what it had to contain.
There is my noification function:
void MOSMSNotify( void *p, int result )
{
if ( result == SUCCESS )
{
DBGPRINTF("Success!");
AECHAR send[3];
IDISPLAY_DrawText(pMe->m_pIDisplay,
AEE_FONT_BOLD,
(AECHAR*)STRTOWSTR("ok", send, 6),
-1,
0,
2+(12*((*pApp->pint)++)),
NULL,
IDF_ALIGN_CENTER);
IDISPLAY_Update (pMe->m_pIDisplay);

else
{
DBGPRINTF("Failure &d", result );
AECHAR nsend[6];
IDISPLAY_DrawText(pMe->m_pIDisplay,
AEE_FONT_BOLD,
(AECHAR*)STRTOWSTR("error", nsend, 12),
-1,
0,
2+(12*((*pApp->pint)++)),
NULL,
IDF_ALIGN_CENTER);
IDISPLAY_Update (pMe->m_pIDisplay);

}
May be IDISPLAY will not work?
But it is not very important. In case app receive Suspend event it will create file and i will see that sms is send.
2. Why suspend evt is not sending to app?
May be it is a clue.

Repetition:
ITAPI_SendSMS(pApp->pITapi, number, sms,0,MOSMSNotify,pApp);
number is a buffer with MSISDN. When i send SMS (localy) to my own app i change number to NULL and 0 to 0x02009FF0. And it is working.
When i make a call to real phone number it is working. And app receive SUSPEND and RESUME events.
But in case of sending SMS to real phone number app did not get SUSPEND and RESUME.
pApp is ptr to my structure.
1. Notif. func. will receive this data, but what for?
If i know it may be i should know what it had to contain.
There is my noification function:
void MOSMSNotify( void *p, int result )
{
if ( result == SUCCESS )
{
DBGPRINTF("Success!");
AECHAR send[3];
IDISPLAY_DrawText(pMe->m_pIDisplay,
AEE_FONT_BOLD,
(AECHAR*)STRTOWSTR("ok", send, 6),
-1,
0,
2+(12*((*pApp->pint)++)),
NULL,
IDF_ALIGN_CENTER);
IDISPLAY_Update (pMe->m_pIDisplay);

else
{
DBGPRINTF("Failure &d", result );
AECHAR nsend[6];
IDISPLAY_DrawText(pMe->m_pIDisplay,
AEE_FONT_BOLD,
(AECHAR*)STRTOWSTR("error", nsend, 12),
-1,
0,
2+(12*((*pApp->pint)++)),
NULL,
IDF_ALIGN_CENTER);
IDISPLAY_Update (pMe->m_pIDisplay);

}
May be IDISPLAY will not work?
But it is not very important. In case app receive Suspend event it will create file and i will see that sms is send.
2. Why suspend evt is not sending to app?
May be it is a clue.

So,I think it is phone bug. And this command is not supported by my U105.
Besides, Such command as
ISHELL_SetTimer(pMe->m_pIShell, 1000, (PFNNOTIFY) NextFunction, (uint32*) pApp); is not work to. I'll discover it.

So,I think it is phone bug. And this command is not supported by my U105.
Besides, Such command as
ISHELL_SetTimer(pMe->m_pIShell, 1000, (PFNNOTIFY) NextFunction, (uint32*) pApp); is not work to. I'll discover it.