DPI import function not found

,

In reply to dave_59:

I have a further question that whether the import/export function declaration must be inside a module ? The error information is shown below.

Error-[DPI-DXFNF] DPI export function not found
Please check the called DPI export function/task is defined in the mentioned
module, or check if the DPI declaration of the DPI import function/task
which invokes that DPI export function/task is made with ‘context’. Another
work-around is using svGetScopeFromName/svSetScope to explicitly set the
scope to the module which contains the definition of the DPI export
function/task.