Virtuelle Desktops wolle nicht

  • VB.NET

Es gibt 19 Antworten in diesem Thema. Der letzte Beitrag () ist von SystemUnknow.

    Virtuelle Desktops wolle nicht

    Hallo, ich wollte ein Program machen mit dem ich verschiedene Desktops verwalten kann, aber der erstellt einfach keinen Desktop. Mein Code ist folgender:

    Mein Code

    VB.NET-Quellcode

    1. Class Form1
    2. Private Const CCHFORMNAME = 32
    3. Private Const CCHDEVICENAME = 32
    4. Private Structure SECURITY_ATTRIBUTES
    5. Dim nLength As Integer
    6. Dim lpSecurityDescriptor As Integer
    7. Dim bInheritHandle As Integer
    8. End Structure
    9. Private Structure DEVMODE
    10. Dim dmDeviceName As String
    11. Dim dmSpecVersion As Short
    12. Dim dmDriverVersion As Short
    13. Dim dmSize As Short
    14. Dim dmDriverExtra As Short
    15. Dim dmFields As Integer
    16. Dim dmOrientation As Short
    17. Dim dmPaperSize As Short
    18. Dim dmPaperLength As Short
    19. Dim dmPaperWidth As Short
    20. Dim dmScale As Short
    21. Dim dmCopies As Short
    22. Dim dmDefaultSource As Short
    23. Dim dmPrintQuality As Short
    24. Dim dmColor As Short
    25. Dim dmDuplex As Short
    26. Dim dmYResolution As Short
    27. Dim dmTTOption As Short
    28. Dim dmCollate As Short
    29. Dim dmFormName As String
    30. Dim dmUnusedPadding As Short
    31. Dim dmBitsPerPel As Integer
    32. Dim dmPelsWidth As Integer
    33. Dim dmPelsHeight As Integer
    34. Dim dmDisplayFlags As Integer
    35. Dim dmDisplayFrequency As Integer
    36. End Structure
    37. Private Declare Function CreateDesktop Lib "user32" Alias "CreateDesktopW" ( _
    38. ByVal lpszDesktop As Long, _
    39. ByVal lpszDevice As Long, _
    40. ByVal pDevmode As Object, _
    41. ByVal dwFlags As Long, _
    42. ByVal dwDesiredAccess As Long, _
    43. ByVal lpsa As Object _
    44. ) As Long
    45. Private Declare Function SwitchDesktop Lib "user32" (ByVal hDesktop As Long) As Long
    46. Private Declare Function GetThreadDesktop Lib "user32" (ByVal dwThread As Long) As Long
    47. Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long
    48. Private Declare Function OpenInputDesktop Lib "user32" ( _
    49. ByVal dwFlags As Long, _
    50. ByVal fInherit As Boolean, _
    51. ByVal dwDesiredAccess As Long _
    52. ) As Long
    53. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    54. Dim Normal As IntPtr = GetCurrentThreadId()
    55. Dim Sperr As IntPtr = CreateDesktop(12345, 0, Nothing, 0, 0, 0) REM Hier kommt der Fehler
    56. SwitchDesktop(Sperr)
    57. System.Threading.Thread.Sleep(20000)
    58. SwitchDesktop(Normal)
    59. End Sub
    60. End Class
    Aber in der Markierten Zeile

    VB.NET-Quellcode

    1. Dim Sperr As IntPtr = CreateDesktop(12345, 0, Nothing, 0, 0, 0)
    Kommt folgender Fehler:
    Fehler
    Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.

    Hä?

    Kann mir einer sagen was ich falsch mach?

    Danke
    Leseratte
    Immernoch.

    Spoiler anzeigen

    VB.NET-Quellcode

    1. Public Class Form1
    2. Private Const CCHFORMNAME = 32
    3. Private Const CCHDEVICENAME = 32
    4. Private Structure SECURITY_ATTRIBUTES
    5. Dim nLength As Integer
    6. Dim lpSecurityDescriptor As Integer
    7. Dim bInheritHandle As Integer
    8. End Structure
    9. Private Structure DEVMODE
    10. Dim dmDeviceName As String
    11. Dim dmSpecVersion As Short
    12. Dim dmDriverVersion As Short
    13. Dim dmSize As Short
    14. Dim dmDriverExtra As Short
    15. Dim dmFields As Integer
    16. Dim dmOrientation As Short
    17. Dim dmPaperSize As Short
    18. Dim dmPaperLength As Short
    19. Dim dmPaperWidth As Short
    20. Dim dmScale As Short
    21. Dim dmCopies As Short
    22. Dim dmDefaultSource As Short
    23. Dim dmPrintQuality As Short
    24. Dim dmColor As Short
    25. Dim dmDuplex As Short
    26. Dim dmYResolution As Short
    27. Dim dmTTOption As Short
    28. Dim dmCollate As Short
    29. Dim dmFormName As String
    30. Dim dmUnusedPadding As Short
    31. Dim dmBitsPerPel As Integer
    32. Dim dmPelsWidth As Integer
    33. Dim dmPelsHeight As Integer
    34. Dim dmDisplayFlags As Integer
    35. Dim dmDisplayFrequency As Integer
    36. End Structure
    37. Private Declare Function CreateDesktop Lib "user32" Alias "CreateDesktopW" ( _
    38. ByVal lpszDesktop As Long, _
    39. ByVal lpszDevice As Long, _
    40. ByVal pDevmode As Object, _
    41. ByVal dwFlags As Long, _
    42. ByVal dwDesiredAccess As Long, _
    43. ByVal lpsa As Object _
    44. ) As Long
    45. Private Declare Function SwitchDesktop Lib "user32" (ByVal hDesktop As Integer) As Integer
    46. Private Declare Function GetThreadDesktop Lib "user32" (ByVal dwThread As Integer) As Integer
    47. Private Declare Function GetCurrentThreadId Lib "kernel32" () As Integer
    48. Private Declare Function OpenInputDesktop Lib "user32" ( _
    49. ByVal dwFlags As Integer, _
    50. ByVal fInherit As Boolean, _
    51. ByVal dwDesiredAccess As Integer _
    52. ) As Long
    53. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    54. Dim Normal As IntPtr = GetCurrentThreadId
    55. Dim Sperr As IntPtr = CreateDesktop(12345, 0, Nothing, 0, 0, 0)
    56. SwitchDesktop(Sperr)
    57. System.Threading.Thread.Sleep(20000)
    58. SwitchDesktop(Normal)
    59. End Sub
    60. End Class
    Mit dem Code hier:

    Spoiler anzeigen

    VB.NET-Quellcode

    1. Option Strict On
    2. Imports System.Collections.Generic
    3. Imports System.Runtime.InteropServices
    4. Imports System.Text
    5. Public Class Form1
    6. Private Const CCHFORMNAME = 32
    7. Private Const CCHDEVICENAME = 32
    8. Private Structure SECURITY_ATTRIBUTES
    9. Dim nLength As Integer
    10. Dim lpSecurityDescriptor As Integer
    11. Dim bInheritHandle As Integer
    12. End Structure
    13. Private Structure DEVMODE
    14. Dim dmDeviceName As String
    15. Dim dmSpecVersion As Short
    16. Dim dmDriverVersion As Short
    17. Dim dmSize As Short
    18. Dim dmDriverExtra As Short
    19. Dim dmFields As Integer
    20. Dim dmOrientation As Short
    21. Dim dmPaperSize As Short
    22. Dim dmPaperLength As Short
    23. Dim dmPaperWidth As Short
    24. Dim dmScale As Short
    25. Dim dmCopies As Short
    26. Dim dmDefaultSource As Short
    27. Dim dmPrintQuality As Short
    28. Dim dmColor As Short
    29. Dim dmDuplex As Short
    30. Dim dmYResolution As Short
    31. Dim dmTTOption As Short
    32. Dim dmCollate As Short
    33. Dim dmFormName As String
    34. Dim dmUnusedPadding As Short
    35. Dim dmBitsPerPel As Integer
    36. Dim dmPelsWidth As Integer
    37. Dim dmPelsHeight As Integer
    38. Dim dmDisplayFlags As Integer
    39. Dim dmDisplayFrequency As Integer
    40. End Structure
    41. Private Declare Function CreateDesktop Lib "user32" Alias "CreateDesktopW" ( _
    42. ByVal lpszDesktop As Integer, _
    43. ByVal lpszDevice As Integer, _
    44. ByVal pDevmode As Object, _
    45. ByVal dwFlags As Integer, _
    46. ByVal dwDesiredAccess As Integer, _
    47. ByVal lpsa As Object _
    48. ) As Integer
    49. Private Declare Function SwitchDesktop Lib "user32" (ByVal hDesktop As Integer) As Integer
    50. Private Declare Function GetThreadDesktop Lib "user32" (ByVal dwThread As Integer) As Integer
    51. Private Declare Function GetCurrentThreadId Lib "kernel32" () As Integer
    52. Private Declare Function OpenInputDesktop Lib "user32" ( _
    53. ByVal dwFlags As Integer, _
    54. ByVal fInherit As Boolean, _
    55. ByVal dwDesiredAccess As Integer _
    56. ) As Long
    57. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    58. Dim Normal As Integer = GetCurrentThreadId
    59. Dim Sperr As Integer = CreateDesktop(12345, 0, Nothing, 0, 0, 0)
    60. SwitchDesktop(Sperr)
    61. System.Threading.Thread.Sleep(20000)
    62. SwitchDesktop(Normal)
    63. End Sub
    64. End Class
    Kommt jetzt auch mit Option Strict on kein fehler in der IDE, aber zur Laufzeit kommt immernoch "Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.". Ich schau mir mal die Links an.

    EDIT: Bei der Funktion hier:

    VB.NET-Quellcode

    1. Private Declare Function CreateDesktop Lib "user32" Alias "CreateDesktop" ( _
    2. ByVal desktopname As String, _
    3. ByVal lpszDevice As String, _
    4. ByVal pDevmode As String, _
    5. ByVal dwFlags As Integer, _
    6. ByVal dwDesiredAccess As Integer, _
    7. ByVal lpsa As SECURITY_ATTRIBUTES _
    8. ) As IntPtr


    Kommt jetzt: Der Einstiegspunkt "CreateDesktop" wurde nicht in der DLL "user32" gefunden.
    Hä?

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Leseratte“ ()

    VB.NET-Quellcode

    1. Private Declare Function CreateDesktop Lib "user32.dll" Alias "CreateDesktopA" (ByVal lpszDesktop As String, ByVal lpszDevice As String, ByRef pDevmode As DEVMODE, ByVal dwFlags As Int32, ByVal dwDesiredAccess As Int32, ByRef lpsa As SECURITY_ATTRIBUTES) As Int32
    Ich hab den c# code jetzt übertragen aber da sind noch ein Paar sachen die ichnicht übersetzt bekomme:

    Mein Code

    VB.NET-Quellcode

    1. Option Strict On
    2. Imports System.Collections.Generic
    3. Imports System.Runtime.InteropServices
    4. Imports System.Text
    5. Public Class Form1
    6. Private Const CCHFORMNAME = 32
    7. Private Const CCHDEVICENAME = 32
    8. Private Structure SECURITY_ATTRIBUTES
    9. Dim nLength As Integer
    10. Dim lpSecurityDescriptor As Integer
    11. Dim bInheritHandle As Integer
    12. End Structure
    13. Private Structure DEVMODE
    14. Dim dmDeviceName As String
    15. Dim dmSpecVersion As Short
    16. Dim dmDriverVersion As Short
    17. Dim dmSize As Short
    18. Dim dmDriverExtra As Short
    19. Dim dmFields As Integer
    20. Dim dmOrientation As Short
    21. Dim dmPaperSize As Short
    22. Dim dmPaperLength As Short
    23. Dim dmPaperWidth As Short
    24. Dim dmScale As Short
    25. Dim dmCopies As Short
    26. Dim dmDefaultSource As Short
    27. Dim dmPrintQuality As Short
    28. Dim dmColor As Short
    29. Dim dmDuplex As Short
    30. Dim dmYResolution As Short
    31. Dim dmTTOption As Short
    32. Dim dmCollate As Short
    33. Dim dmFormName As String
    34. Dim dmUnusedPadding As Short
    35. Dim dmBitsPerPel As Integer
    36. Dim dmPelsWidth As Integer
    37. Dim dmPelsHeight As Integer
    38. Dim dmDisplayFlags As Integer
    39. Dim dmDisplayFrequency As Integer
    40. End Structure
    41. Private Declare Function CreateDesktop Lib "user32.dll" Alias "CreateDesktopA" (ByVal lpszDesktop As String, _
    42. ByVal lpszDevice As String, ByRef pDevmode As DEVMODE, ByVal dwFlags As Int32, _
    43. ByVal dwDesiredAccess As Int32, ByRef lpsa As SECURITY_ATTRIBUTES) As Int32 REM lpszDevice, pdevmode, dwflags must be 0
    44. Private Declare Function SwitchDesktop Lib "user32" (ByVal hDesktop As IntPtr) As Boolean
    45. Private Declare Function GetThreadDesktop Lib "user32" (ByVal dwThread As Integer) As IntPtr
    46. Private Declare Function GetCurrentThreadId Lib "kernel32" () As IntPtr
    47. Private Declare Function OpenInputDesktop Lib "user32" ( _
    48. ByVal dwFlags As UInteger, _
    49. ByVal fInherit As Boolean, _
    50. ByVal dwDesiredAccess As UInteger _
    51. ) As IntPtr
    52. <DllImport("kernel32.dll")> _
    53. Private Shared Function CreateProcess(ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As IntPtr, ByVal lpThreadAttributes As IntPtr, ByVal bInheritHandles As Boolean, ByVal dwCreationFlags As Integer, _
    54. ByVal lpEnvironment As IntPtr, ByVal lpCurrentDirectory As String, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean
    55. End Function
    56. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    57. Dim Normal As IntPtr = GetCurrentThreadId
    58. Dim Sperr As IntPtr = CType(CreateDesktop("Sperr", Nothing, Nothing, Nothing, 0, Nothing), IntPtr)
    59. SwitchDesktop(Sperr)
    60. Dim si As New STARTUPINFO()
    61. si.cb = Marshal.SizeOf(si)
    62. si.lpDesktop = "Sperr"
    63. Dim pi As New PROCESS_INFORMATION()
    64. ' start the process.
    65. Dim result As Boolean = CreateProcess(Nothing, "cmd.exe", IntPtr.Zero, IntPtr.Zero, True, NORMAL_PRIORITY_CLASS, _
    66. IntPtr.Zero, Nothing, si, pi)
    67. System.Threading.Thread.Sleep(20000)
    68. SwitchDesktop(Normal)
    69. End Sub
    70. End Class
    Der Unterkringelt mir folgende sachen mit der Meldung "... ist nicht dekliniert / definiert:

    PROCESS_INFORMATION (2x)
    STARTUPINFO (2x)
    NORMAL_PRIORITY_CLASS

    Wie muss ich die Sachen definieren?
    Hä?

    Ich hab diese Code von der Microsoft-Seite

    VB.NET-Quellcode

    1. typedef struct _STARTUPINFO {
    2. DWORD cb;
    3. LPTSTR lpReserved;
    4. LPTSTR lpDesktop;
    5. LPTSTR lpTitle;
    6. DWORD dwX;
    7. DWORD dwY;
    8. DWORD dwXSize;
    9. DWORD dwYSize;
    10. DWORD dwXCountChars;
    11. DWORD dwYCountChars;
    12. DWORD dwFillAttribute;
    13. DWORD dwFlags;
    14. WORD wShowWindow;
    15. WORD cbReserved2;
    16. LPBYTE lpReserved2;
    17. HANDLE hStdInput;
    18. HANDLE hStdOutput;
    19. HANDLE hStdError;
    20. } STARTUPINFO, *LPSTARTUPINFO;


    In diesen (developerfusion.com/tools/convert/csharp-to-vb/) übersetzer einkopiert und der gibt mir
    diese: "-- line 1 col 1: EOF expected " fehlermeldung. Wo steht da was von Sizeof?
    @haiyyu: genau !

    VB.NET-Quellcode

    1. <StructLayout(LayoutKind.Sequential)> _
    2. Private Structure STARTUPINFO
    3. Public cb As Int32
    4. Public lpReserved As Int32
    5. Public lpDesktop As Int32
    6. Public lpTitle As Int32
    7. Public dwX As Int32
    8. Public dwY As Int32
    9. Public dwXSize As Int32
    10. Public dwYSize As Int32
    11. Public dwXCountChars As Int32
    12. Public dwYCountChars As Int32
    13. Public dwFillAttribute As Int32
    14. Public dwFlags As Int32
    15. Public wShowWindow As Int16
    16. Public cbReserved2 As Int16
    17. Public lpReserved2 As Byte
    18. Public hStdInput As Int32
    19. Public hStdOutput As Int32
    20. Public hStdError As Int32
    21. End Structure
    22. <StructLayout(LayoutKind.Sequential)> _
    23. Private Structure PROCESS_INFORMATION
    24. Public hProcess As Int32
    25. Public hThread As Int32
    26. Public dwProcessId As Int32
    27. Public dwThreadId As Int32
    28. End Structure
    WIESO FUNKTIONIERT DAS NICHT :cursing:

    Mein code ist:

    Spoiler anzeigen

    VB.NET-Quellcode

    1. Option Strict On
    2. Imports System.Collections.Generic
    3. Imports System.Runtime.InteropServices
    4. Imports System.Text
    5. Public Class Form1
    6. Private Const CCHFORMNAME = 32
    7. Private Const CCHDEVICENAME = 32
    8. Private Structure DEVMODE
    9. Dim dmDeviceName As String
    10. Dim dmSpecVersion As Short
    11. Dim dmDriverVersion As Short
    12. Dim dmSize As Short
    13. Dim dmDriverExtra As Short
    14. Dim dmFields As Integer
    15. Dim dmOrientation As Short
    16. Dim dmPaperSize As Short
    17. Dim dmPaperLength As Short
    18. Dim dmPaperWidth As Short
    19. Dim dmScale As Short
    20. Dim dmCopies As Short
    21. Dim dmDefaultSource As Short
    22. Dim dmPrintQuality As Short
    23. Dim dmColor As Short
    24. Dim dmDuplex As Short
    25. Dim dmYResolution As Short
    26. Dim dmTTOption As Short
    27. Dim dmCollate As Short
    28. Dim dmFormName As String
    29. Dim dmUnusedPadding As Short
    30. Dim dmBitsPerPel As Integer
    31. Dim dmPelsWidth As Integer
    32. Dim dmPelsHeight As Integer
    33. Dim dmDisplayFlags As Integer
    34. Dim dmDisplayFrequency As Integer
    35. End Structure
    36. Private Declare Function CreateDesktop Lib "user32.dll" Alias "CreateDesktopA" (ByVal lpszDesktop As String, _
    37. ByVal lpszDevice As String, ByRef pDevmode As DEVMODE, ByVal dwFlags As Int32, _
    38. ByVal dwDesiredAccess As Int32, ByRef lpsa As SECURITY_ATTRIBUTES) As Int32 REM lpszDevice, pdevmode, dwflags must be 0
    39. Private Declare Function SwitchDesktop Lib "user32" (ByVal hDesktop As IntPtr) As Boolean
    40. Private Declare Function GetThreadDesktop Lib "user32" (ByVal dwThread As Integer) As IntPtr
    41. Private Declare Function GetCurrentThreadId Lib "kernel32" () As IntPtr
    42. Private Declare Function OpenInputDesktop Lib "user32" ( _
    43. ByVal dwFlags As UInteger, _
    44. ByVal fInherit As Boolean, _
    45. ByVal dwDesiredAccess As UInteger _
    46. ) As IntPtr
    47. <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
    48. Structure STARTUPINFO
    49. Public cb As Integer
    50. Public lpReserved As String
    51. Public lpDesktop As String
    52. Public lpTitle As String
    53. Public dwX As Integer
    54. Public dwY As Integer
    55. Public dwXSize As Integer
    56. Public dwYSize As Integer
    57. Public dwXCountChars As Integer
    58. Public dwYCountChars As Integer
    59. Public dwFillAttribute As Integer
    60. Public dwFlags As Integer
    61. Public wShowWindow As Short
    62. Public cbReserved2 As Short
    63. Public lpReserved2 As Integer
    64. Public hStdInput As Integer
    65. Public hStdOutput As Integer
    66. Public hStdError As Integer
    67. End Structure
    68. Structure PROCESS_INFORMATION
    69. Public hProcess As IntPtr
    70. Public hThread As IntPtr
    71. Public dwProcessId As Integer
    72. Public dwThreadId As Integer
    73. End Structure
    74. <StructLayout(LayoutKind.Sequential)> _
    75. Structure SECURITY_ATTRIBUTES
    76. Public nLength As Integer
    77. Public lpSecurityDescriptor As IntPtr
    78. Public bInheritHandle As Integer
    79. End Structure
    80. <DllImport("kernel32.dll")> _
    81. Private Shared Function CreateProcess(ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As IntPtr, ByVal lpThreadAttributes As IntPtr, ByVal bInheritHandles As Boolean, ByVal dwCreationFlags As Integer, _
    82. ByVal lpEnvironment As IntPtr, ByVal lpCurrentDirectory As String, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean
    83. End Function
    84. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Shown
    85. Dim Normal As IntPtr = GetCurrentThreadId
    86. Dim Sperr As IntPtr = CType(CreateDesktop("Sperr", Nothing, Nothing, Nothing, 0, Nothing), IntPtr)
    87. SwitchDesktop(Sperr)
    88. Dim si As New STARTUPINFO()
    89. si.cb = Marshal.SizeOf(si)
    90. si.lpDesktop = "Sperr"
    91. Dim pi As New PROCESS_INFORMATION()
    92. ' start the process.
    93. Dim result As Boolean = CreateProcess(Nothing, "explorer.exe", IntPtr.Zero, IntPtr.Zero, True, 0, _
    94. IntPtr.Zero, Nothing, si, pi)
    95. System.Threading.Thread.Sleep(20000)
    96. SwitchDesktop(Normal)
    97. End Sub
    98. End Class

    Nur leider kackt die anwendung (in dem fall der explorer) direkt mit "Die Anwendung konnte nicht richtig initialisiert werden (0xc0000142). Klicken Sie auf "OK", um die Anwendung zu beenden. " ab. Und danach ist keine änderung von wegen nem anderen Desktop zu erkennen.
    1.

    VB.NET-Quellcode

    1. Private Declare Function SwitchDesktop Lib "user32.dll" (ByVal hDesktop As Int32) As Int32



    2. schau dir diese funktion genauer an:

    VB.NET-Quellcode

    1. public Process CreateProcess(string path)
    2. 524 {
    3. 525 // make sure object isnt disposed.
    4. 526 CheckDisposed();
    5. 527
    6. 528 // make sure a desktop is open.
    7. 529 if (!IsOpen) return null;
    8. 530
    9. 531 // set startup parameters.
    10. 532 STARTUPINFO si = new STARTUPINFO();
    11. 533 si.cb = Marshal.SizeOf(si);
    12. 534 si.lpDesktop = m_desktopName;
    13. 535
    14. 536 PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
    15. 537
    16. 538 // start the process.
    17. 539 bool result = CreateProcess(null, path, IntPtr.Zero, IntPtr.Zero, true, NORMAL_PRIORITY_CLASS, IntPtr.Zero, null, ref si, ref pi);
    18. 540
    19. 541 // error?
    20. 542 if (!result) return null;
    21. 543
    22. 544 // Get the process.
    23. 545 return Process.GetProcessById(pi.dwProcessId);


    3.

    VB.NET-Quellcode

    1. Private pi As PROCESS_INFORMATION
    2. Private si As STARTUPINFO

    Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „SystemUnknow“ ()