473,395 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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
3 4220
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
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643...
4
by: UJ | last post by:
I know how to define enums, and they work great. But is there any way to define the same time of thing but give them actual values? For instance, I'd like to define something with the idea...
4
by: John | last post by:
Hi I am getting the 'User defined type not defined' on the line; Dim fso As Scripting.FileSystemObject. What am I doing wrong? What reference do I need to add? Do I need to install/enable...
8
by: Thelma Lubkin | last post by:
I have finally nagged more work out of the non-profit organization that I'm trying to do volunteer work for. The following code begins a tiny form that is part of the project that I'll be...
2
by: Nick Coe \(UK\) | last post by:
Lo each, I want to make a text file containing all of Access intrinsic constant names and their decimal values for A2k to A2k3. Can't say I'm all that keen on typing it out so wonder if...
1
by: Jeff Mason | last post by:
I am observing some puzzling behavior with the GetValues method of enumerations. I wonder if this something I just don't understand, or is this just wrong. The documentation for the GetValues...
1
by: Nightfarer | last post by:
Hello. I have a big trouble using System.Array class (it's the first time I use it) for a software I'm developing. I have a form with a textbox(numbers) and one button (done). Once the number...
11
by: Jon Slaughter | last post by:
This is more of a C++ question but I guess it applies equally well to C#. Is there a way to declare an enum where the values assigned to the fields is incremented by something rather than 1. ...
7
by: tabm2004 | last post by:
I have an ASP main page with date fields dropdown like From date Date .. Month .....Year To date Date.. Month..... Year whenever i open mainpage.asp in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.