convert VB to C#

This commit is contained in:
2020-09-24 11:21:53 +02:00
parent 64277916cd
commit fecbeb4659
320 changed files with 17755 additions and 10320 deletions

View File

@@ -0,0 +1,11 @@
using System;
using System.Runtime.InteropServices;
namespace Pilz.Win32.Native
{
public class LibShell32
{
[DllImport("shell32.dll")]
public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
}
}

View File

@@ -1,9 +0,0 @@
Namespace Native
Public Class LibShell32
Public Declare Function SHGetFileInfo Lib "shell32.dll" (ByVal pszPath As String, ByVal dwFileAttributes As UInteger, ByRef psfi As SHFILEINFO, ByVal cbSizeFileInfo As UInteger, ByVal uFlags As UInteger) As IntPtr
End Class
End Namespace

View File

@@ -0,0 +1,20 @@
using System;
using global::System.Runtime.InteropServices;
namespace Pilz.Win32.Native
{
[StructLayout(LayoutKind.Sequential)]
public struct SHFILEINFO
{
public const uint SHGFI_ICON = 0x100U;
public const uint SHGFI_LARGEICON = 0x0U;
public const uint SHGFI_SMALLICON = 0x1U;
public IntPtr hIcon;
public IntPtr iIcon;
public uint dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
}
}

View File

@@ -1,21 +0,0 @@
Imports System.Runtime.InteropServices
Namespace Native
<StructLayout(LayoutKind.Sequential)>
Public Structure SHFILEINFO
Public Const SHGFI_ICON As UInteger = &H100
Public Const SHGFI_LARGEICON As UInteger = &H0
Public Const SHGFI_SMALLICON As UInteger = &H1
Public hIcon As IntPtr
Public iIcon As IntPtr
Public dwAttributes As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=260)>
Public szDisplayName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)>
Public szTypeName As String
End Structure
End Namespace