Using Code in a DLL
-
Hi, Is it possible to call a function from an external DLL from C#.NET code. If needed I would use LoadLibrary and GetProcAddress. It would be better if it could be linked at Program Loading. Regards :) :)
Bram van Kampen
-
Hi, Is it possible to call a function from an external DLL from C#.NET code. If needed I would use LoadLibrary and GetProcAddress. It would be better if it could be linked at Program Loading. Regards :) :)
Bram van Kampen
You would want to P/Invoke http://msdn.microsoft.com/en-us/magazine/cc164123.aspx[^]
-
You would want to P/Invoke http://msdn.microsoft.com/en-us/magazine/cc164123.aspx[^]
Thanks, that is much help. What is not entirely clear is, Where does the C# app look for the DLL. On the Server, or on the Remote Machine. I would require it to look for it on the server. The DLL I have in mind produces a Datablock in a buffer provided by the C# code. The C# Code will not have an understanding of the contents, All it will have to do with it is to store it in an SQL Database held on the server. Regards, :) :)
Bram van Kampen
-
Thanks, that is much help. What is not entirely clear is, Where does the C# app look for the DLL. On the Server, or on the Remote Machine. I would require it to look for it on the server. The DLL I have in mind produces a Datablock in a buffer provided by the C# code. The C# Code will not have an understanding of the contents, All it will have to do with it is to store it in an SQL Database held on the server. Regards, :) :)
Bram van Kampen
You can try adding the path of the dll. I'm not totally sure if that works.
-
Thanks, that is much help. What is not entirely clear is, Where does the C# app look for the DLL. On the Server, or on the Remote Machine. I would require it to look for it on the server. The DLL I have in mind produces a Datablock in a buffer provided by the C# code. The C# Code will not have an understanding of the contents, All it will have to do with it is to store it in an SQL Database held on the server. Regards, :) :)
Bram van Kampen