Skip to content

Commit 7ce6f5b

Browse files
authored
Merge pull request #9 from nethesis/ParamURL
nethesis/dev#6141
2 parents f9e46fd + 7e9df05 commit 7ce6f5b

15 files changed

Lines changed: 932 additions & 764 deletions

File tree

NethDialer/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("3.0.8.0")>
35-
<Assembly: AssemblyFileVersion("3.0.8.0")>
34+
<Assembly: AssemblyVersion("3.0.9.0")>
35+
<Assembly: AssemblyFileVersion("3.0.9.0")>

NethDialer/NethDialer.vbproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<UpdateRequired>false</UpdateRequired>
2626
<MapFileExtensions>true</MapFileExtensions>
2727
<ApplicationRevision>0</ApplicationRevision>
28-
<ApplicationVersion>3.0.3.0</ApplicationVersion>
28+
<ApplicationVersion>3.0.9.0</ApplicationVersion>
2929
<UseApplicationTrust>false</UseApplicationTrust>
3030
<PublishWizardCompleted>true</PublishWizardCompleted>
3131
<BootstrapperEnabled>true</BootstrapperEnabled>
@@ -208,7 +208,7 @@
208208
<ItemGroup>
209209
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
210210
<Visible>False</Visible>
211-
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 e x64%29</ProductName>
211+
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 and x64%29</ProductName>
212212
<Install>true</Install>
213213
</BootstrapperPackage>
214214
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">

NethDialer/obj/Debug/NethDialer.vbproj.FileListAbsolute.txt

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethDialer.exe.config
2-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethDialer.exe.manifest
3-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethDialer.application
4-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethDialer.exe
5-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethDialer.pdb
6-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethDialer.xml
7-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethUtilities.dll
8-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethUtilities.pdb
9-
C:\Users\Utente\source\repos\nethifier\NethDialer\bin\Debug\NethUtilities.xml
10-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.vbproj.AssemblyReference.cache
11-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.Form1.resources
12-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.Resources.resources
13-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.vbproj.GenerateResource.cache
14-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.vbproj.CoreCompileInputs.cache
15-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.TrustInfo.xml
16-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.exe.manifest
17-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.application
18-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.vbproj.CopyComplete
19-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.exe
20-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.xml
21-
C:\Users\Utente\source\repos\nethifier\NethDialer\obj\Debug\NethDialer.pdb
221
C:\Users\Utente\source\repos\nethifier-220222\NethDialer\bin\Debug\NethDialer.exe.config
232
C:\Users\Utente\source\repos\nethifier-220222\NethDialer\bin\Debug\NethDialer.exe.manifest
243
C:\Users\Utente\source\repos\nethifier-220222\NethDialer\bin\Debug\NethDialer.application

NethHeadPhone/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all values ​​or set default values ​​for revision and build numbers
3333
// using the asterisk '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("3.0.8.0")]
36-
[assembly: AssemblyFileVersion("3.0.8.0")]
35+
[assembly: AssemblyVersion("3.0.9.0")]
36+
[assembly: AssemblyFileVersion("3.0.9.0")]

NethLED/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("3.0.8.0")>
35-
<Assembly: AssemblyFileVersion("3.0.8.0")>
34+
<Assembly: AssemblyVersion("3.0.9.0")>
35+
<Assembly: AssemblyFileVersion("3.0.9.0")>

NethUtilities/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("3.0.8.0")>
35-
<Assembly: AssemblyFileVersion("3.0.8.0")>
34+
<Assembly: AssemblyVersion("3.0.9.0")>
35+
<Assembly: AssemblyFileVersion("3.0.9.0")>

Nethifier/CLS_COMMON.vb

Lines changed: 56 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Friend Class Config
4545
P = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\" & Application.ProductName
4646
End If
4747
Else
48-
'P = Application.StartupPath
49-
P = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\" & Application.ProductName
48+
'P = Application.StartupPath
49+
P = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\" & Application.ProductName
5050
End If
5151

5252
If Not IO.Directory.Exists(P) Then
@@ -69,6 +69,9 @@ Friend Class Config
6969
Public AUTH_ADDRESS As String
7070
Public NOTIFY_TIMEOUT As Int32
7171
Public AUTO_LOGIN As Boolean = True
72+
Public PARAM_CHECK As Boolean = False
73+
Public PARAM_MODE As String
74+
Public POPUP_POS As Int32 = 0
7275

7376
Public Commands As Hashtable = New Hashtable
7477
Public LANGUAGE As String = "default"
@@ -110,6 +113,9 @@ Friend Class Config
110113
"AUTH_ADDRESS=" & Me.AUTH_ADDRESS & vbCrLf &
111114
"NOTIFY_TIMEOUT=" & Me.NOTIFY_TIMEOUT & vbCrLf &
112115
"AUTO_LOGIN=" & CStr(IIf(Me.AUTO_LOGIN, "1", "0")) & vbCrLf &
116+
"PARAM_CHECK=" & CStr(IIf(Me.PARAM_CHECK, "1", "0")) & vbCrLf &
117+
"PARAM_MODE=" & Me.PARAM_MODE & vbCrLf &
118+
"POPUP_POS=" & Me.POPUP_POS & vbCrLf &
113119
"LANGUAGE=" & Me.LANGUAGE & vbCrLf &
114120
"HOTKEY_MOD_SPEED_DIAL=" & Me.HOTKEY_MOD_SPEED_DIAL & vbCrLf &
115121
"HOTKEY_MOD_REDIAL=" & Me.HOTKEY_MOD_REDIAL & vbCrLf &
@@ -160,6 +166,7 @@ Friend Class Config
160166
Dim RD As Boolean
161167
Dim HKSD As Boolean
162168
Dim HKRD As Boolean
169+
Dim P_POS As Boolean
163170

164171
For I As Integer = 0 To Par.Length - 1
165172
Key = Trim(Par(I)) '.ToUpper
@@ -189,6 +196,16 @@ Friend Class Config
189196
ElseIf Key.StartsWith("AUTO_LOGIN=") Then
190197
Me.AUTO_LOGIN = (Val = "1")
191198
X += 1
199+
ElseIf Key.StartsWith("PARAM_CHECK=") Then
200+
Me.PARAM_CHECK = (Val = "1")
201+
X += 1
202+
ElseIf Key.StartsWith("PARAM_MODE=") Then
203+
Me.PARAM_MODE = Val
204+
X += 1
205+
ElseIf Key.StartsWith("POPUP_POS=") Then
206+
P_POS = True
207+
Me.POPUP_POS = CInt(Val)
208+
X += 1
192209
ElseIf Key.StartsWith("LANGUAGE=") Then
193210
Me.LANGUAGE = Val
194211
X += 1
@@ -251,6 +268,10 @@ Friend Class Config
251268
Me.HOTKEY_MOD_SPEED_DIAL = &H2 'CTRL
252269
End If
253270

271+
If Not (P_POS) Then
272+
Me.POPUP_POS = 8
273+
End If
274+
254275
_IsSaved = (X = 8)
255276
End If
256277

@@ -517,7 +538,7 @@ Friend Class Helper
517538

518539
Try
519540
' Open the access token of the current process with TOKEN_QUERY.
520-
If (Not NativeMethods.OpenProcessToken(Process.GetCurrentProcess.Handle, _
541+
If (Not NativeMethods.OpenProcessToken(Process.GetCurrentProcess.Handle,
521542
NativeMethods.TOKEN_QUERY, hToken)) Then
522543
Throw New Win32Exception
523544
End If
@@ -530,8 +551,8 @@ Friend Class Helper
530551
End If
531552

532553
' Retrieve token elevation information.
533-
If (Not NativeMethods.GetTokenInformation(hToken, _
534-
TOKEN_INFORMATION_CLASS.TokenElevation, _
554+
If (Not NativeMethods.GetTokenInformation(hToken,
555+
TOKEN_INFORMATION_CLASS.TokenElevation,
535556
pTokenElevation, cbTokenElevation, cbTokenElevation)) Then
536557
Throw New Win32Exception
537558
End If
@@ -630,18 +651,18 @@ Friend Class Enums
630651
TokenElevationTypeLimited
631652
End Enum
632653

633-
<StructLayout(LayoutKind.Sequential)> _
654+
<StructLayout(LayoutKind.Sequential)>
634655
Friend Structure SID_AND_ATTRIBUTES
635656
Public Sid As IntPtr
636657
Public Attributes As UInteger
637658
End Structure
638659

639-
<StructLayout(LayoutKind.Sequential)> _
660+
<StructLayout(LayoutKind.Sequential)>
640661
Friend Structure TOKEN_ELEVATION
641662
Public TokenIsElevated As Integer
642663
End Structure
643664

644-
<StructLayout(LayoutKind.Sequential)> _
665+
<StructLayout(LayoutKind.Sequential)>
645666
Friend Structure TOKEN_MANDATORY_LABEL
646667
Public Label As SID_AND_ATTRIBUTES
647668
End Structure
@@ -659,7 +680,7 @@ Friend Class SafeTokenHandle
659680
MyBase.SetHandle(handle)
660681
End Sub
661682

662-
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
683+
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)>
663684
Friend Shared Function CloseHandle(ByVal handle As IntPtr) As Boolean
664685
End Function
665686

@@ -685,9 +706,9 @@ Friend Class NativeMethods
685706
Public Const TOKEN_ADJUST_DEFAULT As UInt32 = &H80
686707
Public Const TOKEN_ADJUST_SESSIONID As UInt32 = &H100
687708
Public Const TOKEN_READ As UInt32 = (STANDARD_RIGHTS_READ Or TOKEN_QUERY)
688-
Public Const TOKEN_ALL_ACCESS As UInt32 = (STANDARD_RIGHTS_REQUIRED Or _
689-
TOKEN_ASSIGN_PRIMARY Or TOKEN_DUPLICATE Or TOKEN_IMPERSONATE Or _
690-
TOKEN_QUERY Or TOKEN_QUERY_SOURCE Or TOKEN_ADJUST_PRIVILEGES Or _
709+
Public Const TOKEN_ALL_ACCESS As UInt32 = (STANDARD_RIGHTS_REQUIRED Or
710+
TOKEN_ASSIGN_PRIMARY Or TOKEN_DUPLICATE Or TOKEN_IMPERSONATE Or
711+
TOKEN_QUERY Or TOKEN_QUERY_SOURCE Or TOKEN_ADJUST_PRIVILEGES Or
691712
TOKEN_ADJUST_GROUPS Or TOKEN_ADJUST_DEFAULT Or TOKEN_ADJUST_SESSIONID)
692713

693714

@@ -702,45 +723,45 @@ Friend Class NativeMethods
702723
Public Const SECURITY_MANDATORY_HIGH_RID As Integer = &H3000
703724
Public Const SECURITY_MANDATORY_SYSTEM_RID As Integer = &H4000
704725

705-
<DllImport("advapi32", CharSet:=CharSet.Auto, SetLastError:=True)> _
706-
Public Shared Function OpenProcessToken( _
707-
ByVal hProcess As IntPtr, _
708-
ByVal desiredAccess As UInt32, _
726+
<DllImport("advapi32", CharSet:=CharSet.Auto, SetLastError:=True)>
727+
Public Shared Function OpenProcessToken(
728+
ByVal hProcess As IntPtr,
729+
ByVal desiredAccess As UInt32,
709730
<Out()> ByRef hToken As SafeTokenHandle) _
710731
As <MarshalAs(UnmanagedType.Bool)> Boolean
711732
End Function
712733

713-
<DllImport("advapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
714-
Public Shared Function DuplicateToken( _
715-
ByVal ExistingTokenHandle As SafeTokenHandle, _
716-
ByVal ImpersonationLevel As SECURITY_IMPERSONATION_LEVEL, _
734+
<DllImport("advapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)>
735+
Public Shared Function DuplicateToken(
736+
ByVal ExistingTokenHandle As SafeTokenHandle,
737+
ByVal ImpersonationLevel As SECURITY_IMPERSONATION_LEVEL,
717738
<Out()> ByRef DuplicateTokenHandle As SafeTokenHandle) _
718739
As Boolean
719740
End Function
720741

721-
<DllImport("advapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
722-
Public Shared Function GetTokenInformation( _
723-
ByVal hToken As SafeTokenHandle, _
724-
ByVal tokenInfoClass As TOKEN_INFORMATION_CLASS, _
725-
ByVal pTokenInfo As IntPtr, _
726-
ByVal tokenInfoLength As Integer, _
742+
<DllImport("advapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)>
743+
Public Shared Function GetTokenInformation(
744+
ByVal hToken As SafeTokenHandle,
745+
ByVal tokenInfoClass As TOKEN_INFORMATION_CLASS,
746+
ByVal pTokenInfo As IntPtr,
747+
ByVal tokenInfoLength As Integer,
727748
<Out()> ByRef returnLength As Integer) _
728749
As <MarshalAs(UnmanagedType.Bool)> Boolean
729750
End Function
730751

731752
Public Const BCM_SETSHIELD As UInt32 = &H160C
732-
<DllImport("user32", CharSet:=CharSet.Auto, SetLastError:=True)> _
733-
Public Shared Function SendMessage( _
734-
ByVal hWnd As IntPtr, _
735-
ByVal Msg As UInt32, _
736-
ByVal wParam As Integer, _
753+
<DllImport("user32", CharSet:=CharSet.Auto, SetLastError:=True)>
754+
Public Shared Function SendMessage(
755+
ByVal hWnd As IntPtr,
756+
ByVal Msg As UInt32,
757+
ByVal wParam As Integer,
737758
ByVal lParam As IntPtr) _
738759
As Integer
739760
End Function
740761

741-
<DllImport("advapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
742-
Public Shared Function GetSidSubAuthority( _
743-
ByVal pSid As IntPtr, _
762+
<DllImport("advapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)>
763+
Public Shared Function GetSidSubAuthority(
764+
ByVal pSid As IntPtr,
744765
ByVal nSubAuthority As UInt32) _
745766
As IntPtr
746767
End Function
@@ -756,7 +777,7 @@ Friend Class LinkHelper
756777
Private Enum SLGP_FLAGS
757778
SLGP_SHORTPATH = &H1
758779
SLGP_UNCPRIORITY = &H2
759-
SLGP_RAWPATH = &H4
780+
SLGP_RAWPATH = &H4
760781
End Enum
761782

762783
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)>

0 commit comments

Comments
 (0)