Visual Studio Console Ausgabe UTF8



  • Danke für den Tipp, ist sehr ausführlich erklärt.

    Ich habe nun mal meinen Code etwas genauer angeschaut
    Dazu habe ich paar Fragen.

    Kann dies überhaupt stimmen? Dies wird mir angezeigt wenn ich im Debugger Modus bin und über die Variable drüber fahre.
    C:\\Users\\admin\\Test\\

    Wenn ich aber die Variable mit Console.Write ausgebe stimmt der String.
    Dann sieht das so aus:
    C:\Users\admin\Test\

    In dem Input Feld steht auch das hier drin:
    C:\Users\admin\Test\

    Wieso wird bei drüber fahren was anderes angezeigt?
    Kann davon auch mal ein Screenshot machen, wenn es nicht genu verständlich ist was ich meine.

    Und was sehr seltsam ist, überprüfe ich die Variable "Name" sehe ich ganz normal den Namen ohne irgendwelche Fragezeichen.

    Aber dennoch bei der Datei mit den kyrillischen Buchstaben funktioniert das nicht.

    Da kommt dann folgende Meldung: ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs.

    Das kommt bei drüberfahren der Variable:
    1:
    "C:\\Users\\admin\\Music\\Russian\\Daz Dillinger - Still-Get-Money.mp3"
    "C:\\Users\\admin\\Music\\Russian\\Daz Dillinger - Still-Get-Money.lnk"

    2:
    "C:\\Users\\admin\\Music\\Russian\\Lx24 - В эту ночь (feat. Ars Jam).mp3"
    "C:\\Users\\admin\\Music\\Russian\\Lx24 - В эту ночь (feat. Ars Jam).lnk"

    Variante 1 funktioniert einwandfrei Variante 2 wirft aber den Fehler.
    Ich bin so langsam echt am Verzweifeln. Weiß nicht mehr wo ich den Fehler suchen soll bzw. wo dieser nun genau liegt. Liegt das nun an dem kyrillischen Namen oder ist irgendwo anderes der Fehler verborgen.

    Danke für deine Hilfe.

    Th69 schrieb:

    Das eine hat doch mit dem anderen nichts zu tun (eine IOException erhältst du bei fehlerhaftem Zugriff auf das Dateisystem).

    Am besten benutze den Debugger dafür: [Artikel] Debugger: Wie verwende ich den von Visual Studio?


  • Administrator

    Das klingt immer noch danach, als ob du am falschen Ort suchst. Was du siehst ist nur der String mit den Escape-Zeichen. Um in einem String ein Backslash \ zu haben, musst du zwei davon schreiben:

    var text = "Backslash \\"; // Wird als Backslash \ ausgegeben
    

    Siehe dazu: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/strings/index#string-escape-sequences

    Zeig uns doch mal etwas Code (möglichst wenig), wo der Fehler aber auftritt.



  • Und gib an, welche .NET Version du im Projekt verwendest (du solltest mind. 4.0 verwenden)!



  • Okay danke dir, das habe ich soweit begriffen.

    Ich bin nun ein Stück weiter gekommen.
    Irgendwie hat es mit den kyrillischen Buchstaben auf sich.

    Und zwar wenn ich unter Windows in den Systemsteuerung -> nach Region suchen und dann unter Verwaltung-> Gebietsschema ändern und dort dann Russian auswähle funktioniert mein Code und es wird ein Shortcut von der Datei erstellt.

    Nun bin ich davon ausgegangen das ich mit einer Zeichenkonvertierung mein problem löse. Dazu habe ich folgende Methode.

    private string stringEncode(string unicodeString) {
    
                //Console.OutputEncoding = System.Text.Encoding.UTF8;
                System.Text.UnicodeEncoding unicode = new System.Text.UnicodeEncoding();
    
                // Encode the string.
                Byte[] encodedBytes = unicode.GetBytes(unicodeString);
                String decodedString = unicode.GetString(encodedBytes);
                Console.WriteLine("ENCODE: " + decodedString);
                return decodedString;
    }
    

    Dachte ich das ich damit mein Problem gelöst bekomme, aber Pustekuchen.
    Bekomme wieder den Fehler: ArgumentException:Der Wert liegt außerhalb des erwarteten Bereichs.

    Hast du eine Ahnung was hier noch fehlt.

    Danke für deine Hilfe.

    Dravere schrieb:

    Das klingt immer noch danach, als ob du am falschen Ort suchst. Was du siehst ist nur der String mit den Escape-Zeichen. Um in einem String ein Backslash \ zu haben, musst du zwei davon schreiben:

    var text = "Backslash \\"; // Wird als Backslash \ ausgegeben
    

    Siehe dazu: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/strings/index#string-escape-sequences

    Zeig uns doch mal etwas Code (möglichst wenig), wo der Fehler aber auftritt.



  • Microsoft .NET Framework Version. 4.6.01586

    Th69 schrieb:

    Und gib an, welche .NET Version du im Projekt verwendest (du solltest mind. 4.0 verwenden)!



  • Jetzt sind wir wieder bei dem "Link Erzeugen" Thema.
    Dass es so wie du es versuchst nicht geht, liegt einfach daran dass das Ding mit dem du arbeitest nicht mit Unicode klarkommt.

    Womit wir wieder bei IShellLinkW wären:
    http://www.pinvoke.net/default.aspx/Interfaces.IShellLinkW

    ps:
    Hier. Getestet, funktioniert (unabhängig von der eingestellten Sprache):

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace CreateLink
    {
        class Program
        {
            static void Main(string[] args)
            {
                CreateLink(@"C:\Temp\Lx24 - ... (feat. Ars Jam).mp3", @"C:\Temp\Lx24 - ... (feat. Ars Jam).lnk");
            }
    
            static void CreateLink(string targetName, string linkName)
            {
                var shellLink = new ShellLink() as IShellLinkW;
                shellLink.SetPath(targetName);
                ((IPersistFile)shellLink).Save(linkName, true);
            }
        }
    }
    
    // CLSID_ShellLink from ShlGuid.h 
    [
        ComImport(),
        Guid("00021401-0000-0000-C000-000000000046")
    ]
    public class ShellLink
    {
    }
    
    /// <summary>The IShellLink interface allows Shell links to be created, modified, and resolved</summary>
    [ComImport(), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("000214F9-0000-0000-C000-000000000046")]
    interface IShellLinkW
    {
        /// <summary>Retrieves the path and file name of a Shell link object</summary>
        void GetPath([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, int cchMaxPath, out WIN32_FIND_DATAW pfd, SLGP_FLAGS fFlags);
        /// <summary>Retrieves the list of item identifiers for a Shell link object</summary>
        void GetIDList(out IntPtr ppidl);
        /// <summary>Sets the pointer to an item identifier list (PIDL) for a Shell link object.</summary>
        void SetIDList(IntPtr pidl);
        /// <summary>Retrieves the description string for a Shell link object</summary>
        void GetDescription([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, int cchMaxName);
        /// <summary>Sets the description for a Shell link object. The description can be any application-defined string</summary>
        void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
        /// <summary>Retrieves the name of the working directory for a Shell link object</summary>
        void GetWorkingDirectory([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, int cchMaxPath);
        /// <summary>Sets the name of the working directory for a Shell link object</summary>
        void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
        /// <summary>Retrieves the command-line arguments associated with a Shell link object</summary>
        void GetArguments([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs, int cchMaxPath);
        /// <summary>Sets the command-line arguments for a Shell link object</summary>
        void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
        /// <summary>Retrieves the hot key for a Shell link object</summary>
        void GetHotkey(out short pwHotkey);
        /// <summary>Sets a hot key for a Shell link object</summary>
        void SetHotkey(short wHotkey);
        /// <summary>Retrieves the show command for a Shell link object</summary>
        void GetShowCmd(out int piShowCmd);
        /// <summary>Sets the show command for a Shell link object. The show command sets the initial show state of the window.</summary>
        void SetShowCmd(int iShowCmd);
        /// <summary>Retrieves the location (path and index) of the icon for a Shell link object</summary>
        void GetIconLocation([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath,
            int cchIconPath, out int piIcon);
        /// <summary>Sets the location (path and index) of the icon for a Shell link object</summary>
        void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
        /// <summary>Sets the relative path to the Shell link object</summary>
        void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, int dwReserved);
        /// <summary>Attempts to find the target of a Shell link, even if it has been moved or renamed</summary>
        void Resolve(IntPtr hwnd, SLR_FLAGS fFlags);
        /// <summary>Sets the path and file name of a Shell link object</summary>
        void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
    }
    
    [Flags()]
    enum SLGP_FLAGS
    {
        /// <summary>Retrieves the standard short (8.3 format) file name</summary>
        SLGP_SHORTPATH = 0x1,
        /// <summary>Retrieves the Universal Naming Convention (UNC) path name of the file</summary>
        SLGP_UNCPRIORITY = 0x2,
        /// <summary>Retrieves the raw path name. A raw path is something that might not exist and may include environment variables that need to be expanded</summary>
        SLGP_RAWPATH = 0x4
    }
    
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    struct WIN32_FIND_DATAW
    {
        public uint dwFileAttributes;
        public long ftCreationTime;
        public long ftLastAccessTime;
        public long ftLastWriteTime;
        public uint nFileSizeHigh;
        public uint nFileSizeLow;
        public uint dwReserved0;
        public uint dwReserved1;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
        public string cFileName;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
        public string cAlternateFileName;
    }
    
    [Flags()]
    enum SLR_FLAGS
    {
        /// <summary>
        /// Do not display a dialog box if the link cannot be resolved. When SLR_NO_UI is set,
        /// the high-order word of fFlags can be set to a time-out value that specifies the
        /// maximum amount of time to be spent resolving the link. The function returns if the
        /// link cannot be resolved within the time-out duration. If the high-order word is set
        /// to zero, the time-out duration will be set to the default value of 3,000 milliseconds
        /// (3 seconds). To specify a value, set the high word of fFlags to the desired time-out
        /// duration, in milliseconds.
        /// </summary>
        SLR_NO_UI = 0x1,
        /// <summary>Obsolete and no longer used</summary>
        SLR_ANY_MATCH = 0x2,
        /// <summary>If the link object has changed, update its path and list of identifiers.
        /// If SLR_UPDATE is set, you do not need to call IPersistFile::IsDirty to determine
        /// whether or not the link object has changed.</summary>
        SLR_UPDATE = 0x4,
        /// <summary>Do not update the link information</summary>
        SLR_NOUPDATE = 0x8,
        /// <summary>Do not execute the search heuristics</summary>
        SLR_NOSEARCH = 0x10,
        /// <summary>Do not use distributed link tracking</summary>
        SLR_NOTRACK = 0x20,
        /// <summary>Disable distributed link tracking. By default, distributed link tracking tracks
        /// removable media across multiple devices based on the volume name. It also uses the
        /// Universal Naming Convention (UNC) path to track remote file systems whose drive letter
        /// has changed. Setting SLR_NOLINKINFO disables both types of tracking.</summary>
        SLR_NOLINKINFO = 0x40,
        /// <summary>Call the Microsoft Windows Installer</summary>
        SLR_INVOKE_MSI = 0x80
    }
    
    [ComImport, Guid("0000010c-0000-0000-c000-000000000046"),
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IPersist
    {
        [PreserveSig]
        void GetClassID(out Guid pClassID);
    }
    
    [ComImport, Guid("0000010b-0000-0000-C000-000000000046"),
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IPersistFile : IPersist
    {
        new void GetClassID(out Guid pClassID);
        [PreserveSig]
        int IsDirty();
    
        [PreserveSig]
        void Load([In, MarshalAs(UnmanagedType.LPWStr)]
        string pszFileName, uint dwMode);
    
        [PreserveSig]
        void Save([In, MarshalAs(UnmanagedType.LPWStr)] string pszFileName,
            [In, MarshalAs(UnmanagedType.Bool)] bool fRemember);
    
        [PreserveSig]
        void SaveCompleted([In, MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
    
        [PreserveSig]
        void GetCurFile([In, MarshalAs(UnmanagedType.LPWStr)] string ppszFileName);
    }
    

    Dabei musst du nix mit irgendwelchen Encodings rummachen, Strings in C# sind sowieso immer Unicode (UTF-16).



  • Danke dir.

    Was gerade ziemlich komisch war, ist als ich den Code ausgeführt habe,
    hat meine Antiviren-Software Alarm geschlagen.

    Und anscheinend sind über 1500 Dateien heruntergeladen.

    Du hast ja den Code, eins zu eins ausgeführt?

    Ich vermute das war nun ein komischer Zufall. Kann sein das dies von einer Webseite aus passiert ist als ich nach was recherchiert habe.

    Eine andere Frage, wie am besten kann ich mich von Viren schützen.

    Wenn es geht würde ich dich per PN anschreiben.
    Das hat mir jetzt etwas zu denken gegeben.

    hustbaer schrieb:

    Jetzt sind wir wieder bei dem "Link Erzeugen" Thema.
    Dass es so wie du es versuchst nicht geht, liegt einfach daran dass das Ding mit dem du arbeitest nicht mit Unicode klarkommt.

    Womit wir wieder bei IShellLinkW wären:
    http://www.pinvoke.net/default.aspx/Interfaces.IShellLinkW

    ps:
    Hier. Getestet, funktioniert (unabhängig von der eingestellten Sprache):

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace CreateLink
    {
        class Program
        {
            static void Main(string[] args)
            {
                CreateLink(@"C:\Temp\Lx24 - ... (feat. Ars Jam).mp3", @"C:\Temp\Lx24 - ... (feat. Ars Jam).lnk");
            }
    
            static void CreateLink(string targetName, string linkName)
            {
                var shellLink = new ShellLink() as IShellLinkW;
                shellLink.SetPath(targetName);
                ((IPersistFile)shellLink).Save(linkName, true);
            }
        }
    }
    
    // CLSID_ShellLink from ShlGuid.h 
    [
        ComImport(),
        Guid("00021401-0000-0000-C000-000000000046")
    ]
    public class ShellLink
    {
    }
    
    /// <summary>The IShellLink interface allows Shell links to be created, modified, and resolved</summary>
    [ComImport(), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("000214F9-0000-0000-C000-000000000046")]
    interface IShellLinkW
    {
        /// <summary>Retrieves the path and file name of a Shell link object</summary>
        void GetPath([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, int cchMaxPath, out WIN32_FIND_DATAW pfd, SLGP_FLAGS fFlags);
        /// <summary>Retrieves the list of item identifiers for a Shell link object</summary>
        void GetIDList(out IntPtr ppidl);
        /// <summary>Sets the pointer to an item identifier list (PIDL) for a Shell link object.</summary>
        void SetIDList(IntPtr pidl);
        /// <summary>Retrieves the description string for a Shell link object</summary>
        void GetDescription([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, int cchMaxName);
        /// <summary>Sets the description for a Shell link object. The description can be any application-defined string</summary>
        void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
        /// <summary>Retrieves the name of the working directory for a Shell link object</summary>
        void GetWorkingDirectory([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, int cchMaxPath);
        /// <summary>Sets the name of the working directory for a Shell link object</summary>
        void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
        /// <summary>Retrieves the command-line arguments associated with a Shell link object</summary>
        void GetArguments([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs, int cchMaxPath);
        /// <summary>Sets the command-line arguments for a Shell link object</summary>
        void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
        /// <summary>Retrieves the hot key for a Shell link object</summary>
        void GetHotkey(out short pwHotkey);
        /// <summary>Sets a hot key for a Shell link object</summary>
        void SetHotkey(short wHotkey);
        /// <summary>Retrieves the show command for a Shell link object</summary>
        void GetShowCmd(out int piShowCmd);
        /// <summary>Sets the show command for a Shell link object. The show command sets the initial show state of the window.</summary>
        void SetShowCmd(int iShowCmd);
        /// <summary>Retrieves the location (path and index) of the icon for a Shell link object</summary>
        void GetIconLocation([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath,
            int cchIconPath, out int piIcon);
        /// <summary>Sets the location (path and index) of the icon for a Shell link object</summary>
        void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
        /// <summary>Sets the relative path to the Shell link object</summary>
        void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, int dwReserved);
        /// <summary>Attempts to find the target of a Shell link, even if it has been moved or renamed</summary>
        void Resolve(IntPtr hwnd, SLR_FLAGS fFlags);
        /// <summary>Sets the path and file name of a Shell link object</summary>
        void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
    }
    
    [Flags()]
    enum SLGP_FLAGS
    {
        /// <summary>Retrieves the standard short (8.3 format) file name</summary>
        SLGP_SHORTPATH = 0x1,
        /// <summary>Retrieves the Universal Naming Convention (UNC) path name of the file</summary>
        SLGP_UNCPRIORITY = 0x2,
        /// <summary>Retrieves the raw path name. A raw path is something that might not exist and may include environment variables that need to be expanded</summary>
        SLGP_RAWPATH = 0x4
    }
    
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    struct WIN32_FIND_DATAW
    {
        public uint dwFileAttributes;
        public long ftCreationTime;
        public long ftLastAccessTime;
        public long ftLastWriteTime;
        public uint nFileSizeHigh;
        public uint nFileSizeLow;
        public uint dwReserved0;
        public uint dwReserved1;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
        public string cFileName;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
        public string cAlternateFileName;
    }
    
    [Flags()]
    enum SLR_FLAGS
    {
        /// <summary>
        /// Do not display a dialog box if the link cannot be resolved. When SLR_NO_UI is set,
        /// the high-order word of fFlags can be set to a time-out value that specifies the
        /// maximum amount of time to be spent resolving the link. The function returns if the
        /// link cannot be resolved within the time-out duration. If the high-order word is set
        /// to zero, the time-out duration will be set to the default value of 3,000 milliseconds
        /// (3 seconds). To specify a value, set the high word of fFlags to the desired time-out
        /// duration, in milliseconds.
        /// </summary>
        SLR_NO_UI = 0x1,
        /// <summary>Obsolete and no longer used</summary>
        SLR_ANY_MATCH = 0x2,
        /// <summary>If the link object has changed, update its path and list of identifiers.
        /// If SLR_UPDATE is set, you do not need to call IPersistFile::IsDirty to determine
        /// whether or not the link object has changed.</summary>
        SLR_UPDATE = 0x4,
        /// <summary>Do not update the link information</summary>
        SLR_NOUPDATE = 0x8,
        /// <summary>Do not execute the search heuristics</summary>
        SLR_NOSEARCH = 0x10,
        /// <summary>Do not use distributed link tracking</summary>
        SLR_NOTRACK = 0x20,
        /// <summary>Disable distributed link tracking. By default, distributed link tracking tracks
        /// removable media across multiple devices based on the volume name. It also uses the
        /// Universal Naming Convention (UNC) path to track remote file systems whose drive letter
        /// has changed. Setting SLR_NOLINKINFO disables both types of tracking.</summary>
        SLR_NOLINKINFO = 0x40,
        /// <summary>Call the Microsoft Windows Installer</summary>
        SLR_INVOKE_MSI = 0x80
    }
    
    [ComImport, Guid("0000010c-0000-0000-c000-000000000046"),
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IPersist
    {
        [PreserveSig]
        void GetClassID(out Guid pClassID);
    }
    
    [ComImport, Guid("0000010b-0000-0000-C000-000000000046"),
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IPersistFile : IPersist
    {
        new void GetClassID(out Guid pClassID);
        [PreserveSig]
        int IsDirty();
    
        [PreserveSig]
        void Load([In, MarshalAs(UnmanagedType.LPWStr)]
        string pszFileName, uint dwMode);
    
        [PreserveSig]
        void Save([In, MarshalAs(UnmanagedType.LPWStr)] string pszFileName,
            [In, MarshalAs(UnmanagedType.Bool)] bool fRemember);
    
        [PreserveSig]
        void SaveCompleted([In, MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
    
        [PreserveSig]
        void GetCurFile([In, MarshalAs(UnmanagedType.LPWStr)] string ppszFileName);
    }
    

    Dabei musst du nix mit irgendwelchen Encodings rummachen, Strings in C# sind sowieso immer Unicode (UTF-16).



  • ...D-J... schrieb:

    Was gerade ziemlich komisch war, ist als ich den Code ausgeführt habe,
    hat meine Antiviren-Software Alarm geschlagen.

    Und anscheinend sind über 1500 Dateien heruntergeladen.

    Aha.

    ...D-J... schrieb:

    Du hast ja den Code, eins zu eins ausgeführt?

    Ja.

    ...D-J... schrieb:

    Ich vermute das war nun ein komischer Zufall. Kann sein das dies von einer Webseite aus passiert ist als ich nach was recherchiert habe.

    Kann leicht sein. Mit meinen Programm hat es auf jeden Fall nix zu tun. Abgesehen von den ganzen PInvoke Definitionen sind das ja auch gerade mal ganze 3 Zeile Code.

    ...D-J... schrieb:

    Eine andere Frage, wie am besten kann ich mich von Viren schützen.

    Dann mach einen Thread zu dem Thema auf.

    ...D-J... schrieb:

    Wenn es geht würde ich dich per PN anschreiben.
    Das hat mir jetzt etwas zu denken gegeben.

    Ich erteile keinen Privatunterricht im "sich gegen Viren schützen". Ich bin 'was das Thema angeht auch keine Authorität. Ich selbst verwende ausser Windows Defender keinen Virenkiller, könnte dir also auch keinen empfehlen. Ansonsten... einen Ad-Blocker installieren und nicht auf jeden Scheiss draufklicken?



  • Okay bin auch nicht davon ausgegangen, dass du mir Privarunterricht gibst.
    Dachte nur vielleicht gibt es irgendwelche Methoden/Tools um sich besser von Angreifern zu schützen.

    Wenn man die Anzahl deine Beiträge so sieht, scheinst du ein Experte zu sein.

    Trotzdem nochmals danke, für den Code.
    Komme nun mit meinem Code wieder weiter.

    Eine Frage hätte ich noch...
    Das vielleicht zu einem späteren Zeitpunkt.

    Könnte sein das die Frage für dich etwas lächerlich erscheint...

    hustbaer schrieb:

    ...D-J... schrieb:

    Was gerade ziemlich komisch war, ist als ich den Code ausgeführt habe,
    hat meine Antiviren-Software Alarm geschlagen.

    Und anscheinend sind über 1500 Dateien heruntergeladen.

    Aha.

    ...D-J... schrieb:

    Du hast ja den Code, eins zu eins ausgeführt?

    Ja.

    ...D-J... schrieb:

    Ich vermute das war nun ein komischer Zufall. Kann sein das dies von einer Webseite aus passiert ist als ich nach was recherchiert habe.

    Kann leicht sein. Mit meinen Programm hat es auf jeden Fall nix zu tun. Abgesehen von den ganzen PInvoke Definitionen sind das ja auch gerade mal ganze 3 Zeile Code.

    ...D-J... schrieb:

    Eine andere Frage, wie am besten kann ich mich von Viren schützen.

    Dann mach einen Thread zu dem Thema auf.

    ...D-J... schrieb:

    Wenn es geht würde ich dich per PN anschreiben.
    Das hat mir jetzt etwas zu denken gegeben.

    Ich erteile keinen Privatunterricht im "sich gegen Viren schützen". Ich bin 'was das Thema angeht auch keine Authorität. Ich selbst verwende ausser Windows Defender keinen Virenkiller, könnte dir also auch keinen empfehlen. Ansonsten... einen Ad-Blocker installieren und nicht auf jeden Scheiss draufklicken?



  • ...D-J... schrieb:

    Okay bin auch nicht davon ausgegangen, dass du mir Privarunterricht gibst.
    Dachte nur vielleicht gibt es irgendwelche Methoden/Tools um sich besser von Angreifern zu schützen.

    Dann kannst du ja jederzeit einen Thread in z.B. "Themen rund um die IT" aufmachen. Wenn du willst kannst du mir dann auch nen Link auf den Thread über die "E-Mail senden" Funktion des Forum schicken. Bloss erwarte nicht dass ich dann unbedingt darauf reagiere 😃

    ...D-J... schrieb:

    Wenn man die Anzahl deine Beiträge so sieht, scheinst du ein Experte zu sein.

    Für bestimmte Dinge vermutlich. Für andere wiederrum ganz sicher nicht. Und Virenschutz gehört wohl eher zu diesen "anderen" Dingen.

    ...D-J... schrieb:

    Eine Frage hätte ich noch...
    Das vielleicht zu einem späteren Zeitpunkt.

    Dann stell sie. Also zu dem Zeitpunkt wo du genügend Informationen beisammen hast dass man sie sinnvoll beantworten kann. Entweder, wenn sie mit "Visual Studio Console Ausgabe UTF8" hier, oder in einem neuen Thread im passenden Forum.

    ...D-J... schrieb:

    Könnte sein das die Frage für dich etwas lächerlich erscheint...

    Ich versuche generell mich mit blöden Kommentaren zurückzuhalten. Klappt nicht immer, aber ich versuchs 😉
    Was generell hilft ist wenn man a) klar verstehen kann worum es geht b) die Frage klar formutliert ist, und nicht vom Leser erraten bzw. dazugedacht werden mus) und c) es den Anschein macht dass du versucht hast es selbst rauszubekommen.
    (Natürlich passiert es auch dann immer noch dass jemand nen blödes Kommentar dazu schreibt, aber halt wesentlich seltener wenn man diese Dinge nicht beachtet.)

    Und BTW: Bitte nicht top posten.



  • Nehmt euch ein Zimmer, dann kannst du hustbaer vielleicht in schönen Dessous nerven 😉


Anmelden zum Antworten