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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MLH

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

    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?


  • Lyle Fairfield

    #2
    Re: VALUES of certain system (or intrinsic) constants???

    MLH <CRCI@NorthStat e.net> wrote in news:0gsolvo693 3v22kssn6emrkau 7b4agsu3f@
    4ax.com:
    [color=blue]
    > 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?[/color]

    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

    Comment

    • MLH

      #3
      Re: VALUES of certain system (or intrinsic) constants???

      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 <lylefair@yahoo .com> wrote:
      [color=blue]
      >MLH <CRCI@NorthStat e.net> wrote in news:0gsolvo693 3v22kssn6emrkau 7b4agsu3f@
      >4ax.com:
      >[color=green]
      >> 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?[/color]
      >
      >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 */[/color]

      Comment

      • Peter James

        #4
        Re: VALUES of certain system (or intrinsic) constants???


        "Lyle Fairfield" <lylefair@yahoo .com> wrote in message
        news:Xns93F059F 2E85FFlylefairy ahoocom@130.133 .1.4...[color=blue]
        > 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.
        >[/color]

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

        HTH

        Peter


        Comment

        Working...