On Oct 14, 2006, at 1:07 PM, Mars Saxman wrote:
On Oct 14, 2006, at 10:54 AM, Joe Huber wrote:
Is there a clever way to call a Declare that expects one of its
parameters to be a a pointer to an OSType, and wind up with the
resulting OSType in either a string or an integer?
void GetMediaHandlerDescription (
Media theMedia,
OSType *mediaType,
Str255 creatorName,
OSType *creatorManufacturer );
Sure - just declare the parameter ByRef as OSType, like this:
Declare Sub GetMediaHandlerDescription Lib "something appropriate" _
theMedia As Integer, _
ByRef mediaType As OSType, _
creatorName As PString, _
ByRef creatorManufacturer As OSType )
Now call it like this:
Dim mediaType As OSType
Dim creatorManufacturer As OSType
GetMediaHandlerDescription foo, mediaType, "creator",
creatorManufacturer
Now use your mediaType and creatorManufacturer variables as strings.
That works better than my suggestion and is easier to deal with anyways
reminder to self ... NEVER NEVER NEVER write an answer on Saturday
with a hangover .. you forget the obvious stuff
back to sleep
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>