Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function CheckForProtocolMessage() As String
- Dim arguments As String() = Environment.GetCommandLineArgs()
- If arguments.Length > 1 Then
- Dim args As String() = arguments(1).Split(":")
- If args(0).Trim().ToUpper() = "savesharer" AndAlso args.Length > 1 Then
- Dim actionDetail As String() = args(1).Split("?")
- If actionDetail.Length > 1 Then
- Select Case actionDetail(0).Trim().ToUpper()
- Case "opensave"
- Dim details As String() = actionDetail(1).Split("=")
- If details.Length > 1 Then
- Dim id As String = details(1).Trim()
- Return id
- End If
- Exit Select
- End Select
- End If
- End If
- else
- Retrun "N/A"
- End If
- End Function
- Usage
- Dim ID as string = checkforprotocolmessage
- If not id = "N/A" then
- 'do stuff here
- end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement