On Mon, Jul 21, 2008 at 2:56 PM, Rick McGuire <[EMAIL PROTECTED]> wrote:

> Yes, it is definitely more efficient to allow the runtime to do the
> conversion for you than to create the object yourself and return it,

What about returning a string?  Say in this case:

    TCHAR buf[64];
...
    DWORD range = (DWORD)SendMessage(hwnd, PBM_SETRANGE32, min, max);
    _snprintf(buf, sizeof(buf), "%d %d", LOWORD(range), HIWORD(range));

    return context->NewStringFromAsciiz(buf);

You can't return buf obviously, it's local storage.  It would seem if
I malloc'd a buffer, the interpreter kernel wouldn't know to free it.

So, in this case creating a new string object is the best thing to do?

--
Mark Miesfeld

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to