PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

GetDriverMemoryFragment

GetDriverMemoryFragment loads a code fragment driver from an area of memory.

OSErr GetDriverMemoryFragment (
                     Ptr memAddr,
                     long length,
                     ConstStr63Param fragName,
                     CFragConnectionID *fragmentConnID,
                     DriverEntryPointPtr *fragmentMain,
                     DriverDescriptionPtr *DriverDesc);
memAddr
Pointer to the beginning of the fragment in memory.
length
Length of the fragment in memory.
fragName
Optional name of the fragment (primarily used by debugger).
fragmentConnID
Resulting CFM connectionID.
fragmentMain
Resulting pointer to DoDriverIO (may be nil ).
DriverDesc
Resulting pointer to DriverDescription.
DESCRIPTION

Given a pointer to the beginning of a driver code fragment in memAddr and the length of that fragment in length, GetDriverMemoryFragment loads the driver. It returns the loaded driver's CFM connectionID value in fragmentConnID, a pointer to its DoDriverIO entry point in fragmentMain, and a pointer to its driver description structure in DriverDesc.

Note

The CFM connectionID variable should be closed when the driver is unloaded.

RESULT CODES
noErr 0 No error
paramErr -50 Bad parameter
All CFM errors (see Inside Macintosh: PowerPC System Software)

© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)