xfcanyue said:
DrawText(a); //errorDrawText(@a); //error
Both of these are correct. They are actually mean the same thing. Since the method DrawText expects a handle the compiler will implicitly add the @ so you don't need to do it explicitly.
Can you explain what error you are getting?
Are you using reference counting on your objects, if so you need to register the ADDREF and RELEASE behaviours so the ref counter is properly updated. If you don't, then you need to register the object type with asOBJ_NOCOUNT (beware that you will have to control the memory management in some other way).