Как изменить мой код C# для вызова или сохранения моего 32-битного файла dll, чтобы я мог запустить его в 64-битной верс ⇐ C#
-
Anonymous
Как изменить мой код C# для вызова или сохранения моего 32-битного файла dll, чтобы я мог запустить его в 64-битной верс
I have never used c# and done COM wrapper method so please bear with me. I'm trying to use the COM wrapper method so I can access my 32bit dll files to run a macro on a 64bit excel.
Here is my code where I was able to create my server for the dll. I don't know what I need to do next to connect my 32bit dll file or store it in that server I suppose.
using System; using System.Runtime.InteropServices; namespace FileUtils { [ComVisible(true)] [Guid("56075aeb-2f20-41d7-b9c5-e41bfd32c8b1")] public interface IFileUtils { string GetFileName(string path); } [ComVisible(true)] [Guid("6d0cadce-a2f1-45fd-964d-fc0219d18c7e")] [ProgId("Lib.FileUtils")] public class FileUtils : IFileUtils { public string GetFileName(String path) => System.IO.Path.GetFileName(path); } }
Источник: https://stackoverflow.com/questions/780 ... -i-can-run
I have never used c# and done COM wrapper method so please bear with me. I'm trying to use the COM wrapper method so I can access my 32bit dll files to run a macro on a 64bit excel.
Here is my code where I was able to create my server for the dll. I don't know what I need to do next to connect my 32bit dll file or store it in that server I suppose.
using System; using System.Runtime.InteropServices; namespace FileUtils { [ComVisible(true)] [Guid("56075aeb-2f20-41d7-b9c5-e41bfd32c8b1")] public interface IFileUtils { string GetFileName(string path); } [ComVisible(true)] [Guid("6d0cadce-a2f1-45fd-964d-fc0219d18c7e")] [ProgId("Lib.FileUtils")] public class FileUtils : IFileUtils { public string GetFileName(String path) => System.IO.Path.GetFileName(path); } }
Источник: https://stackoverflow.com/questions/780 ... -i-can-run
Мобильная версия