How to Run a Code Resource from a Visual C++ ApplicationLast reviewed: July 22, 1997Article ID: Q136997 |
2.00 | 2.00WINDOWS NT | MACINTOSH kbprg kbcode The information in this article applies to:
SUMMARYThis article illustrates loading and executing stand-alone Code Resources from a Visual C++ application using the sample code shipped with the Visual C++ Macintosh add-on. Chapter 8 of the 68K Programmer's Guide in the Visual C++ Books Online discusses using stand-alone code and shared libraries in 68K programs. This chapter provides a brief set of instructions on how to call a code resource. For more information on Macintosh Code Resources, please refer to this chapter in the Books Online.
MORE INFORMATIONTo load a Code Resource, the Macintosh System provides a function (GetResource) that will load any resources including code resources and return a handle to a code resource. Visual C++ provides a function (_PvApplyFixup) that will take a handle to a code resource and return a pointer to the entry point. You can use these two functions to run a code resource from a Visual C++ application. The following example demonstrates how to load and execute the SACODE sample's INIT code resource.
Step-by-Step Example
|
Additional reference words: kbinf 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |