The problem the OP has is he is casting buffer to a char *. He should just use buffer.ptr.
Casting a string to char* is exactly the same as using the .ptr property, as far as generated code is concerned.
-- Best regards, Vladimir mailto:[email protected]
