Get result data context in an OnFastEval event in DWScript

How do you get an IDataContext for the result value in the OnFastEval event in a TDWSUnit function?

The "magic functions"-functionality presented through the OnFastEval event can't return complex data, like records, as OnFastEval returns a Variant. The internal magic functions do support using an IDataContext interface to return complex data.


You have to return the IDataContext interface through the variant result (it's an IUnknown, so you can assign it directly).

You can allocate an IDataContext directly from TDataContext, from execution pool through (args.Exec.Stack.CreateDataContext), or you can pass along an existing one.

For sample code, see FuncFastPoint in UdwsUnitTests

Need Your Help

Disable Bluetooth sound output

java android audio bluetooth

I am writing an app which monitors the volume setting of the notification stream (using a broadcast receiver for - kind of a hack I know) and when it is set to s...

Jerky sprite (2d) movement with OpenGL ES 2.0 on Android

android performance memory sprite spritebatch

Edit 2. Added screenshot of logcat. If I reduce the number of sprites to 1, I still get this intermittent 'stop/starting' - so I don't think it's my code, as with 1 sprite my frame rate hovers aro...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.