On 15-May-07, at 2:54 PM, Alfred Van Hoek wrote:
> Given that the following is valid and gives a desirable result:
>
> A memoryblock instance (Identifier) passed from a plugin is being
> treated as a Ptr like
>
> dim x as Ptr = identifier
>
> and is then casted to an Integer and compared like
>
> if Integer(x) = 1234 then
> MSGBox "yippee"
> end if
>
> However, how does one cast a Ptr to a string like:
>
> if string(x) = "myypppeestring" then
> .....
>
> the compiler complains because string is not a class, yikes....
you can have a memoryblock that is backed by a Ptr can't you ? (I've
never used this so that's why I'm not 100%)
I've seen something like
dim mb as new memoryblock(4)
mb.Ptr(0) = Ptr
if mb.CString(0) = "myypppeestring" then
end if
but I'm sure there's a better way
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>