Tim wrote:
[color=blue]
> I've searched my help files, and all I can find is that the StrPtr()
> function is not supported.
>
> Is there a suitable replacement in VB.Net?[/color]
What do you need it for? If you let us know, we can point you to the
correct method to do what it is you need to do....
Ken
---------------------
"Tim" <timakal@hotmai l.com> wrote in message
news:eo5atHBgDH A.956@TK2MSFTNG P09.phx.gbl...[color=blue]
> I've searched my help files, and all I can find is that the StrPtr()[/color]
function is[color=blue]
> not supported.
>
> Is there a suitable replacement in VB.Net?
>
>[/color]
You can doubt if this is a subject for this newsgroup. On the other hand I'
ve seen an answer from Herfried to Ashok where Herfried did write.
[color=blue]
>Please post the complete VB6 declaration of 'EbExecuteLine' . Why do you[/color]
use this function?!
So maybe he can help you when you send that.
Did you know there is a special newsgroup for dotnet vb upgrade questions?
(I thought Herfried was active in that newsgroup too).
Maybe you can get a quicker answer there.
Mostly Herfried looks for the messages about 11:00 or 12:00 GMT, but it is
Sunday in Europe so I don't know if that will be today.
"Cor" <non@non.com> schrieb:[color=blue]
> You can doubt if this is a subject for this newsgroup.[/color]
I think it is...
[color=blue]
> Mostly Herfried looks for the messages about 11:00 or 12:00
> GMT, but it is Sunday in Europe so I don't know if that will be
> today.[/color]
"Tim" <timakal@hotmai l.com> schrieb:[color=blue]
> Well it's just a small program I've written in VB6 for my work.
> I know I could take my time and create a REAL one, but
> I've been using an InputBox() to get a response from someone,
> and I was using the StrPtr() method to detect if the user
> was pressing Cancel rather than pressing Enter[/color]
That's not supported by the VB.NET 'InputBox' any more.
You may want to implement an input box on your own:
I have the same issue to resolve. Here is relevant code that requires modification:
lngResult = CoCreateGuid(ud tGUID) ' Create a 'raw' GUID
If lngResult = GUID_OK Then
strFormattedGUI D = New String(Chr(0), GUID_LENGTH + 1)
' Convert the 'raw' GUID to a formatted string
'UPGRADE_ISSUE: StrPtr function is not supported. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?ke yword="vbup1040 "'
StringFromGUID2 (udtGUID, StrPtr(strForma ttedGUID), GUID_LENGTH + 1)
Else ' Either return nothing or find some way to handle the error
strFormattedGUI D = Right(Space(GUI D_LENGTH) & VB6.Format(Now, "yyyymmddhh nn") & VB6.Format(GetT ickCount(), "000000000000") , GUID_LENGTH)
End If
CreateGUIDKey = Left(Trim(strFo rmattedGUID) & Space(GUID_LENG TH), GUID_LENGTH)
lngResult = CoCreateGuid(ud tGUID) ' Create a 'raw' GUID
If lngResult = GUID_OK Then
strFormattedGUI D = New String(Chr(0), GUID_LENGTH + 1)
' Convert the 'raw' GUID to a formatted string
'UPGRADE_ISSUE: StrPtr function is not supported. Click for
more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?ke yword="vbup1040 "'
StringFromGUID2 (udtGUID, StrPtr(strForma ttedGUID), GUID_LENGTH
+ 1)
How does the declaration of 'StringFromGUID 2' look like?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Private Declare Function StringFromGUID2 Lib "OLE32.DLL" (ByRef pGuid As GUID, ByVal PointerToString As Integer, ByVal MaxLength As Integer) As Integer
Comment