• Welcome to Valhalla Legends Archive.
 

Re: [VB6] G2GS 0x68

Started by Fr0z3N, January 01, 2006, 03:22 AM

Previous topic - Next topic

Fr0z3N

What is your 'GetSTRING' function?

Joe[x86]

Wild stab in the dark:



Public Function removeSTRING() As String
    Dim iPosition As Integer
    If Not InStr(1, m_sBuffer, vbNullChar) > 1 Then
        Exit Function
    Else
        iPosition = InStr(1, m_sBuffer, vbNullChar)
        removeSTRING = Mid(m_sBuffer, 1, iPosition - 1)
        m_sBuffer = Mid(m_sBuffer, iPosition + 1)
    End If
End Function


This isn't really finished being discussed, I don't see how it can be used as a reference.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Ringo

Quote from: Fr0z3N on January 01, 2006, 03:22 AM
What is your 'GetSTRING' function?
Joe was close :P

Public Function GetSTRING$(ByVal Data$, Optional ByVal AsciiTerminator As Byte = &H0)
    On Error Resume Next
    Dim tmpInt%
    tmpInt = InStr(1, Data, Chr(AsciiTerminator))
    If tmpInt = 0 Then
        GetSTRING = Data
    Else
        GetSTRING = Mid(Data, 1, tmpInt - 1)
    End If
End Function

Hope this helps!