How to DPI "export" a task embedded in a uvm_driver to c code?

In reply to dave_59:

Hi Dave
Thanks for the reply.
Couple of questions
You have said:

  1. my_driver h; // Someone needs to initialize this
    How could this be done? We could do h = my_driver_handle(assuming my_driver_handle was created in say an agent), but that can be done only inside a class.
  2. “your C code needs to be invoked by importing a C task” - Not sure why this is needed for an “export”?

Thanks.