= Windows 95/98 Support in PJLIB/PJSIP/PJMEDIA = PJLIB supports both the older Windows 95/98/ME family of Microsoft OSes (win95/win98/winme) and the more advanced Windows NT family of OS'es (WinNT/2000/XP/2003/Vista). However, support for Win95/98 is not turned ON by default so it needs a bit of tweaking in both configuration and project settings. This short article describes how to enable Win95/98 support in the software. The instructions here have been tested on Windows 98, however it should work on Windows 95 and Windows ME as well. Thanks '''Sebastian E. Ovide''' for reporting and testing this. == Undefine WinNT in config_site.h == The following configuration is needed in your {{{pj/config_site.h}}} file to activate Win95/98 support: {{{ #undef PJ_WIN32_WINNT #define PJ_WIN32_WINNT 0x0300 #undef _WIN32_WINNT }}} These would disable the use of NT features in PJLIB's {{{os_core_win32.c}}} file. == Disable Win32 Native File I/O in pjlib == Still in pjlib. Since version 0.5.10, pjlib uses Win32 native {{{CreateFile()/ReadFile()/WriteFile()}}} API for dealing with file I/O, since the ANSI {{{fopen()}}} has a limitation that it can only open a maximum of {{{FOPEN_MAX}}} simultaneous file, and the limit on Windows is about 64. But unfortunately, it looks like {{{CreateFile()}}} doesn't work as expected on Win98, although it doesn't look like it uses any NT specific features. So we need to disable Win32 native file I/O and replace it with ANSI stream. To do this: 1. Open pjlib project 1. Exclude {{{file_io_win32.c}}} from pjlib build. 1. Include (do not exclude) {{{file_io_ansi.c}}} in pjlib build. == Disable IoCompletionPort in pjlib == On '''Debug''' build, the Visual Studio workspace will use socket '''select()''' as the back-end implementation for PJLIB's '''ioqueue'''. This is fine. However, on '''Release''' build, the Visual Studio workspace will use WinNT '''IOCompletionPort''' (IOCP) as the '''ioqueue''' backend, and IOCP is not available on Win95/98/ME. As a workaround for this, open the '''pjlib''' project settings, and exclude {{{ioqueue_winnt.c}}} from the Release build, and include {{{ioqueue_select.c}}} in the Release build. == Disable DirectSound in pjmedia == By default, PJMEDIA uses PortAudio on Windows with DirectSound set as the prefered sound backend. This may not work properly on Win95/98, and it may be better to disable DirectSound support and just use '''waveIn/waveOut''' device. To disable DirectSound in PortAudio in PJMEDIA: 1. Open pjmedia project settings 1. Add {{{PA_NO_DS}}} macro in the project's '''Preprocessor''' settings.