?API vista - Sons - Obtenir et modifier le volume principale
werdDomain
Messages postés60Date d'inscriptionlundi 22 octobre 2007StatutMembreDernière intervention 1 novembre 2011
-
22 oct. 2008 à 07:15
gillardg
Messages postés3275Date d'inscriptionjeudi 3 avril 2008StatutMembreDernière intervention14 septembre 2014
-
22 oct. 2008 à 15:20
Bonjours, j'aimerais mettre la main sur les api de vista pour contrôler le volume principale ...
J'ai chercher sur le web, peut-être que je n'utilise pas les bon mots chef ...
J'aurais seulement besoin des nom d'api + nom de dll pour le son.
Si il existe des exemples qui montre comment l'utiliser et bien déclarer ces types sa serais pas de refus.
J'ai fait une application qui fonctionne bien sous xp... Mais elle marche pas sous vista...
J'aimerais donc que mon App. fonctionne sous vista :p
Merci.
Ben
A voir également:
?API vista - Sons - Obtenir et modifier le volume principale
cs_loulou69
Messages postés672Date d'inscriptionmercredi 22 janvier 2003StatutMembreDernière intervention 2 juin 20161 22 oct. 2008 à 10:26
Bonjour
Il aurait été bon de dire quelles API tu utilises pour trouver de l'aide sur celles que tu n'utilises pas encore.
Je ne suis pas dans le même environnement (ni dev, ni exececution)
As tu recherché Winmm.dll fonction MixerOpen
gillardg
Messages postés3275Date d'inscriptionjeudi 3 avril 2008StatutMembreDernière intervention14 septembre 20142 22 oct. 2008 à 12:34
Bonjour,
pour les Api il y en a quelques uns qui diffèrent sur vista je te conseille donc de chercher dans msdn chaque api que tu utilises pour connaitre sa compatibilité ou incompatibilité avec vista
en effet chaque api est détaillé dans MSDN .
=> tu peux normalement y acceder à partir de l'aide en ligne de vb
werdDomain
Messages postés60Date d'inscriptionlundi 22 octobre 2007StatutMembreDernière intervention 1 novembre 2011 22 oct. 2008 à 14:02
en premier, jai pas vista, donc je ne peut pas faire les test...
et je ne sait quelle api utiliser, il doit bien avoir un mixer ou une api quelquonque ...
sous xp j'utilise ces api:
Private
Declare
Ansi
Function mixerClose
Lib
"winmm.dll" (
ByVal hmx
As
Integer)
As
Integer
Private
Declare
Ansi
Function
mixerGetControlDetailsA
Lib
"winmm.dll"
(
ByVal
hmxobj
As
Integer
,
ByRef
pmxcd
As
MIXERCONTROLDETAILS,
ByVal
fdwDetails
As
Integer
)
As
Integer
Private
Declare
Ansi
Function
mixerGetDevCapsA
Lib
"winmm.dll"
(
ByVal
uMxId
As
Integer
,
ByVal
pmxcaps
As
MIXERCAPS,
ByVal
cbmxcaps
As
Integer
)
As
Integer
Private
Declare
Ansi
Function
mixerGetID
Lib
"winmm.dll"
(
ByVal
hmxobj
As
Integer
,
ByVal
pumxID
As
Integer
,
ByVal
fdwId
As
Integer
)
As
Integer
Private
Declare
Ansi
Function
mixerGetLineControlsA
Lib
"winmm.dll"
(
ByVal
hmxobj
As
Integer
,
ByRef
pmxlc
As
MIXERLINECONTROLS,
ByVal
fdwControls
As
Integer
)
As
Integer
Private
Declare
Ansi
Function
mixerGetLineInfoA
Lib
"winmm.dll"
(
ByVal
hmxobj
As
Integer
,
ByRef
pmxl
As
MIXERLINE,
ByVal
fdwInfo
As
Integer
)
As
Integer
Private
Declare
Ansi
Function
mixerGetNumDevs
Lib
"winmm.dll"
()
As
Integer
Private
Declare
Ansi
Function
mixerMessage
Lib
"winmm.dll"
(
ByVal
hmx
As
Integer
,
ByVal
uMsg
As
Integer
,
ByVal
dwParam1
As
Integer
,
ByVal
dwParam2
As
Integer
)
As
Integer
Private
Declare
Ansi
Function
mixerOpen
Lib
"winmm.dll"
(
ByRef
phmx
As
Integer
,
ByVal
uMxId
As
Integer
,
ByVal
dwCallback
As
Integer
,
ByVal
dwInstance
As
Integer
,
ByVal
fdwOpen
As
Integer
)
As
Integer
Private
Declare
Ansi
Function
mixerSetControlDetails
Lib
"winmm.dll"
(
ByVal
hmxobj
As
Integer
,
ByRef
pmxcd
As
MIXERCONTROLDETAILS,
ByVal
fdwDetails
As
Integer
)
As
Integer
Private
Declare
Function
mixerGetLineInfo
Lib
"winmm.dll"
Alias
"mixerGetLineInfoA"
(<MarshalAs(UnmanagedType.I4)>
ByVal
hmxobj
As
Integer
,
ByRef
pmxl
As
MIXERLINE,
ByVal
fdwInfo
As
Integer
)
As
Integer
Private
Declare
Function
mixerGetLineControls
Lib
"winmm.dll"
Alias
"mixerGetLineControlsA"
(<MarshalAs(UnmanagedType.I4)>
ByVal
hmxobj
As
Integer
,
ByRef
pmxlc
As
MIXERLINECONTROLS,
ByVal
fdwControls
As
Integer
)
As
Integer
pis les structure :
Private
Structure MIXERCAPS
Public wMid
As
Integer
Public wPid
As
Integer
Public vDriverVersion
As
Integer<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=MAXPNAMELEN)>
Public szPname
As
String
Public fdwSupport
As
Integer
Public cDestinations
As
Integer
End
Structure
'MIXERCAPS_
<StructLayout(LayoutKind.Sequential)> _
Private
Structure MIXERCONTROL<FieldOffset(0)>
Public cbStruct
As
Integer
' size in Byte of MIXERCONTROL<FieldOffset(4)>
Public dwControlID
As
Integer
' unique control id for mixer device<FieldOffset(8)>
Public dwControlType
As
Integer
' MIXERCONTROL_CONTROLTYPE_xxx<FieldOffset(12)>
Public fdwControl
As
Integer
' MIXERCONTROL_CONTROLF_xxx<FieldOffset(16)>
Public cMultipleItems
As
Integer
' if MIXERCONTROL_CONTROLF_MULTIPLE set<FieldOffset(20), MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst:=MIXER_SHORT_NAME_CHARS)>
Public szShortName
As
String
' * MIXER_SHORT_NAME_CHARS ' short name of control<FieldOffset(36), MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst:=MIXER_LONG_NAME_CHARS)>
Public szName
As
String
' * MIXER_LONG_NAME_CHARS ' Integer name of control<FieldOffset(100)>
Public lMinimum
As
Integer
' Minimum value<FieldOffset(104)>
Public lMaximum
As
Integer
' Maximum value<FieldOffset(108), MarshalAs(UnmanagedType.ByValArray, SizeConst:=11, ArraySubType:=UnmanagedType.AsAny)>
Public reserved()
As
Integer
' reserved structure space
End
Structure<StructLayout(LayoutKind.Sequential)> _
End
Structure<StructLayout(LayoutKind.Sequential)> _
Private
Structure MIXERLINE<FieldOffset(0)>
Public cbStruct
As
Integer
' size of MIXERLINE structure<FieldOffset(4)>
Public dwDestination
As
Integer
' zero based destination index<FieldOffset(8)>
Public dwSource
As
Integer
' zero based source index (if source)<FieldOffset(12)>
Public dwLineID
As
Integer
' unique line id for mixer device<FieldOffset(16)>
Public fdwLine
As
Integer
' state/information about line<FieldOffset(20)>
Public dwUser
As
Integer
' driver specific information<FieldOffset(24)>
Public dwComponentType
As
Integer
' component type line connects to<FieldOffset(28)>
Public cChannels
As
Integer
' number of channels line supports<FieldOffset(32)>
Public cConnections
As
Integer
' number of connections (possible)<FieldOffset(36)>
Public cControls
As
Integer
' number of controls at this line<FieldOffset(40), MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst:=MIXER_SHORT_NAME_CHARS)>
Public szShortName
As
String
' * MIXER_SHORT_NAME_CHARS<FieldOffset(56), MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst:=MIXER_LONG_NAME_CHARS)>
Public szName
As
String
' * MIXER_LONG_NAME_CHARS<FieldOffset(120)>
Public dwType
As
Integer<FieldOffset(124)>
Public dwDeviceID
As
Integer<FieldOffset(128)>
Public wMid
As
Integer<FieldOffset(132)>
Public wPid
As
Integer<FieldOffset(136)>
Public vDriverVersion
As
Integer<FieldOffset(168), MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst:=MAXPNAMELEN)>
Public szPname
As
String
' * MAXPNAMELEN
End
Structure<StructLayout(LayoutKind.Sequential)> _