An application appears to be not working in Windows XP in a weird way: rebar control appeared to fail showing up. Where the application is expected to look much nicer with rebar control as a container for menu (implemented as command bar WTL control) and toolbar with buttons: A WTL sample project generated by a [...]
Posts Tagged ‘C++’
Common Controls: Versions, Compatibility, WTL
Posted: 30th October 2011 by Roman in WTLTags: bug, C++, compatibility, windows, WTL
Sample: Simultaneous Audio Playback via Waveform Audio (waveOut) API
Posted: 12th October 2011 by Roman in Audio, SourceTags: Audio, C++, playback, Source, waveOut
The minimalistic sample demonstrates support of [deprecated] Waveform Audio API for multiple playback streams. Depending on command line parameters, the application starts threads to open audio hardware using separate waveOutOpen call and stream one or more generated sine waves: 1,000 Hz sine wave as 22,050 Hz, Mono, 16-bit PCM (command line parameter “a”) 5,000 Hz [...]
Utility Clearance: Generate PCM .WAV File
Posted: 25th August 2011 by Roman in ATL, Audio, Source, UtilitiesTags: .WAV, Audio, C++, dB, generation, Loudness, PCM, sine, tool, utility, wavdest, waveform
GeneratePcmWavFile tool is generating PCM .WAV files with requested parameters, silent or with a sine wave data. The utility uses WavDest SDK Sample as a multiplexer, so it is expected to be available. It is possible to define the following audio data parameters: sampling frequency, number of samples per second, such as 44100 or 48000 [...]
Utility Clearance: Artificial CPU Load
Posted: 25th August 2011 by Roman in ATL, Source, Utilities, WTLTags: C++, cpu, developer, environment, testing, utility
The LoadCpu tool creates one or more threads to waste CPU cycles and emulate slower environment, such as for testing and troubleshooting. There has been a great deal of similar tools out there, and this one in particular is convenient/special as it takes process affinity mask as a parameter. That is, /a:NN defines affinity mask, [...]
ATLENSURE_SUCCEEDED double failure
Posted: 19th July 2011 by Roman in ATL, SourceTags: ATL, bug, C++, inline, macro, visual studio
A colleague pointed out that code snippet in previous post is misusing ATL’s ATLENSURE_SUCCEEDED macro making it [possibly] evaluate its argument twice in case of failure, that is evaluating into failure HRESULT code. As it is defined like this: #define ATLENSURE_SUCCEEDED(hr) ATLENSURE_THROW(SUCCEEDED(hr), hr) It does things in a straightforward way, for a code line ATLENSURE_SUCCEEDED(pFilterGraph.CoCreateInstance(CLSID_FilterGraph)); [...]
LogProcessExceptions: Minidumps on User Request
Posted: 19th July 2011 by Roman in ATL, Seriously, UtilitiesTags: .DMP, ATL, C++, debug, debugger, minidump, support, troubleshooting, utility
An updated version of LogProcessExceptions utility is given an additional option to create minidump .DMP files for debugged process on user request. This is in particular useful in conjunction with flag choices (on the previous page of the wizard). Download links: Partial Visual C++ .NET 2010 source code: Trac, Subversion Binaries: Win32 – LogProcessExceptions.exe, x64 [...]
Using IP Video Source programmatically as a standalone DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras
Posted: 17th July 2011 by Roman in UtilitiesTags: C++, camera, JPEG, M-JPEG, panasonic, sample, Video
Recent IP Video Source class/module is not limited to use via registration as a video input/capture/source device. The filter is also registered as a regular filter and can be used programmatically in a regular way: CoCreateInstance, AddFilter etc. A C++ code snippet below shows how to import interface definition, create an instance of the filter, [...]
