Microsoft KB Archive/153400

From BetaArchive Wiki

SAMPLE: How to Use Multimedia Timer Services on Windows 95

Q153400



The information in this article applies to:


  • Microsoft Win32 Software Development Kit (SDK), version 4.0





SUMMARY

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.



MORE INFORMATION

The following file is available for download from the Microsoft Download Center:


Mthunk32.exe

For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

Q119591 How to Obtain Microsoft Support Files from Online Services

Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.



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 kbOSWin95
Issue type :
Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch kbWin32SDK400


Last Reviewed: November 26, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.