AnsweredAssumed Answered

Plugin development problem with VC++ and VB.Net under Visual Studio...

Question asked by ail5urfer on May 20, 2017
Latest reply on May 21, 2017 by ail5urfer



I have to use a Windows specific DLL (Interop.DSOFile.dll) to get (and set) custom properties contained in some files, and then use them in my FileMaker database.

I have a Visual Studio Solution with 2 projects :

  • A C++ project with the 24U Plug-In Template 3.1 for building the final FileMaker plugin
  • A VB.Net project to interact with the Interop.DSOFile.dll and read or write my custom properties

Here is a little scheme :


And when compiling, I get this in the FIleMaker Extensions folder :


To communicate between C++ an VB.Net (red arrows #1 on the scheme), I use the Common Language Runtime Support (/clr) option in my C++ project (it permits to access VB.Net classes from C++ code).

I also have a test project in my solution to validate that my VB.Net class in working fine (and it is !).

Finally, I also have another test project to simulate the C++ link with my VB.Net class as it should work in the plugin C++ code, and it's OK too.


However, when I compile my plugin without linking to my class, I have a correct result in FileMaker Pro (I only send a string with test messages). The result when compiling without my VB.Net class instantiation :


The result when un-commenting the lines in green in the plugin C++ source code :


#pragma mark X24FT_Version

FMX_PROC(fmx::errcode) X24FT_Version(short funcId, const fmx::ExprEnv& environment, const fmx::DataVect& dataVect, fmx::Data& result)


    // [...]

  tempText->Assign("\nBefore DLL call : OK !");


    // [...]

  FileCustomPropsManager::FilePropertiesManager fpm; // <- Commented : OK, Not commented : bug

  System::String^ sProp = "index";

  std::string res = msclr::interop::marshal_as<std::string>(fpm.ReadCustomProperty("C:\\...\\part_8_mm.asm", sProp));

  std::cout << msclr::interop::marshal_as<std::string>(sProp) << "=" << res << std::endl;

    // [...]

  std::string s = "\nAfter DLL call : OK !"; // std::to_string(fcm.maProp))


From here, I don't know where to go :-(

  • In FIleMaker, I have no clue (no error message, only the question marks)
  • There is no error message at all in Windows
  • I tried to look in the Windows Events logs, but nothing related here


So how can I debug my plugin from here ?


Some questions I ask me :

  • Should the compiled DLLs be located in the FileMaker extensions folder (aside the plugin itself) ?
  • Is there a way to package the 2 DLLs in one file (the .fmx) ?
  • Is there another way to track what's going on when I call my plugin function from FileMaker ?


Thanks !