#include "sndvol32.h"
#include <winreg.h>
Go to the source code of this file.
|
static INT | LengthOfStrResource (IN HINSTANCE hInst, IN UINT uID) |
|
INT | AllocAndLoadString (OUT LPWSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID) |
|
DWORD | LoadAndFormatString (IN HINSTANCE hInstance, IN UINT uID, OUT LPWSTR *lpTarget,...) |
|
BOOL | InitAppConfig (VOID) |
|
VOID | CloseAppConfig (VOID) |
|
BOOL | LoadXYCoordWnd (IN PPREFERENCES_CONTEXT PrefContext) |
|
BOOL | SaveXYCoordWnd (IN HWND hWnd, IN PPREFERENCES_CONTEXT PrefContext) |
|
BOOL | WriteLineConfig (IN LPTSTR szDeviceName, IN LPTSTR szLineName, IN PSNDVOL_REG_LINESTATE LineState, IN DWORD cbSize) |
|
BOOL | ReadLineConfig (IN LPTSTR szDeviceName, IN LPTSTR szLineName, IN LPTSTR szControlName, OUT DWORD *Flags) |
|
DWORD | GetStyleValue (VOID) |
|
◆ AllocAndLoadString()
Definition at line 70 of file misc.c.
73{
75
77 uID);
78 if (ln++ > 0)
79 {
82 if ((*lpTarget) !=
NULL)
83 {
85 uID,
86 *lpTarget,
87 ln);
88 if (!Ret)
89 {
91 }
92 return Ret;
93 }
94 }
95 return 0;
96}
INT LengthOfStrResource(IN HINSTANCE hInst, IN UINT uID)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
◆ CloseAppConfig()
Definition at line 152 of file misc.c.
153{
155 {
158 }
159}
#define RegCloseKey(hKey)
Referenced by _tWinMain().
◆ GetStyleValue()
Definition at line 388 of file misc.c.
389{
392
395 0,
398 {
406
408 }
409
410 return dwStyle;
411}
static const TCHAR StyleValue[]
static const TCHAR AppOptionsKey[]
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Referenced by _tWinMain().
◆ InitAppConfig()
Definition at line 138 of file misc.c.
139{
142 0,
149}
static const TCHAR AppRegSettings[]
#define REG_OPTION_NON_VOLATILE
#define HKEY_CURRENT_USER
Referenced by _tWinMain().
◆ LengthOfStrResource()
Definition at line 31 of file misc.c.
33{
34 HRSRC hrSrc;
37
39 {
40 return -1;
41 }
42
43
45
46
51 hrSrc)) &&
53 {
55
56
57 uID &= 0xF;
58 for (
x = 0;
x < uID;
x++)
59 {
60 lpStr += (*lpStr) + 1;
61 }
62
63
64 return (int)(*lpStr);
65 }
66 return -1;
67}
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
GLint GLint GLint GLint GLint x
◆ LoadAndFormatString()
Definition at line 99 of file misc.c.
103{
107
110 uID) > 0)
111 {
113
114
117 0,
118 0,
120 0,
121 &lArgs);
123
125 }
126
127 return Ret;
128}
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
#define FORMAT_MESSAGE_FROM_STRING
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
◆ LoadXYCoordWnd()
Definition at line 162 of file misc.c.
163{
166 TCHAR DeviceMixerSettings[256];
169
170
172
174 DeviceMixerSettings,
175 0,
179 {
181 }
182
185 0,
186 0,
188 &cbData);
190 {
193 }
194
195
196 PrefContext->MixerWindow->WndPosX =
dwData;
197
200 0,
201 0,
203 &cbData);
205 {
208 }
209
210
211 PrefContext->MixerWindow->WndPosY =
dwData;
212
215}
static HANDLE ULONG_PTR dwData
Referenced by MainWindowProc().
◆ ReadLineConfig()
Definition at line 307 of file misc.c.
311{
318
322 szLineName);
323
325 szDevRegKey,
326 0,
331 &hLineKey,
333 {
342 {
343 goto ExitClose;
344 }
345
349
350 if (LineStates !=
NULL)
351 {
360 {
361 goto ExitClose;
362 }
363
364
366 {
368 LineStates[
i].LineName))
369 {
370 *
Flags = LineStates[
i].Flags;
372 break;
373 }
374 }
375 }
376
377ExitClose:
379 0,
380 LineStates);
382 }
383
384 return Ret;
385}
static const TCHAR LineStatesValue[]
static const WCHAR szDeviceName[]
#define HeapFree(x, y, z)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
struct _SNDVOL_REG_LINESTATE SNDVOL_REG_LINESTATE
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ ULONG Flags
Referenced by EnumConnectionsCallback(), and PrefDlgAddConnection().
◆ SaveXYCoordWnd()
Definition at line 218 of file misc.c.
220{
223 TCHAR DeviceMixerSettings[256];
225
226
229
230
232
234 DeviceMixerSettings,
235 0,
239 {
241 }
242
245 0,
250 {
253 }
254
257 0,
262 {
265 }
266
269}
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
struct _WINDOWPLACEMENT WINDOWPLACEMENT
Referenced by MainWindowProc().
◆ WriteLineConfig()
Definition at line 272 of file misc.c.
276{
280
284 szLineName);
285
287 szDevRegKey,
288 0,
293 &hLineKey,
295 {
296
299
301 }
302
303 return Ret;
304}
Referenced by WriteLineSettings().
◆ AppOptionsKey
◆ AppRegSettings
const TCHAR AppRegSettings[] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Volume Control") |
|
static |
◆ hAppSettingsKey
◆ LineStatesValue
◆ StyleValue