Reference Manual - Table of Contents
Code Resource Modules Code Resource Modules (referred to CRM's ) allow a programmer to add new commands and functions to MSB. CRM's are normally created using Metrowerks CodeWarrior and can be written in C, C++, or Pascal. This allows the programmer to access all of the MacOS toolbox for functions that MSB does not have direct commands for.
Once a programmer creates a Code Resource Module, it can be used by any msb programmer who add adds the resource file, that the CRM is stored in, to their msb project.
Once the Code Resource Module is added to the project it can be accessed by using the CALL function.
Function Summary:
var = Call( longValue1, longValue2, longValue3, longValue4 )
var = CALL( longValue1, longValue2, longValue3, longValue4)
longValue1 - This should be a numeric value that will be passed to the CRM.
longValue2 - This should be a numeric value that will be passed to the CRM.
longValue3 - This should be a numeric value that will be passed to the CRM.
longValue4 - This should be a numeric value that will be passed to the CRM.
You can access windows, controls, and memory buffers that were created using msb commands and pass those to the CRM. This is done using the WinHandle( ), CtlHandle( ), and MemHandle( ) functions.
68K and PowerPC Code Resources
See the sample code of the Code Resource Module example included with Visual MacStandardBasic. There are examples and Code Resource Modules you can use at the ZCurve Software website accesed at:
http://www.zcurve.com
or at:
http://www.macstandardbasic.com
Important Note: Visual MacStandardBasic will not recognize, update, and properly handle windows, controls, and memory buffers that are created inside a CRM. You should create the windows, controls, and memory buffers in msb and then manipulate them in your CRM. These items can be created in a CRM but all responsibility for there refresh and disposal is that of the CRM.