ID: Q153400
MTHUNK32 contains a sample application that demonstrates the implementation of thunking code necessary for 32-bit applications running on Windows 95 to obtain reliable performance when using high-resolution multimedia timer services.
The following file is available for download from the Microsoft Software Library:
~ MTHUNK32.EXE (size: 100713 bytes)
For more information about downloading files from the Microsoft Software
Library, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591
TITLE : How to Obtain Microsoft Support Files from
Online Services
32-bit multimedia timer callbacks on Windows 95 are subject to
noticeable performance problems due to the demands of preemptive
multitasking and limitations in the Windows 95 system architecture.
Running a 32-bit application at high priority does not solve this
problem, but thunking to a 16-bit DLL does the job. MTHUNK32
demonstrates how a 32-bit application running on Windows 95 can
utilize flat thunks via a 32-bit thunking DLL to call a 16-bit DLL
that invokes a multimedia timer and services the timer callbacks.
MTHUNK32 also implements a shared memory technique using the 16-bit and 32-bit DLLs, and a user interface for manipulating parameters in shared memory. This design allows the user to interact through the 32-bit application's GUI to modify data while it is being played back with the 16-bit multimedia services. This sort of design is needed by MIDI sequencer applications which allow a user to modify MIDI data for entire tracks or channels during playback by manipulating graphical controls or manually entering new parameters. To implement this technique on Windows 95, the 32-bit application and 16-bit DLL must share one or more blocks of fixed memory that are allocated by the 16-bit DLL. The DLL passes a pointer to the memory block through the thunking layer back to the application which then can reference the memory.
Additional query words: timeSetEvent TimerProc kbfile MTHUNK32.EXE
Keywords : kbmm kbSDKWin32 kbWinOS95 MMTimer
Version : 4.00
Platform : WINDOWS
Last Reviewed: December 9, 1998