Desktop Functions: Smart Device Functions:
|
Search Results for "32" in [All]winscard1: SCardConnect
UInt32 dwShareMode,
UInt32 dwPreferredProtocols,
out UInt32 pdwActiveProtocol); This static class contains a single method to detect whether a smartcard is inserted in any reader. Tested under 32- and 64-bit Vista.
#region Win32
ref UInt32 pcchReaders
static extern Int32 SCardGetAttrib(
UInt32 dwAttrId, // Identifier for the attribute to get
const UInt32 SCARD_ATTR_ATR_STRING = 0x00090303;
Int32 ret;
ref UInt32 pcchReaders
Int32 pcchReaders = 0;
public UInt32 dwProtocol;
public UInt32 cbPciLength;
UInt32 SendBuffLen,
ref UInt32 RecvBuffLen
[DllImport("kernel32.dll", SetLastError=true)]
[DllImport("kernel32.dll")]
[DllImport("kernel32.dll")] 6: WinSCard
internal static extern uint SCardGetStatusChange(IntPtr hContext, UInt32 dwTimeout, [In, Out] SCARD_READERSTATE[] rgReaderStates, UInt32 cReaders);
internal UInt32 dwCurrentState;
internal UInt32 dwEventState;
internal UInt32 cbAtr;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] UInt32 nbReaders = 1; readerState[0].dwCurrentState = (UInt32)SCardState.UNAWARE; propsyswinspool9: AddMonitor
private static extern Int32 AddMonitor(String pName, UInt32 Level, ref MONITOR_INFO_2 pMonitors);
string errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message; 10: ClosePrinter
Private Shared Function ClosePrinter(ByVal hPrinter As Int32) As Boolean 11: DeleteMonitor
private static extern Int32 DeleteMonitor(String pName, String pEnvironment, String pMonitorName);
string errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message; 12: DeletePrinter
throw new Win32Exception(Marshal.GetLastWin32Error());
throw new Win32Exception(Marshal.GetLastWin32Error()); 14: EnumJobs
UInt32 FirstJob, // index of first job
UInt32 NoJobs, // number of jobs to enumerate
UInt32 Level, // information level
UInt32 cbBuf, // size of job information buffer
out UInt32 pcbNeeded, // bytes received or required
out UInt32 pcReturned // number of jobs received
ByVal FirstJob As UInt32, _
ByVal NoJobs As UInt32, _
ByVal Level As UInt32, _
ByVal cdBuf As UInt32, _
ByRef pcbNeeded As UInt32, _
ByRef pcReturned As UInt32) _
Dim lNeeded As UInt32
Dim lReturned As UInt32
Dim lRetrieve As UInt32 15: EnumMonitors
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == ERROR_INSUFFICIENT_BUFFER)
currentMonitor = (IntPtr)(currentMonitor.ToInt32() + Marshal.SizeOf(typeof(MONITOR_INFO_2)));
throw new Win32Exception(Marshal.GetLastWin32Error()); 16: EnumPorts
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error != 122)
throw new Win32Exception(lastWin32Error);
currentPort = (IntPtr) (currentPort.ToInt32() + Marshal.SizeOf(typeof (PORT_INFO_2)));
throw new Win32Exception(Marshal.GetLastWin32Error());
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error != 122)
throw new Win32Exception(lastWin32Error);
int offset = pAddr.ToInt32();
throw new Win32Exception(Marshal.GetLastWin32Error()); 18: EnumPrinters
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == ERROR_INSUFFICIENT_BUFFER)
int offset = pAddr.ToInt32();
lastWin32Error = Marshal.GetLastWin32Error();
throw new Win32Exception(lastWin32Error);
string printProcessorName, UInt32 level, IntPtr dataTypesBuf,
UInt32 bufSize, ref UInt32 bytesNeeded, ref UInt32 numStructsReturned);
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == ErrorInsufficientBuffer) {
int offset = rawBuffer.ToInt32();
//lastWin32Error = Marshal.GetLastWin32Error();
private static extern bool EnumPrintProcessors(string pName,string pEnvironment,UInt32 Level,IntPtr pPrintProcessorInfo,UInt32 cbBuf,
ref UInt32 cbNeeded, ref UInt32 cReturned);
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == ERROR_INSUFFICIENT_BUFFER)
int offset = pAddr.ToInt32();
lastWin32Error = Marshal.GetLastWin32Error();
[In] Int32 fwFlags,
[In] Int32 fwOptions, 22: FlushPrinter
private static extern bool FlushPrinter(IntPtr hPrinter,IntPtr pBuf,Int32 cbBuf,out Int32 pcWritten,Int32 cSleep);
(ByVal pszBuffer As System.Text.StringBuilder, ByRef pcchBuffer As Int32) As Boolean
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == ERROR_INSUFFICIENT_BUFFER)
lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == ERROR_FILE_NOT_FOUND)
throw new Win32Exception(Marshal.GetLastWin32Error()); 24: OpenPrinter
private static extern bool OpenPrinter([MarshalAs(UnmanagedType.LPStr)] string szPrinter, out IntPtr hPrinter, Int32 pDefault); As always, only do SetLastError=true if you actually intend to call GetLastError (This includes throwing a Win32Exception if the call fails) 25: WritePrinter
private static extern bool WritePrinter(IntPtr hPrinter, IntPtr pBytes, UInt32 dwCount, out UInt32 dwWritten);
Public Shared Function WritePrinter(ByVal hPrinter As IntPtr, ByVal pBytes As IntPtr, ByVal dwCount As Int32, ByRef dwWritten As Int32) As Boolean <DllImport("winspool.drv")> Private Function WritePrinter(ByVal hPrinter As IntPtr, ByVal pBytes As IntPtr, ByVal dwCount As UInt32, ByVal dwWritten As UInt32) As Boolean
// From: http://support.microsoft.com/kb/322091
public static bool SendBytesToPrinter( string szPrinterName, IntPtr pBytes, Int32 dwCount)
Int32 dwError = 0, dwWritten = 0;
dwError = Marshal.GetLastWin32Error(); Interfaces
Sub NewWindow3(<In, Out, MarshalAs(UnmanagedType.IDispatch)> ByRef ppDisp As Object, <In, Out, MarshalAs(UnmanagedType.VariantBool)> ByRef Cancel As Boolean, ByVal dwFlags As UInt32, <MarshalAs(UnmanagedType.BStr)> ByVal bstrUrlContext As String, <MarshalAs(UnmanagedType.BStr)> ByVal bstrUrl As String)
Win32Exception we=new Win32Exception(Marshal.GetLastWin32Error() ,e.Message); 29: IClassFactory
void LockServer(Int32 fLock);
Sub LockServer(ByVal fLock As Int32)
<DllImport("ole32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True, PreserveSig:=False)> You can instantiate a IClassFactory2 thanks to the CoGetClassObject (from OLE32.DLL)
IClassFactory2 icf2 = Ole32.CoGetClassObject( 30: IClassFactory2
void LockServer(Int32 fLock);
Private Sub LockServer(ByVal fLock As Int32) You can instantiate a IClassFactory2 thanks to the CoGetClassObject (from OLE32.DLL)
IClassFactory2 icf2 = Ole32.CoGetClassObject( 31: IDeskBand
int CloseDW([In] Int32 dwReserved);
int GetBandInfo([In] Int32 dwBandID, [In] Int32 dwViewMode, [In, Out] ref DESKBANDINFO pdbi);
Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO) Imports Microsoft.Win32
Public Overridable Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef dbi As DESKBANDINFO) Implements IDeskBand.GetBandInfo, IDeskBand2.GetBandInfo
Public Overridable Sub CloseDW(dwReserved As UInt32) Implements IDeskBand.CloseDW, IDockingWindow.CloseDW
Public Overridable Sub UIActivateIO(fActivate As Int32, ByRef Msg As MSG) Implements IInputObject.UIActivateIO
Public Overridable Function HasFocusIO() As Int32 Implements IInputObject.HasFocusIO
Public Overridable Function TranslateAcceleratorIO(ByRef msg As MSG) As Int32 Implements IInputObject.TranslateAcceleratorIO
<Guid("C6FC82EA-AF64-43AF-BA1F-32A634C5FCC7")> _
Public dwMask As UInt32
Public crBkgnd As Int32
Sub CloseDW(<[In]> dwReserved As UInt32)
Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)
Sub CloseDW(<[In]()> dwReserved As UInt32)
Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)
Sub UIActivateIO(fActivate As Int32, ByRef msg As MSG)
Function HasFocusIO() As Int32
Function TranslateAcceleratorIO(ByRef msg As MSG) As Int32
Function OnFocusChangeIS(<MarshalAs(UnmanagedType.IUnknown)> punkObj As [Object], fSetFocus As Int32) As Int32
Public x As Int32
Public y As Int32
Public message As UInt32
Public wParam As UInt32
Public lParam As Int32
Public time As UInt32 32: IDeskBand2
int CloseDW([In] Int32 dwReserved);
int GetBandInfo([In] Int32 dwBandID, [In] Int32 dwViewMode, [In, Out] ref DESKBANDINFO pdbi);
Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO) Imports Microsoft.Win32
Public Overridable Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef dbi As DESKBANDINFO) Implements IDeskBand.GetBandInfo, IDeskBand2.GetBandInfo
Public Overridable Sub CloseDW(dwReserved As UInt32) Implements IDeskBand.CloseDW, IDockingWindow.CloseDW
Public Overridable Sub UIActivateIO(fActivate As Int32, ByRef Msg As MSG) Implements IInputObject.UIActivateIO
Public Overridable Function HasFocusIO() As Int32 Implements IInputObject.HasFocusIO
Public Overridable Function TranslateAcceleratorIO(ByRef msg As MSG) As Int32 Implements IInputObject.TranslateAcceleratorIO <Guid("C6FC82EA-AF64-43AF-BA1F-32A634C5FCC7")> _
Public dwMask As UInt32
Public crBkgnd As Int32
Sub CloseDW(<[In]> dwReserved As UInt32)
Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)
Sub CloseDW(<[In]()> dwReserved As UInt32)
Sub GetBandInfo(dwBandID As UInt32, dwViewMode As UInt32, ByRef pdbi As DESKBANDINFO)
Sub UIActivateIO(fActivate As Int32, ByRef msg As MSG)
Function HasFocusIO() As Int32
Function TranslateAcceleratorIO(ByRef msg As MSG) As Int32
Function OnFocusChangeIS(<MarshalAs(UnmanagedType.IUnknown)> punkObj As [Object], fSetFocus As Int32) As Int32
Public x As Int32
Public y As Int32
Public message As UInt32
Public wParam As UInt32
Public lParam As Int32
Public time As UInt32 33: IDeviceTopology
[Guid("2A07407E-6497-4A18-9787-32F79BD0D98F"),
Sub GetOverrideKeyPath(<MarshalAs(UnmanagedType.BStr)> ByRef pchKey As String, dw As UInt32)
Sub GetOverrideKeyPath(<MarshalAs(UnmanagedType.BStr)> ByRef pchKey As String, dw As UInt32)
var point = new drawing.Point(Convert.ToInt32(pointWpf.X), Convert.ToInt32(pointWpf.Y));
var point = new drawing.Point(Convert.ToInt32(pointWpf.X), Convert.ToInt32(pointWpf.Y)); 37: IEnumPStoreItems 38: IEnumPStoreTypes 39: IExtractImage
ByRef prgSize As Win32.SIZE, _ 40: IFileOpenDialog
[ComImport, Guid ( "d57c7288-d4ad-4768-be02-9d969532d960" ), InterfaceType ( ComInterfaceType.InterfaceIsIUnknown )]
Guid("00000323-0000-0000-C000-000000000046")
Sub GetBindInfo(<Out()> ByRef grfBINDF As UInt32, <[In](), Out()> ByRef pbindinfo As BINDINFO)
Sub GetBindString(ByVal ulStringType As UInt32, <MarshalAs(UnmanagedType.LPWStr)> ByRef ppwzStr As String, ByVal cEl As UInt32, ByRef pcElFetched As UInt32)
Sub ReportProgress(ByVal ulStatusCode As UInt32, <MarshalAs(UnmanagedType.LPWStr)> ByVal szStatusText As String)
Sub ReportData(ByVal grfBSCF As BSCF, ByVal ulProgress As UInt32, ByVal ulProgressMax As UInt32)
Sub ReportResult(ByVal hrResult As Integer, ByVal dwError As UInt32, <MarshalAs(UnmanagedType.LPWStr)> ByVal szResult As String)
Sub ReportProgress(ByVal ulStatusCode As UInt32, <MarshalAs(UnmanagedType.LPWStr)> ByVal szStatusText As String)
Sub ReportData(ByVal grfBSCF As BSCF, ByVal ulProgress As UInt32, ByVal ulProgressMax As UInt32)
Sub ReportResult(ByVal hrResult As Integer, ByVal dwError As UInt32, <MarshalAs(UnmanagedType.LPWStr)> ByVal szResult As String)
ref UInt32 pdwZone, UInt32 dwFlags);
ref UInt32 pcbSecurityId, uint dwReserved);
UInt32 dwAction, out byte pPolicy, UInt32 cbPolicy,
byte pContext, UInt32 cbContext, UInt32 dwFlags,
UInt32 dwReserved);
ref Guid guidKey, ref byte ppPolicy, ref UInt32 pcbPolicy,
ref byte pContext, UInt32 cbContext, UInt32 dwReserved);
int SetZoneMapping(UInt32 dwZone,
UInt32 dwFlags);
int GetZoneMappings(UInt32 dwZone, out UCOMIEnumString ppenumString,
UInt32 dwFlags);
out UInt32 pdwZone, UInt32 dwFlags);
ref UInt32 pcbSecurityId, uint dwReserved);
UInt32 dwAction, out byte pPolicy, UInt32 cbPolicy,
byte pContext, UInt32 cbContext, UInt32 dwFlags,
UInt32 dwReserved);
ref Guid guidKey, ref byte ppPolicy, ref UInt32 pcbPolicy,
ref byte pContext, UInt32 cbContext, UInt32 dwReserved);
int SetZoneMapping(UInt32 dwZone,
UInt32 dwFlags);
int GetZoneMappings(UInt32 dwZone, out UCOMIEnumString ppenumString,
UInt32 dwFlags);
ByRef pdwZone As UInt32, ByVal dwFlags As UInt32) As <MarshalAs(UnmanagedType.I4)> Integer
ByRef pcbSecurityId As UInt32, ByVal dwReserved As UInt32) As <MarshalAs(UnmanagedType.I4)> Integer
ByVal dwAction As UInt32, <[Out]()> ByVal pPolicy As Byte, ByVal cbPolicy As UInt32,
ByVal pContext As Byte, ByVal cbContext As UInt32, ByVal dwFlags As UInt32,
ByVal dwReserved As UInt32) As <MarshalAs(UnmanagedType.I4)> Integer
ByRef guidKey As Guid, ByRef ppPolicy As Byte, ByRef pcbPolicy As UInt32,
ByRef pContext As Byte, ByVal cbContext As UInt32, ByVal dwReserved As UInt32) As <MarshalAs(UnmanagedType.I4)> Integer
Function SetZoneMapping(ByVal dwZone As UInt32,
ByVal dwFlags As UInt32) As <MarshalAs(UnmanagedType.I4)> Integer
Function GetZoneMappings(ByVal dwZone As UInt32, <[Out]()> ByVal ppenumString As IEnumString,
ByVal dwFlags As UInt32) As <MarshalAs(UnmanagedType.I4)> Integer 'As UCOMIEnumString 46: IKnownFolder
[ComImport, Guid ( "8BE2D872-86AA-4d47-B776-32CCA40C7018" ), InterfaceType ( ComInterfaceType.InterfaceIsIUnknown )] 47: ILockBytes
//Note: These two by(reference 32-bit integers (ULONG) could be used as return values instead,
void ReadAt(long ulOffset, System.IntPtr pv, int cb, out System.UInt32 pcbRead);
void WriteAt(long ulOffset, System.IntPtr pv, int cb, out System.UInt32 pcbWritten);
UInt32 cbRead; 48: IMalloc
[In] UInt32 cb);
[In] UInt32 cb);
UInt32 GetSize(
<Runtime.InteropServices.PreserveSig()> Function Alloc(ByVal cb As UInt32) As IntPtr
<Runtime.InteropServices.PreserveSig()> Function Realloc(ByVal pv As IntPtr, ByVal cb As UInt32) As IntPtr
<Runtime.InteropServices.PreserveSig()> Function GetSize(ByVal pv As IntPtr) As UInt32
afPA_MSIL = 0x0010, // Processor Architecture: neutral (PE32)
afPA_x86 = 0x0020, // Processor Architecture: x86 (PE32)
afPA_IA64 = 0x0030, // Processor Architecture: Itanium (PE32+)
afPA_AMD64 = 0x0040, // Processor Architecture: AMD X64 (PE32+)
StringBuilder szName = new StringBuilder(Convert.ToInt32(cMax));
metaDataAssemblyImport.GetAssemblyRefProps(assemblyRefs[index], IntPtr.Zero, out cbPublicKeyOrToken, szName, Convert.ToUInt32(szName.Capacity), out chName, out aData, IntPtr.Zero, out cbHashValue, out dwAssemblyFlags);
UInt32 cCmds,
//public UInt32 cmdID;
public UInt32 cmdtextf;
public UInt32 cwActual;
public UInt32 cwBuf;
return Convert.ToInt32(
return Convert.ToInt32(
return ColorTranslator.FromOle(Convert.ToInt32(
UInt32 vaIn;
vaIn = Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(value));
return ColorTranslator.FromOle(Convert.ToInt32(
return ColorTranslator.FromOle(Convert.ToInt32(
UInt32 vaIn;
vaIn = Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(value));
return ColorTranslator.FromOle(Convert.ToInt32(
return ColorTranslator.FromOle(Convert.ToInt32(
UInt32 vaIn;
vaIn = Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(value));
return Convert.ToInt32(
return Convert.ToInt32(
return Convert.ToInt32(
Function OnChanged(ByVal dispId As Int32) As Int32
Function OnRequestEdit(ByVal dispId As Int32) As Int32 52: IPropertyStore
Sub GetCount(ByRef cProps As UInt32)
Sub GetAt(ByVal iProp As UInt32, ByRef pkey As NativeMethods.PROPERTYKEY) 53: IPStore 54: IShellBrowser
void BrowseObject(IntPtr pidl, UInt32 wFlags);
void GetViewStateStream(UInt32 grfMode, IntPtr ppStrm);
void GetControlWindow(UInt32 id, out IntPtr lpIntPtr);
void SendControlMsg(UInt32 id, UInt32 uMsg, UInt32 wParam, UInt32 lParam, IntPtr pret);
void SetToolbarItems(IntPtr lpButtons, UInt32 nButtons, UInt32 uFlags); 55: IShellFolder
void ParseDisplayName(IntPtr hwnd, IntPtr pbc, String pszDisplayName, UInt32 pchEaten, out IntPtr ppidl, UInt32 pdwAttributes);
[PreserveSig]Int32 CompareIDs(Int32 lParam, IntPtr pidl1, IntPtr pidl2);
void GetAttributesOf(UInt32 cidl, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)]IntPtr[] apidl, ref ESFGAO rgfInOut);
void GetUIObjectOf(IntPtr hwndOwner, UInt32 cidl, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]IntPtr[] apidl, [In] ref Guid riid, UInt32 rgfReserved, out IntPtr ppv); 56: IShellLinkA
, out UnsafeNativeMethods.WIN32_FIND_DATAA pfd, UnsafeNativeMethods.SLGP_FLAGS fFlags);
Sub GetPath(<Out(), MarshalAs(UnmanagedType.LPStr)> ByVal pszFile As StringBuilder, ByVal cchMaxPath As Integer, ByRef pfd As WIN32_FIND_DATAA, ByVal fFlags As UInteger) 57: IShellLinkW
void GetPath([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, int cchMaxPath, out UnsafeNativeMethods.WIN32_FIND_DATAW pfd, UnsafeNativeMethods.SLGP_FLAGS fFlags);
ByRef pfd As WIN32_FIND_DATA, _ 58: IShellView
[Out] out UInt32 phWnd); 59: IShellView3
[Out] out UInt32 phWnd); 60: IUIApplication
HRESULT OnViewChanged(UInt32 viewId,
HRESULT OnCreateUICommand(UInt32 commandId,
HRESULT OnDestroyUICommand(UInt32 commandId, Cut off search results after 60. Please refine your search. |