×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    May 2007
    Posts
    320

    Is there any error in the given Wiki page

    Hello friends,
    I am using the http://wiki.forum.nokia.com/index.ph...n_Exe_(Server) example for server message purpose. But when I am creating application in Console & add the code in SMSBYEXE.cpp file then I am getting error at the following lines.
    Code:
    //  Include Files  
     
    #include "SmsByExe.h"
    #include <e32base.h>
    #include <e32std.h>
    #include "SMSHandler.h"
     
     
    //  Local Functions
    LOCAL_C void MainL()
    {
        //
        // add your program code here, example code below
        //
    	//This is for initializing SMSHandler
    	iSmsHandler = CSmsHandler::NewL(); //error1
            SendSMSL();//error2
    }
     
     
    LOCAL_C void DoStartL()
    {
        // Create active scheduler (to run active objects)
        CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
        CleanupStack::PushL(scheduler);
        CActiveScheduler::Install(scheduler);
     
        MainL();
        
        CActiveScheduler::Start();
     
        // Delete active scheduler
        CleanupStack::PopAndDestroy(scheduler);
    }
     
    LOCAL_C void SendSMSL()
    {
    	TBuf<128> SMSText,PhoneNumber;
    	SMSText.Copy(_L("SMS By An EXE"));
            // Replace the number you wish to send message
    	PhoneNumber.Copy(_L("9999999999")); 	
    	iSmsHandler->SendL( PhoneNumber, SMSText) ; //Error3
    }
     
    //  Global Functions
    GLDEF_C TInt E32Main()
    {
        // Create cleanup stack
        __UHEAP_MARK;
        CTrapCleanup* cleanup = CTrapCleanup::New();
     
        // Run application code inside TRAP harness, wait keypress when terminated
        TRAPD(mainError, DoStartL());
     
        delete cleanup;
        __UHEAP_MARKEND;
        return KErrNone;
    }
    As this file is not having its own .h file (SMSBYEXE.h) I can't do forward declaration for smshandler class & I can't declare variable for that class. Can I add this code in appui file so that it will work.
    I want to do sms work through server so I am checking this example for that purpose.
    Please guide me so that I can remove this error.
    Waiting for your reply.
    Thanks in advance.
    Regards,
    Ashfaque.
    Life is Short..... Live it with Positive Attitude...

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,538

    Re: Is there any error in the given Wiki page

    I found http://wiki.forum.nokia.com/index.php/SMS_Operations to be more descriptive and step-by-step.

  3. #3
    Regular Contributor
    Join Date
    May 2007
    Posts
    320

    Re: Is there any error in the given Wiki page

    Thanx Neil for your help. But I want application in Non-GUI based for that I am checking the given url. I have seen this url & its really good. I will try on that also but do you have any idea of doing SMS application in Non-GUI based format?
    Waiting for your reply.
    Thanks once again for your response.
    Ashfaque.
    Life is Short..... Live it with Positive Attitude...

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Is there any error in the given Wiki page

    I thought I made it clear while creating that article step-by-step, but anyways, I will add SMSByExe.h in that article. Note that it has no any specific header file. You just need to create simple "Basic console application(EXE)" project from Carbide.c++ project wizard.

    If you look carefully at the prerequisite section, the first line says all about this: http://wiki.forum.nokia.com/index.ph...)#Prerequisite

    PS: I just updated the article and it contains header file as well.
    Nokia Developer Wiki Moderation team

  5. #5
    Regular Contributor
    Join Date
    May 2007
    Posts
    320

    Re: Is there any error in the given Wiki page

    Hi Kiran,
    Previously I was doing some mistake at creating a project. But then also I got the errors & I removed that. I attach that code for SmsByExe.h file
    Code:
    #ifndef __SMSBYEXE_H__
    #define __SMSBYEXE_H__
    
    //  Include Files
    
    #include <e32base.h>
    
    class CSmsHandler;
    //  Function Prototypes
    
    GLDEF_C TInt E32Main();
    
    LOCAL_C void SendSMSL();
    
    CSmsHandler* iSmsHandler;
    
    #endif  // __SMSBYEXE_H__
    Please check this code & if u think its correct then please make changes to the wiki page.
    Please reply me your views.
    Regards,
    Ashfaque.
    Life is Short..... Live it with Positive Attitude...

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Is there any error in the given Wiki page

    Quote Originally Posted by ash_21 View Post
    Please check this code & if u think its correct then please make changes to the wiki page.
    Please reply me your views.
    Regards,
    Ashfaque.
    Hi Ashfaque,

    Wiki is for everyone. Anyone can edit the page to make it more better. Just go ahead and change the page. Make sure that you test it before making changes. It means that your changes should not break the whole thing to work.

    Cheers.
    Nokia Developer Wiki Moderation team

  7. #7
    Regular Contributor
    Join Date
    May 2007
    Posts
    320

    Re: Is there any error in the given Wiki page

    ok sir. I will do the changes.
    Life is Short..... Live it with Positive Attitude...

Similar Threads

  1. Forum Nokia NFC Wiki page renewed!
    By arip. in forum Near Field Communication
    Replies: 1
    Last Post: 2007-12-17, 16:54
  2. NFC Java Code Examples page on Forum Nokia Wiki
    By Raluca_ in forum Near Field Communication
    Replies: 4
    Last Post: 2007-11-27, 13:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×