winmm

Joystick Key Capture

◇◆丶佛笑我妖孽 提交于 2019-12-10 11:26:48
问题 I want to capture input from joystick using winmm dll .. I don't have much knowledge of importing and working with DLLs. I tried to do it but i have no idea how to do it .. [DllImport("winmm.dll")] public static extern string joyGetPosEx(uint dev, JoyinfoEx ) //Something Similar How do I get joyinfoEx struct from DLL and put it into JoygetPosEx .. ? :S 回答1: As your question suggests, you have to import the joyGetPosEx function from wimmm.dll . This is often called P/Invoking because you're

Joystick Key Capture

喜你入骨 提交于 2019-12-06 07:07:58
I want to capture input from joystick using winmm dll .. I don't have much knowledge of importing and working with DLLs. I tried to do it but i have no idea how to do it .. [DllImport("winmm.dll")] public static extern string joyGetPosEx(uint dev, JoyinfoEx ) //Something Similar How do I get joyinfoEx struct from DLL and put it into JoygetPosEx .. ? :S As your question suggests, you have to import the joyGetPosEx function from wimmm.dll . This is often called P/Invoking because you're invoking a function out of a native Win32 API (or "platform" DLL). You already know that you need to use that

Where can I find 'winmm.lib' (I'm using Visual Studio 2012)

淺唱寂寞╮ 提交于 2019-12-06 05:35:13
问题 My OS is 64Bit Windows 7. I wanted to build the DirectX Sample in C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D10\Tutorials\Tutorial02. but when I build error occured with fatal error LNK1104: 'winmm.lib' can't open the file. I reinstalled Direct SDK, but no change. I also added the path (include, lib) to the settings. If I remove 'winmm.lib' from the project settings, 'comctl32.lib' can't be opened. both libs were already present in properties>Linker>Input.

Change program's volume on Win 7

好久不见. 提交于 2019-12-05 04:14:58
I want to change the program's volume (and not master volume). I have the following code right now: DllImport("winmm.dll")] public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume); [DllImport("winmm.dll")] public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume); private void volumeBar_Scroll(object sender, EventArgs e) { // Calculate the volume that's being set int NewVolume = ((ushort.MaxValue / 10) * volumeBar.Value); // Set the same volume for both the left and the right channels uint NewVolumeAllChannels = (((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume <<

Where can I find 'winmm.lib' (I'm using Visual Studio 2012)

烂漫一生 提交于 2019-12-04 10:35:57
My OS is 64Bit Windows 7. I wanted to build the DirectX Sample in C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D10\Tutorials\Tutorial02. but when I build error occured with fatal error LNK1104: 'winmm.lib' can't open the file. I reinstalled Direct SDK, but no change. I also added the path (include, lib) to the settings. If I remove 'winmm.lib' from the project settings, 'comctl32.lib' can't be opened. both libs were already present in properties>Linker>Input. How can I solve this problem? winmm.lib isn't part of the DirectX SDK but is part of the Windows SDK .

Is it possible to relate the same audio device in different APIs?

岁酱吖の 提交于 2019-12-01 10:59:56
I'm using the winmm api to deal with audio. I'm using waveInGetDeviceCaps and waveInMessage to uniquely identify an "audio line". Everything works fine, except that in Vista, the name of the device is capped in 32 chars by the WaveInCaps struct. To work around that, I'm envisioning using the core api when OS version is >= Vista. I'm using the IMMDeviceEnumerator.GetDevice and IMMDeviceEnumerator.EnumAudioEndpoints to gather audio line information, but I'm not sure how to tell that one device under core api relates to one entry under the waveXx api. I guess I could compare the device path of

Is it possible to relate the same audio device in different APIs?

跟風遠走 提交于 2019-12-01 08:20:31
问题 I'm using the winmm api to deal with audio. I'm using waveInGetDeviceCaps and waveInMessage to uniquely identify an "audio line". Everything works fine, except that in Vista, the name of the device is capped in 32 chars by the WaveInCaps struct. To work around that, I'm envisioning using the core api when OS version is >= Vista. I'm using the IMMDeviceEnumerator.GetDevice and IMMDeviceEnumerator.EnumAudioEndpoints to gather audio line information, but I'm not sure how to tell that one device

NullReferenceException, no stack trace… where to start?

一个人想着一个人 提交于 2019-11-29 13:21:46
I have a WPF audio application. Occasionally (and even in the debugger) I'm seeing a NullReferenceException which carries no stack trace information with it. How can one start debugging such an issue? Some background: I'm P/Invoking functions in WinMM.dll which involves registering a callback when calling waveOutOpen [DllImport("winmm.dll")] public static extern MmResult waveOutOpen(out IntPtr phwo, IntPtr uDeviceID, WaveFmt pwfx, WaveCallbk dwCallback, IntPtr dwInstance, int fdwOpen); This has proved difficult to get stable, especially at the point where I call waveOutClose , and immediately