Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Disabling PlaySound() that is included by LibCURL

I’ve been developing with raylib for quite a while now.

I’ve gotten libcurl to work, but it doesn’t work with windows.h, because of the functions names overriding others.

However, there is a workaround, by mentioning these defines (in curl.h):

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

#define NOGDICAPMASKS - this disables CC_, LC_, PC_, CP_ TC_ RC_

#define NOVIRTUALKEYCODES - this disables VK_

#define NOWINMESSAGES - this disables WM_ EM_ LB_

#define NOWINSTYLES - this disables WS_, CS_, ES_, LBS_, SBS_, CBS_

#define NOSYSMETRICS - this disables SM_

the list goes on an on…

Keep in mind that I don’t need these, I won’t use any of these since I’m trying to make it as cross-platform as I can, only libcurl includes these BUT it doesn’t use them in any way.

What I am asking is, where could I find a full list of these, and if not a define that STOPS the including of PlaySound(), PlaySoundA(), etc.. and other functions related to sound, since they are interferring with PlaySound() from raylib.

>Solution :

The #defines you mention are Win32 SDK defines. They instruct windows.h (more accurately, various other Win32 headers that windows.h itself #includes) to not define/declare various symbols.

The #define you are looking for to omit a declaration of PlaySound(A|W) (in mmsystem.h) is:

#define MMNOSOUND

Here is the full table of defines in mmsystem.h:

 *  Define:         Prevent inclusion of:
 *  --------------  --------------------------------------------------------
 *  MMNODRV         Installable driver support
 *  MMNOSOUND       Sound support
 *  MMNOWAVE        Waveform support
 *  MMNOMIDI        MIDI support
 *  MMNOAUX         Auxiliary audio support
 *  MMNOMIXER       Mixer support
 *  MMNOTIMER       Timer support
 *  MMNOJOY         Joystick support
 *  MMNOMCI         MCI support
 *  MMNOMMIO        Multimedia file I/O support
 *  MMNOMMSYSTEM    General MMSYSTEM functions
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading