Hwa Jong,
> How can I get an address of a bytearray, that is compatible with the
> external libraries?
That's usually pretty easy - just pass the byte array; the VM automatically
passes the address for you. If you are mapping the external function
yourself (writing the callout method in an external library subclass), you
can declare the pointer argument to be lpvoid. There are some rare
cirumstances when you have to tinker with #yourAddress or other selectors,
but, a byte array should work fine with the defaults. As an aside, the most
complicated situation I've seen was one in which I was passing a pointer
passed to me on to another COM interface, and I had to re-wrap it because I
ended up with an unwanted indirection. I'm a firm believer that the
automatic pass by address saves us from ourselves far more often than it
causes problems.
> To tell by story, I want to set the imageBits instance variable of
> DIBSection with dolphin bytearray address.
> To me imageBits doesn't seem to be initialized(allocated) correctly when
> DIBSection object be created.
See Ian's goodies. He has a device independent bitmap class that should
help you. Be _very_ careful if you intend to manipulate the image bits
directly. It's generally easier (and always safer) to create a canvas on a
bitmap (even one of Ian's DI ones) and draw on it to change the bits.
Have a good one,
Bill
--
Wilhelm K. Schwab, Ph.D.
[hidden email]