以下一段vb程序,请问用dp怎么实现?
Option Explicit
Private Declare Sub RtlMoveMemory Lib "KERNEL32" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
Public Function gettext(ByVal hh As Long) As String
Dim l As Long
   l = SendMessage(hh, &HE, 0, 0)
   If l > 0 Then
      ReDim b1(l + 1) As Byte, b2(l - 1) As Byte
      RtlMoveMemory b1(0), l, 2
      SendMessage hh, &HD, l + 1, b1(0)
      RtlMoveMemory b2(0), b1(0), l
      gettext = StrConv(b2, vbUnicode)
   Else
      gettext = ""
   End If
   
End Function