Hi,
Could you give me some sample how return from primitive LargeInteger (int64)?
Thank you,
Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig
mea405 wrote:Yes, I would like get an example (in C) of a primitive that returns an int64 and an instance of user defined class.
marten wrote:
Are you sure you want to write a primitive or would it be ok to call an external c-api library call instead of this ? The last thing is pretty simple, because the c-interface supports int64 for return values and parameters.
mea405 wrote:marten wrote:
Are you sure you want to write a primitive or would it be ok to call an external c-api library call instead of this ? The last thing is pretty simple, because the c-interface supports int64 for return values and parameters.
We are using EsPostAsyncMessage to process driver callback in our DLL. Now we implemented creating LargeInteger in such way
//.............
EsObject samplePos;
samplePos = EsAllocateObject(
EsPrimVMContext,
EsPrimClassLargeInteger,
2, // size
0, // saves or NULL for saveList
(EsObject **) NULL);
if (samplePos != (EsObject) NULL)
{
EsLongAtPut(samplePos, 1, timeInfo->timeInfo.samplePosition.lo);
EsLongAtPut(samplePos, 2, timeInfo->timeInfo.samplePosition.hi);
};
//.............
It is necessary to transfer in the VAST some such values. Now we use for this purpose an Array, but would be elegant to transfer these values as instance variables of our class.
mea405 wrote:marten wrote: Would it be possible towrite a simple DLL and use instances of EsEntryPoint (to create callbacks to the image) to handle that ?
Obviously, it is impossible :]
marten wrote:mea405 wrote:marten wrote: Would it be possible towrite a simple DLL and use instances of EsEntryPoint (to create callbacks to the image) to handle that ?
Obviously, it is impossible :]
Why ? I really would like to know! What are the advantages, drawbacks ?
Return to VA Smalltalk 7.0, 7.5 & 8.0
Users browsing this forum: Yahoo [Bot] and 1 guest