I have built a Plug-In that works fine when compiled in Visual Studio 2010 as a non-/clr DLL (using FeFlow 6.1). I have converted it to a /clr DLL project because I need to start adding Windows forms. I can get everything to compile with the /clr flag set, but when I try to test it in debug mode, the new plug-in is not listed in the "Available plug-ins" window. In the OUTPUT window I am seeing the following exceptions, though I don't know if they are related:
First-chance exception at 0x000007fefd529e5d (KernelBase.dll) in feflow61q.exe: Microsoft C++ exception: CIfmException at memory location 0x0028f070..
First-chance exception at 0x000007fefd529e5d (KernelBase.dll) in feflow61q.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x000007fefd529e5d (KernelBase.dll) in feflow61q.exe: Microsoft C++ exception: CIfmException at memory location 0x0028f070..
I've also compiled the DLL for x64 release. I've manually copy this DLL into:
C:\Program Files\WASY\FEFLOW 6.1\modules64\
In FeFlow, when I try to add the DLL, I get the message "Invalid registration procedure: "RegisterModule"!" My RegisterModule subroutine looks like:
IfmResult RegisterModule(IfmModule pMod)
{
if (IfmGetFeflowVersion (pMod) < IFM_REQUIRED_VERSION)
return False;
g_pMod = pMod;
IfmRegisterModule (pMod, "SIMULATION", "AGL_UTILPI", "AGL_UtilPI", 0x1000);
IfmSetDescriptionString (pMod, szDesc);
IfmSetCopyrightPath (pMod, "../../AGL_UtilPI.txt");
IfmSetHtmlPage (pMod, "../../AGL_UtilPI.htm");
IfmSetPrimarySource (pMod, "../../AGL_UtilPI.cpp");
IfmRegisterProc (pMod, "OnBeginDocument", 1, (IfmProc)OnBeginDocument);
IfmRegisterProc (pMod, "OnEndDocument", 1, (IfmProc)OnEndDocument);
return True;
}
(This is a trimmed down version of what I hope to use).
I've used your ifm_clr example (C:\Users\Public\Documents\WASY FEFLOW 6.1\sdk\ifm\samples\simul\ifm_clr\ifm_clr.sln) as a template. I've compiled it as well, but in debug mode, it throws similar exceptions to those described above and is not listed as an available plug-in. I have not tested a release build.
Any thoughts on what I might be doing wrong, or on how I may have things misconfigured?