The problem is probably being caused by the variable you are assigning the
return value to.  It should be a type MemHandle.  You then need to lock the
MemHandle to get a MemPtr... like this..:

MemHandle  vh;
MemPtr  vp;

if (vh = DmNewRecord( _DBRef, _RecordPtr, _ReocrdSize )) {
    if (vp = MemHandleLock(vh)) {
        // USE THE "vp" POINTER HERE....
        MemPtrUnlock(vp);
    }
    DmReleaseRecord(_DBRef, *_RecordPtr, true);
}

I'm also presuming that the _RecordPtr is pointing to something valid...?

Anyone reading this can feel free to comment on my methods 8-P

Alan Ingleby

"Oscar" <[EMAIL PROTECTED]> wrote in message
news:36183@palm-dev-forum...
>
> Dear all,
>
> I got "cannot convert '_opaque*' to 'unsigned short' " error from the
follow
> code:
>
> DmOpenRef _DBRef;
> UInt16Ptr     _RecordPtr;
> UInt32         _ReocrdSize;
> DmNewRecord( _DBRef, _RecordPtr, _ReocrdSize );
>
> What is the problem of it?
> Also, what is the type "_opaque*" ? I have seen this error so many time
but
> only use "try and error" method to solve it, can anyone give a better
> concept of this type for me?
>
> Oscar




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to