Global method for a COM server DLL
-
Hi, I'm trying to implement an MS-IME dictionary in C#. According to the documentation here[^], I need to make a method called
CreateIImeActiveDictInstance
that MS-IME will hunt down and call. Problem is, I can't think of a way to make a global method in C#. I do know that MSIL is capable of global methods. If I can, I want to avoid having to write it in C++. Any ideas? Thanks in advance. -
Hi, I'm trying to implement an MS-IME dictionary in C#. According to the documentation here[^], I need to make a method called
CreateIImeActiveDictInstance
that MS-IME will hunt down and call. Problem is, I can't think of a way to make a global method in C#. I do know that MSIL is capable of global methods. If I can, I want to avoid having to write it in C++. Any ideas? Thanks in advance.There's no way to do this in C#. As you say, MSIL supports it, so it would be possible to write a small piece of MSIL that implements the required method. From there, you would need to make a single DLL; either disassembling the C# code with ILDASM then building the disassembled code plus the new MSIL file with ILASM, or if you're targetting .NET 2.0, using Visual C++'s link.exe. See this topic[^] for more. You could also use a small piece of C++/CLI or Managed C++ code to do this. Again, you'd have to either disassemble/reassemble or use the VC++ 2005 linker. Stability. What an interesting concept. -- Chris Maunder
-
There's no way to do this in C#. As you say, MSIL supports it, so it would be possible to write a small piece of MSIL that implements the required method. From there, you would need to make a single DLL; either disassembling the C# code with ILDASM then building the disassembled code plus the new MSIL file with ILASM, or if you're targetting .NET 2.0, using Visual C++'s link.exe. See this topic[^] for more. You could also use a small piece of C++/CLI or Managed C++ code to do this. Again, you'd have to either disassemble/reassemble or use the VC++ 2005 linker. Stability. What an interesting concept. -- Chris Maunder
Ahh, okay. Thanks!