Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "set" in [All]

winmm

.

A tramping of sea boots was heard in the entry; the door was flung open, and in rolled a wild set of mariners enough. Enveloped in their shaggy watch coats, and with their heads muffled in woollen comforters, all bedarned and ragged, and their beards stiff with icicles, they seemed an eruption of bears from Labrador. They had just landed from their boat, and this was the first house they entered. No wonder, then, that they made a straight wake for the whale's mouth—the bar—when the wrinkled little old Jonah, there officiating, soon poured them out brimmers all round. One complained of a bad cold in his head, upon which Jonah mixed him a pitch-like potion of gin and molasses, which he swore was a sovereign cure for all colds and catarrhs whatsoever, never mind of how long standing, or whether caught off the coast of Labrador, or on the weather side of an ice-island.

.

    mciSendString("set CDAudio door open", returnstring,127, IntPtr.Zero);

.

     mciSendString("set CDAudio door open", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door closed", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door open", returnstring, 127, IntPtr.Zero)

.

    public uint offset;

.

[DllImport("winmm.dll", SetLastError = true)]

.

    [DllImport("winmm.dll", SetLastError = true)]

.

[DllImport("winmm.dll", SetLastError = true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.
Summary
The midiInReset function stops input on a given MIDI input device
.

    [DllImport("winmm.dll", SetLastError = true)]

.

    static extern uint midiInReset(IntPtr hMidiIn);

.
Documentation
[midiInReset] on MSDN
.

[DllImport("winmm.dll", SetLastError = true)]

.

[DllImport("winmm.dll", SetLastError = true)]

.

    [DllImport("winmm.dll", SetLastError = true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

     int dwOffset;

.

     Dim dwOffset As Integer

.

      MIXER_SETCONTROLDETAILSF_VALUE = 0,

.

      MIXER_SETCONTROLDETAILSF_LISTTEXT = 1,

.

      MIXER_SETCONTROLDETAILSF_QUERYMASK = 0xF,

.

The winmm dll may not execute properly on 64-bit systems. Consequently, the StructLayout must be Sequential, with CharSet = Ansi, and Pack = 4. This particular type has some special layout considerations (the c union keyword) which typically means developers would use the explicit layout. However, the explicit layout breaks down on 64-bit systems for any type with an IntPtr in the type. Consequently, the C# types have been redesigned to use Sequential layout so that they will automatically adjust to 64-bit systems. This means private fields with public properties which perform the gunky work of making it look like there is a union.

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 4)]

.

        set { this.cbStruct = value; }

.

     /// <summary>control id to get/set details on</summary>

.

        set { this.dwControlID = value; }

.

        set { this.cChannels = value; }

.

     /// <summary>for MIXER_SETCONTROLDETAILSF_CUSTOM</summary>

.

        set { this.hwndOwner = value; }

.

        set { this.hwndOwner = (IntPtr)value; }

.

        set { this.cbDetails = value; }

.

        set { this.paDetails = value; }

.

[DllImport("winmm.dll", CharSet = CharSet.Unicode)]

.

   [DllImport("winmm.dll", EntryPoint="mixerGetDevCaps", SetLastError=true)]

.

   <DllImport("winmm.dll", EntryPoint:="mixerGetDevCaps", SetLastError:=True)> _

.

       [DllImport("winmm.dll", EntryPoint = "mixerGetDevCaps", SetLastError = true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

static extern Int32 mixerSetControlDetails(IntPtr hmxobj,

.

Declare Function mixerSetControlDetails Lib "winmm.dll" (ByVal hmxobj As IntPtr, ByVal pmxcd As MIXERCONTROLDETAILS, ByVal fdwDetails As Integer) As Integer

.

The winmm dll may not execute properly on 64-bit systems. Consequently, the StructLayout must be Sequential, with CharSet = Ansi, and Pack = 4. This particular type has some special layout considerations (the c union keyword) which typically means developers would use the explicit layout. However, the explicit layout breaks down on 64-bit systems for any type with an IntPtr in the type. Consequently, the C# types have been redesigned to use Sequential layout so that they will automatically adjust to 64-bit systems. This means private fields with public properties which perform the gunky work of making it look like there is a union.

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 4)]

.

        set { this.cbStruct = value; }

.

        set { this.dwControlID = value; }

.

        set { this.dwControlType = (UInt32)value; }

.

        set { this.fdwControl = (uint)value; }

.

     /// <summary>if MIXERCONTROL_CONTROLF_MULTIPLE set</summary>

.

        set { this.cMultipleItems = value; }

.

        set { this.szShortName = value; }

.

        set { this.szName = value; }

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 4)]

.

        set { this.lMinimum = value; }

.

        set { this.lMaximum = value; }

.

        set { this.lMinimum = (int)value; }

.

        set { this.lMaximum = (int)value; }

.

        set { this.lMinimum = (int)value; }

.

        set { this.lMaximum = (int)value; }

.

        set { this.dwReserved3 = value; }

.

        set { this.dwReserved4 = value; }

.

        set { this.dwReserved5 = value; }

.

        set { this.dwReserved6 = value; }

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 4)]

.

        set { this.cSteps = value; }

.

        set { this.cSteps = value; }

.

        set { this.cSteps = value; }

.

        set { this.dwReserved2 = value; }

.

        set { this.dwReserved3 = value; }

.

        set { this.dwReserved4 = value; }

.

        set { this.dwReserved5 = value; }

.

        set { this.dwReserved6 = value; }

.

[DllImport("winmm.dll", CharSet = CharSet.Unicode)]

.

private static extern Int32 mixerSetControlDetails(IntPtr hmxobj, ref MIXERCONTROLDETAILS pmxcd, uint fdwDetails);

.

public static Int32 mixerSetControlDetails(IntPtr hmxobj, ref MIXERCONTROLDETAILS pmxcd, MIXER_OBJECTF fdwDetails, MIXER_SETCONTROLDETAILSF setControlDetails)

.

     uint flags = ((uint)fdwDetails | (uint)setControlDetails);

.

     return mixerSetControlDetails(hmxobj, ref pmxcd, flags);

.

public enum MIXER_SETCONTROLDETAILSF : uint

.
Documentation
[mixerSetControlDetails] on MSDN
.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

    ''' pszSound set to NULL.

.

    ''' with the pszSound parameter set to NULL. If this flag is

.

    ''' set, you must also set the SND_ASYNC flag.

.

    ''' SND_NODEFAULT flag is set.

.

To play a sound looping both SND_LOOP and SND_ASYNC flags have to be specified. Looped sounds only stop when PlaySound is called with pszSound set to NULL.

.
Summary
The timeBeginPeriod function sets the minimum timer resolution for an application or device driver. Used to manipulate the timer frequency.
.

  MM_BeginPeriod(1); // set timer resolution to 1ms => freq=1000Hz

.
Summary
The timeEndPeriod function clears a previously set minimum timer resolution
.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

Unlike Environment.TickCount, you can directly set the resolution of this timer with the TimeBeginPeriod function.

.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

static extern UInt32 timeSetEvent( UInt32 msDelay, UInt32 msResolution,

.

Declare Function timeSetEvent Lib "winmm.dll" (TODO) As TODO

.

    [DllImport("Winmm.dll", CharSet = CharSet.Auto)]

.

    static extern uint timeSetEvent(uint uDelay, uint uResolution, TimerCallback lpTimeProc, UIntPtr dwUser, uint fuEvent);

.

    [DllImport("Winmm.dll", CharSet = CharSet.Auto)]

.

    [DllImport("Winmm.dll", CharSet = CharSet.Auto)]

.

    [DllImport("Winmm.dll", CharSet = CharSet.Auto)]

.

    [DllImport("Winmm.dll", CharSet = CharSet.Auto)]

.

        //TIME_CALLBACK_EVENT_SET = 0x0010, /* callback is event - use SetEvent */

.

    /// <param name="repeat">If true sets a repetitive event, otherwise sets a one-shot</param>

.

        //Set the timer type flags

.

        id = timeSetEvent(ms, 0, thisCB, UIntPtr.Zero, (uint)f);

.

            throw new Exception("timeSetEvent error");

.
Documentation
[timeSetEvent] on MSDN
.

[DllImport ("winmm.dll", EntryPoint="waveInAddBuffer", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll",SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.
Summary
The waveInReset function stops input on the given waveform-audio input device and resets the current position to zero.
.

[DllImport("winmm.dll", SetLastError=true)]

.

static extern uint waveInReset(IntPtr hwi);

.

Shared Function waveInReset(<MarshalAs(UnmanagedType.I4)> ByVal hwi As Integer) As MMRESULT

.
Documentation
[waveInReset] on MSDN
.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

<Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential, CharSet:=Runtime.InteropServices.CharSet.Auto)> _

.

[System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Auto)]

.

Use "Auto" in the Declare statement to have the correct character set selected automatically.

.

    [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Auto)]

.

    [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Auto)]

.

    [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

    [DllImport("winmm.dll", SetLastError = true)]

.

    [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

    [DllImport("winmm.dll", SetLastError = true)]

.

      [DllImport ("winmm.dll", EntryPoint="waveOutGetErrorText", SetLastError=true, CharSet=CharSet.Auto)]

.

[DllImport("winmm.dll", SetLastError=true)]

.

    [DllImport("winmm.dll", SetLastError=true)]

.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

  [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

after the audio playback has been stopped with a call to waveOutReset(); The

.

audio driver will asynchronously set the WHDR_DONE bit in WAVEHDR.dwflags when

.

    waveHdr = wh;  // reset managed struct

.

       if ((MMRESULT = waveOutReset(waveDevice)) != MMSYSERR_NOERROR)

.

        "waveOutReset(): " + errmsg.ToString(),

.

When the WHDR_DONE bit sets we can call the waveOutUnPrepareHeader() function to release

.

the resources previously set up:

.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

public static extern uint waveOutReset(IntPtr hwo);

.

Declare Function waveOutReset Lib "winmm.dll" (TODO) As TODO

.
Documentation
[waveOutReset] on MSDN
.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

public static extern uint waveOutSetPlaybackRate(IntPtr hwo, uint dwRate);

.

Declare Function waveOutSetPlaybackRate Lib "winmm.dll" (TODO) As TODO

.
Documentation
[waveOutSetPlaybackRate] on MSDN
.
Summary
Set the volume of the specified device.
.

[DllImport("winmm.dll", SetLastError=true, CallingConvention=CallingConvention.Winapi)]

.

public static extern uint waveOutSetVolume(int uDeviceID, uint dwVolume);

.

[DllImport("winmm.dll", SetLastError=true, CallingConvention=CallingConvention.Winapi)]

.

public static extern uint waveOutSetVolume(IntPtr uDeviceID, uint dwVolume);

.

Declare Auto Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As IntPtr, ByVal dwVolume As UInteger) As UInteger

.

    // Each volume setting must be in the range between &H0 (silence) and &HFFFF (maximum volume).

.

    // ' Set the volume for all channels to &H7FFF (50%)

.

    // retval = waveOutSetVolume(0, &H7FFF7FFF)  ' for both channels, if needed

.

    public void SetVolume(uint volume)

.

        WaveNative.waveOutSetVolume(m_WaveOut,volume);

.
Documentation
[waveOutSetVolume] on MSDN
.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]

printui

.

[DllImport("printui.dll", SetLastError = true, CharSet = CharSet.Unicode)]

.

PrintUIEntryW(IntPtr.Zero, IntPtr.Zero, @"/p /n " + "\ " + printDoc.PrinterSettings.PrinterName + "\ ", 0);

winscard

.

[DllImport("winscard.dll", SetLastError=true)]

.

[DllImport("winscard.dll", SetLastError=true)]

.

[DllImport("winscard.dll", EntryPoint="SCardConnect", CharSet=CharSet.Auto)]

.

    [DllImport("WinScard.dll", EntryPoint = "SCardListReadersA", CharSet = CharSet.Ansi)]

.

        // First call with 3rd parameter set to null gets readers buffer length.

.

[DllImport("winscard.dll", SetLastError=true)]

.
Summary
The SCardGetStatusChange function blocks execution until the current availability of the cards in a specific set of readers changes.
.

    /// The SCardGetStatusChange function blocks execution until the current availability of the cards in a specific set of readers changes.

.

    /// <param name="hContext">A handle that identifies the resource manager context. The resource manager context is set by a previous call to the SCardEstablishContext function.</param>

.

[DllImport("winscard.dll", CharSet=CharSet.Auto)]

.

    SCARD_W_RESET_CARD =        0x80100068,

.
Summary
The SCardListReaders function provides the list of readers within a set of named reader groups, eliminating duplicates.
.

  [DllImport("winscard.dll", EntryPoint="SCardListReadersA", CharSet=CharSet.Ansi)]

.

if you invoke SCardListReaders with the hContext parameter set to null, you'll get the list of the installed readers (not the plugged ones !)

.

[DllImport("kernel32.dll", SetLastError=true)]

.

  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]

imm32

.

[DllImport("imm32.dll", SetLastError=true)]

.

[DllImport("imm32.dll", CharSet=CharSet.Unicode)]

.

[DllImport("imm32.dll", CharSet=CharSet.Unicode)]

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: