المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Can we import managed DLL



C# Programming
08-05-2009, 06:00 PM
Hello All ,

i know that DLLImport is used to call some unmanaged Code . Like some third party dll is there and we want to make use of that .

But my question is like i have created one class library using .net only . So when i build that i had DLL too of that . this is managed code .

Now i have placed this dll in GAC.

i want to make use of this DLL in my application by using DLL Import. when i tried it is throwing an exception like DLL not found .


So my question cant we call managed dll using DLLImport ? i know i can add that dll as a refernce and can use it but i dont want that . So it possible with DLLImport or it is only for unmangedDLL.


2. if suppose i am calling an unmanged DLL i.e third pary compnent ... how CLR will locate its address using DLL Import


Sorry for trouble .. But my mind is messed with this.