Ravi,
>Can anybody have an idea to using cursors in the DLL.
In addition to Mike's suggestion, you might consider just using CURSORTOXML(), sending the XML string just created, and using XMLTOCURSOR() on the other end to put it back into a cursor.
If you do that, you could use the option on CURSORTOXML to create an embedded schema (describing the fields and their types/lengths) so the XMLTOCURSOR can create the cursor "just right" -- or you can CREATE CURSOR on the receiving end to set up the structure you want and then use the 8192 flag on XMLTOCURSOR() to specify that the data is to be appended to the empty, existing cursor you just created.