Advertisement
Guest User

Untitled

a guest
Oct 18th, 2010
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.40 KB | None | 0 0
  1. using System;
  2. using System.Runtime.InteropServices;
  3.  
  4.     [ComImport, Guid("4e530b0a-e611-4c77-a3ac-9031d022281b"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  5.     internal interface IApplicationAssociationRegistration
  6.     {
  7.         [return: MarshalAs(UnmanagedType.LPWStr)]
  8.         string QueryCurrentDefault([MarshalAs(UnmanagedType.LPWStr)] string pszQuery, Global.AssociationType atQueryType, Global.AssociationLevel alQueryLevel);
  9.  
  10.         [return: MarshalAs(UnmanagedType.Bool)]
  11.         bool QueryAppIsDefault([MarshalAs(UnmanagedType.LPWStr)] string pszQuery, Global.AssociationType atQueryType, Global.AssociationLevel alQueryLevel, [MarshalAs(UnmanagedType.LPWStr)] string pszAppRegistryName);
  12.  
  13.         [return: MarshalAs(UnmanagedType.Bool)]
  14.         bool QueryAppIsDefaultAll(Global.AssociationLevel alQueryLevel, [MarshalAs(UnmanagedType.LPWStr)] string pszAppRegistryName);
  15.  
  16.         void SetAppAsDefault([MarshalAs(UnmanagedType.LPWStr)] string pszAppRegistryName, [MarshalAs(UnmanagedType.LPWStr)] string pszSet, Global.AssociationType atSetType);
  17.  
  18.         void SetAppAsDefaultAll([MarshalAs(UnmanagedType.LPWStr)] string pszAppRegistryName);
  19.  
  20.         void ClearUserAssociations();
  21.     }
  22.  
  23.     [ComImport, Guid("591209c7-767b-42b2-9fba-44ee4615f2c7")]
  24.     internal class ApplicationAssociationRegistration
  25.     {
  26.         // Coclass is implemented by the runtime callable wrapper
  27.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement