|
From: Ermete G. <ex...@li...> - 2004-06-01 09:58:29
|
I have found some problems using external dlls from a c# project. In C# we can basically use only .NET assemblies (which are NOT common dlls). Check <http://www.dotnet247.com/247reference/msgs/15/76678.aspx>here and <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconinteroperatingwithunmanagedcode.asp>here for more info The problem is that to use the exported functions of a DLL (in .NET they're called "unmanaged dll function") we have to declare it again in C# and we can forget to simply handle classes. Concretely in paqfiles.dll there are 129 exported functions that must be declared again. Plus this if we want to group them again into classes or (better) if we want to use them like classes we have to write a wrapper for each class and for each datatype. It's like hell!! Note that under linux there are no DLLs and the wrappers should be certainly modified Another problem I encountered is that I couldn't find a way to separate project files from intermediate and final ones. The directory where's the project file is the same for all others and the configuration windows does not give me the possibility to change the project directory Incredible.. forget compatibility where Microsoft is in the middle!! I think we can forget also the PAQExplorer under C# :-( We can have the insane idea of porting the whole PAQFiles under C++ managed (.NET) or C# but what about the rest of the project? I don't think there's a way to access .NET code from outside. I mean without declare again every exported function and write wrappers. What are the alternatives? 1) leave PAQExplorer under C++ but use gtk or qt as graphic libraries, which are multiplatform and non-microsoft (fortunately!). I don't know if there's an IDE that supports them 2) try to use c++ managed and see if it has the same problems 3) anything else?! Exio82 |