SAMPLE: How to Use Multimedia Timer Services on Windows 95Last reviewed: September 9, 1996Article ID: Q153400 |
The information in this article applies to:
SUMMARYMTHUNK32 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.
You can find MTHUNK32.EXE (size: 100713 bytes) , a self-extracting file, on these services:- Microsoft's World Wide Web site on the Internet On the www.microsoft.com home page, click the Support icon
Click Knowledge Base, and select the product
Enter kbfile MTHUNK32.EXE (size: 100713 bytes)
, and click GO!
Open the article, and click the button to download the file
- Internet (anonymous FTP)
ftp ftp.microsoft.com
Change to the \softlib\mslfiles directory
Get MTHUNK32.EXE
- The Microsoft Network
On the Edit menu, click Go To, and then click Other Location
Type "mssupport" (without the quotation marks)
Double-click the MS Software Library icon
Find the appropriate product area
Locate and download MTHUNK32.EXE
On MSPN Desktop, double-click the Software Library icon
Search for MTHUNK32.EXE
Display results and download
Dial (206) 936-6735 to connect to MSDL
Download MTHUNK32.EXE (size: 100713 bytes)
For additional information about downloading, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online Services MORE INFORMATION32-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 reference words: timeSetEvent TimerProc 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |