Question

I've got big problem with invoking method from DLL in Oracle Forms 6i. DLL has been written in

C#, and it is code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OnlineFPCommon;
using System.Windows.Forms;

namespace TestNamespace 
{
    public class TestClass
    {
        public static void testMethod()
        {
             MessageBox.Show("testMethod");
        }
    }
} 

I try to invoke it using Oracle Forms code:

testlib_lhandle := Ora_Ffi.Load_library('C:\libdir\','test.dll');
getresult_fhandle := ora_ffi.register_function(testlib_lhandle,'testMethod');

but the second line, when I try to register function fails. Why? How Can I properly invoke that function?

Was it helpful?

Solution

register_function requires a dll entry point and you cannot generate that in managed code.

You can write a C++/CLi wrapper DLL to have native entry points for your managed code but if you are just starting from scratch then why not just write a plain native dll.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top