internal static extern bool UrlIs([MarshalAs(UnmanagedType.LPWStr)] string pszUrl, Shell32.UrlType urlIs);
示例#2
0
 public IntPtr GetIcon(Shell32.FileAttributes iconAttributes)
 {
     return(Shell32.GetFileIcon(FullPath, iconAttributes));
 }
示例#3
0
      private static string GetString(NativeMethods.IQueryAssociations iQa, Shell32.AssociationString assocString, string shellVerb)
      {
         // GetString() throws Exceptions.
         try
         {
            // Use a large buffer to prevent calling this function twice.
            int size = NativeMethods.DefaultFileBufferSize;
            var buffer = new StringBuilder(size);

            iQa.GetString(Shell32.AssociationAttributes.NoTruncate | Shell32.AssociationAttributes.RemapRunDll, assocString, shellVerb, buffer, out size);

            return buffer.ToString();
         }
         catch
         {
            return string.Empty;
         }
      }
示例#4
0
 public IntPtr GetIcon(Shell32.FileAttributes iconAttributes)
 {
    return Shell32.GetFileIcon(FullPath, iconAttributes);
 }
 internal static extern uint AssocQueryString(Shell32.AssociationAttributes flags, Shell32.AssociationString str,
    [MarshalAs(UnmanagedType.LPWStr)] string pszAssoc, [MarshalAs(UnmanagedType.LPWStr)] string pszExtra,
    StringBuilder pszOut, [MarshalAs(UnmanagedType.U4)] out uint pcchOut);