Well, I think this is the easy part:
JScript code:
Interop.Call("User32.dll","SendMessageW",PlusWnd.GetControlHandle("MyListView"),LVM_EDITLABELW,ItemToRename,0);
You should then listen for WM_NOTIFY ( = 0x004E) notifications. That's where the tricky part comes in: Along with WM_NOTIFY, an NMHDR structure is passed, which can be moved to a known location by RtlMoveMemory (see MSDN). Reading the data at position 8, you should find LVN_ENDLABELEDITW ( = LVN_FIRST - 76; LVN_FIRST = 0 - 100). You must retrieve the edit control's handle through LVM_GETEDITCONTROL ( = LVM_FIRST + 24; LVM_FIRST = 0x1000). Once you know the handle to the edit control, you can retrieve its text length and text itself with WM_GETTEXTLENGTH ( = 0x000E) and WM_GETTEXT ( = 0x000D), respectively.
Oh and the ListViewControl's
AllowEdit attribute should be true in your interface XML