You both are missing my real problem, probably because I did not explain 
the whole issue I am dealing with.

I have application API which has this signature.

int inchstr(chtype *chstr, int n);

The chtype is defined as an int. The API reads the number of chtype 
specified by n. The problem occurs when I ty to do this.

return (RexxObjectPtr)context->NewString((char*)chstr, n * sizeof(chtype));

The compiler flags the conversion of chtype* to char* as an error, 
cannot conver int* to char*. No matter what I do or how I code it the 
compiler complains. I completely understand this error and I basically 
agree with the compiler on this. So I need a Rexx API that can take a 
buffer and convert it into a RexxString.

Thanks,
David Ashley

On 01/07/2010 07:54 PM, Mark Miesfeld wrote:
> On Thu, Jan 7, 2010 at 4:11 PM, David Ashley<[email protected]>  
> wrote:
>    
>> Rick/Mark -
>>
>> I have come across a problem using the new C++ API. I have a buffer of
>> data that I want to return from a method as a RexxString. The problem is
>> that this buffer may contain embedded nulls, thus none of the
>> String/CSTRING methods will work for the conversion. Is there a way to
>> do this?
>>      
> One form of the NewString() takes a length argument.  That should do
> the trick.  Page 198 in rexxprg.pdf
>
> --
> Mark Miesfeld
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>    


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to