By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,110 Members | 1,010 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,110 IT Pros & Developers. It's quick & easy.

VALUES of certain system (or intrinsic) constants???

P: n/a
MLH
I make API calls to the sndPlaySound function,
something like this...

XX% = sndPlaySound(msound, MyParm)

Several predefined system constants (or API
intrinsic constants) have been recommended
for use as the 2nd parm...

SND_ASYNC
SND_LOOP
SND_MEMORY
SND_NODEFAULT
SND_NOSTOP
SND_SYNC

I was wondering how I could find out their actual
values?
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
MLH <CR**@NorthState.net> wrote in news:0gsolvo6933v22kssn6emrkau7b4agsu3f@
4ax.com:
I make API calls to the sndPlaySound function,
something like this...

XX% = sndPlaySound(msound, MyParm)

Several predefined system constants (or API
intrinsic constants) have been recommended
for use as the 2nd parm...

SND_ASYNC
SND_LOOP
SND_MEMORY
SND_NODEFAULT
SND_NOSTOP
SND_SYNC

I was wondering how I could find out their actual
values?


Private Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
Private Const SND_ALIAS_ID = &H110000 ' name is a WIN.INI [sounds]
entry identifier
Private Const SND_ALIAS_START = 0 ' must be > 4096 to keep strings in
same section of resource file
Private Const SND_APPLICATION = &H80 ' look for application
specific association
Private Const SND_ASYNC = &H1 ' play asynchronously
Private Const SND_FILENAME = &H20000 ' name is a file name
Private Const SND_LOOP = &H8 ' loop the sound until next
sndPlaySound
Private Const SND_MEMORY = &H4 ' lpszSoundName points to a memory
file
Private Const SND_NODEFAULT = &H2 ' silence not default, if sound
not found
Private Const SND_NOSTOP = &H10 ' don't stop any currently playing
sound
Private Const SND_NOWAIT = &H2000 ' don't wait if the driver is busy
Private Const SND_PURGE = &H40 ' purge non-static events for
task
Private Const SND_RESERVED = &HFF000000 ' In particular these flags are
reserved
Private Const SND_RESOURCE = &H40004 ' name is a resource name or atom
Private Const SND_SYNC = &H0 ' play synchronously (default)
Private Const SND_TYPE_MASK = &H170007
Private Const SND_VALID = &H1F ' valid flags / ;Internal /
Private Const SND_VALIDFLAGS = &H17201F ' Set of valid flag bits.
Anything outside

You can find these in this format if you have access to the old Win32 Api
Text File. I believe this coms with Visual Studio but this file is not
necessarily up to date.

Finding a current API text file is problematic. Some say it's available in
the Win2K SDK but it seems to be clevely hidden there.

I find that it's more efficient to raid the C++ .h files (available in any
manifestation of C++ or the Microsoft SDK) for API functions and constants.
Of course, this requires some munging of the code and syntax, but it seems
to be more complete and cohesive. Here are the same (I hope) constants from
MMSystem.h

#define SND_SYNC 0x0000 /* play synchronously (default) */
#define SND_ASYNC 0x0001 /* play asynchronously */
#define SND_NODEFAULT 0x0002 /* silence (!default) if sound not
found */
#define SND_MEMORY 0x0004 /* pszSound points to a memory file */
#define SND_LOOP 0x0008 /* loop the sound until next
sndPlaySound */
#define SND_NOSTOP 0x0010 /* don't stop any currently playing
sound */

#define SND_NOWAIT 0x00002000L /* don't wait if the driver is busy */
#define SND_ALIAS 0x00010000L /* name is a registry alias */
#define SND_ALIAS_ID 0x00110000L /* alias is a predefined ID */
#define SND_FILENAME 0x00020000L /* name is file name */
#define SND_RESOURCE 0x00040004L /* name is resource name or atom */
#if(WINVER >= 0x0400)
#define SND_PURGE 0x0040 /* purge non-static events for task */
#define SND_APPLICATION 0x0080 /* look for application specific
association */
#endif /* WINVER >= 0x0400 */

#define SND_ALIAS_START 0 /* alias base */

--
Lyle

Nov 12 '05 #2

P: n/a
MLH
Thx. I'm trying to determine the values in the WIN API (old 16 bit
stuff).
xxxxxxxxxxxxxxxxxxxxxxxxxxxx

On 8 Sep 2003 12:50:24 GMT, Lyle Fairfield <ly******@yahoo.com> wrote:
MLH <CR**@NorthState.net> wrote in news:0gsolvo6933v22kssn6emrkau7b4agsu3f@
4ax.com:
I make API calls to the sndPlaySound function,
something like this...

XX% = sndPlaySound(msound, MyParm)

Several predefined system constants (or API
intrinsic constants) have been recommended
for use as the 2nd parm...

SND_ASYNC
SND_LOOP
SND_MEMORY
SND_NODEFAULT
SND_NOSTOP
SND_SYNC

I was wondering how I could find out their actual
values?


Private Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
Private Const SND_ALIAS_ID = &H110000 ' name is a WIN.INI [sounds]
entry identifier
Private Const SND_ALIAS_START = 0 ' must be > 4096 to keep strings in
same section of resource file
Private Const SND_APPLICATION = &H80 ' look for application
specific association
Private Const SND_ASYNC = &H1 ' play asynchronously
Private Const SND_FILENAME = &H20000 ' name is a file name
Private Const SND_LOOP = &H8 ' loop the sound until next
sndPlaySound
Private Const SND_MEMORY = &H4 ' lpszSoundName points to a memory
file
Private Const SND_NODEFAULT = &H2 ' silence not default, if sound
not found
Private Const SND_NOSTOP = &H10 ' don't stop any currently playing
sound
Private Const SND_NOWAIT = &H2000 ' don't wait if the driver is busy
Private Const SND_PURGE = &H40 ' purge non-static events for
task
Private Const SND_RESERVED = &HFF000000 ' In particular these flags are
reserved
Private Const SND_RESOURCE = &H40004 ' name is a resource name or atom
Private Const SND_SYNC = &H0 ' play synchronously (default)
Private Const SND_TYPE_MASK = &H170007
Private Const SND_VALID = &H1F ' valid flags / ;Internal /
Private Const SND_VALIDFLAGS = &H17201F ' Set of valid flag bits.
Anything outside

You can find these in this format if you have access to the old Win32 Api
Text File. I believe this coms with Visual Studio but this file is not
necessarily up to date.

Finding a current API text file is problematic. Some say it's available in
the Win2K SDK but it seems to be clevely hidden there.

I find that it's more efficient to raid the C++ .h files (available in any
manifestation of C++ or the Microsoft SDK) for API functions and constants.
Of course, this requires some munging of the code and syntax, but it seems
to be more complete and cohesive. Here are the same (I hope) constants from
MMSystem.h

#define SND_SYNC 0x0000 /* play synchronously (default) */
#define SND_ASYNC 0x0001 /* play asynchronously */
#define SND_NODEFAULT 0x0002 /* silence (!default) if sound not
found */
#define SND_MEMORY 0x0004 /* pszSound points to a memory file */
#define SND_LOOP 0x0008 /* loop the sound until next
sndPlaySound */
#define SND_NOSTOP 0x0010 /* don't stop any currently playing
sound */

#define SND_NOWAIT 0x00002000L /* don't wait if the driver is busy */
#define SND_ALIAS 0x00010000L /* name is a registry alias */
#define SND_ALIAS_ID 0x00110000L /* alias is a predefined ID */
#define SND_FILENAME 0x00020000L /* name is file name */
#define SND_RESOURCE 0x00040004L /* name is resource name or atom */
#if(WINVER >= 0x0400)
#define SND_PURGE 0x0040 /* purge non-static events for task */
#define SND_APPLICATION 0x0080 /* look for application specific
association */
#endif /* WINVER >= 0x0400 */

#define SND_ALIAS_START 0 /* alias base */


Nov 12 '05 #3

P: n/a

"Lyle Fairfield" <ly******@yahoo.com> wrote in message
news:Xn******************************@130.133.1.4. ..
Finding a current API text file is problematic. Some say it's available in
the Win2K SDK but it seems to be clevely hidden there.


Win32API.txt included in the Platform SDK in the \Bin folder.

HTH

Peter
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.