Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 335461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:09:04+00:00 2026-05-12T10:09:04+00:00

I am attempting to construct a very simple proof of concept that I can

  • 0

I am attempting to construct a very simple proof of concept that I can write a web service and actually call the service from a symbian environment. The service is a simple Hello service which takes a name in the form of a const char* and returns back a greeting of the form “hello ” + name in the form of a char*. My question is, how do I convert a char* to a TPtrC16 so that I can use the console->Write function to print out the response to screen? I know I could search through the API and figure this out, but for a basic conceptual demo I’d rather not spend the time (not sure that Symbian is something I will ever work with again).

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:09:04+00:00Added an answer on May 12, 2026 at 10:09 am

    If the const char* string is in US-ASCII, you can use TDes::Copy to copy it wrapped in a TPtrC8 to a 16-bit descriptor:

    const char *who = "world";
    TBuf<128> buf;
    buf.Copy(TPtrC8((TText8*)who));
    console->Printf(_L("hello %S\n"), &buf);
    

    If it is in some other encoding, have a look at the charconv API in the SDK help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to construct a web service that allows for RESTful requests to return
I'm attempting to write a simple B+tree implementation (very early stages). I've got a
I am attempting to construct my own date picker using code from several sources.
I am attempting to construct my own date picker using code from several sources.
Attempting to set up an automated texting service for customers, where people can text
I am attempting to construct a formview that will edit two related objects at
I'm attempting to write a macro which will call java setter methods based on
I'm attempting to construct a Django application that models an existing set of tables.
I'm attempting to construct a function that will perform a sanity check on the
I'm attempting to write a simple ScopeGuard based on Alexandrescu concepts but with c++11

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.