Dear Lionscribe,
Thanks for your reply.
In first library the address of globals is stored in
SysLibTblEntryType * libEntryP;
libEntryP->globalsP
globalsP is a void pointer.
so i tried to pass this globalsP to the funstion in second library.
but if i run the application it is crashing.
extern Err ECLib1Sub(UInt16 refNum,void *G1Ptr,int x, int y,double *result)
ECLIB1_LIB_TRAP(sysLibTrapBase + 6);
i called the function in second lib as follows
ECLib1Sub(ECLib1Ref,&(libEntryP->globalsP),11, 1,&testsub);
and in second library in ECLib1Sub function i am doing as follows.
Err ECLib1Sub(UInt16 refNum,void *G1Ptr,int x, int y,double *result)
{
SysLibTblEntryType * TlibEntryP;
ECLibGlobalsType *Tgp=NULL;// ECLibGlobalsType is first lib globals
Tgp =(ECLibGlobalsType *)(G1Ptr);
if(Tgp)
{
Tgp->x=1000;
Tgp->y=1000;
}
*result= (double)(1111);
return errNone;
}
Am i doing any thing wrong.
I did by passing the first lib refernce and from it i can access first lib
globals.
but i couldn't as the above way.
thanks for your help.
Regards,
Hvr
Lionscribe <[EMAIL PROTECTED]> wrote: Just change all functions in library2 to
accept a pointer to the global variable structure, and pass the pointer to each
function call to library2.
LionScribe
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/
---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/