Hi, I am trying to convert a code from VB 6.0 to VB.Net, but there is one function that seems to cause a hang up. Can anyone point me in the right direction? I have placed the VB 6.0 code here, and I have tried running/building it in VB.Net but .Net does not seem to read the StrPtr function. Can anyone help me out? or convert this code for me? Thank you very much.


Public Sub SendScriptToArcPad(ByRef strScript As String)

Dim cds As COPYDATASTRUCT
cds.dwData = 1
cds.cbData = Len(strScript) + 2

cds.lpdata = StrPtr(strScript) ' HERE IS THE PROBLEM!

Call SendMessage(hArcPad, WM_COPYDATA, VariantType.Null, cds)
Call ShowWindow(hArcPad, SW_SHOWMAXIMIZED)

End Sub