473,785 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

MLH
I make API calls to the sndPlaySound function,
something like this...

XX% = sndPlaySound(ms ound, 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 4238
MLH <CR**@NorthStat e.net> wrote in news:0gsolvo693 3v22kssn6emrkau 7b4agsu3f@
4ax.com:
I make API calls to the sndPlaySound function,
something like this...

XX% = sndPlaySound(ms ound, 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).
xxxxxxxxxxxxxxx xxxxxxxxxxxxx

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

XX% = sndPlaySound(ms ound, 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
manifestatio n 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
16222
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 (possibly white) Can anyone tell me how to convert these colours to either RGB colours or the Long number used by Access. Black is 0 and White is 16777215 ...
4
1484
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 like this: Public Enum TMCContentStatus as string PrevApproved = "P" ToBeAdded = "A"
4
6064
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 scripting on the win xp sp2 machine? Thanks
8
7433
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 working on. It uses several VB intrinsic constants whose meaning and significance I don't know. I couldn't find a list of these constants and their definitions. Can anyone direct me to one? If not, will someone please define the ones in this snippet...
2
2779
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 anyone can point me at such a beastie online or something I could copy and paste from.
1
2364
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 method says "The elements of the array are sorted by the values of the enumeration constants". Further the docs state that absent any underlying type definition of the enumeration, the type is assumed to be int32 (a signed integer). Consider the...
1
4796
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 is added to textbox clicking the done button saves the number in a variable (Numbers). The next form has a textbox(letter) and two buttons (add new, done). Values inserted in textbox are the values to be added to Array clicking add new button (the...
11
1730
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. What I would like to do is create an enum where the varaibles increment by some formula rather than just 1. I doubt this is possible but it would be nice Essentially what I'm having to do is
7
2301
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 browser, i am needed to select the To & From dates. Instead of that i want the system date should be generated automatically in the dropdown boxes. Plz advice the code for this.
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.