[futurebasic] Handles and pointers - again

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2001 : Group Archive : Group : All Groups

From: David Cottrell <David.Cottrell@...>
Date: Sun, 15 Apr 2001 19:12:48 +1000
This one gets me every time.

I have a handle to a block of memory which I have got from a resource. I need to pass that information on to a ToolBox, but it expects a pointer.

How do I do it?

Just to indicate what I'm trying to do here is the function which is causing me grief...



clear local
local fn MountVolume

dim pbBlk.128, AFPInfo.2048
dim osErr%
dim @resHndl as handle

resHndl = FN pGget1Res(_"myfl",_volumeInfoRes,gResRef)'get saved volume info in handle

pbBlk.ioCompletion&   = 0 'no iocompletion
pbBlk.ioBuffer& = @AFPInfo 'pointer to volume info - this is actually resHndl


osErr% = fn PBVolumeMount(@pbBlk)

end fn = osErr%
-- 
-----------------------------------------------------------------------
Dr David Cottrell
School of Psychology
James Cook University

Let my words be as honey, for tomorrow I will probably have to eat them.
-----------------------------------------------------------------------