PC Review


Reply
Thread Tools Rate Thread

DllImportAttribute

 
 
Ori Calvo
Guest
Posts: n/a
 
      2nd Dec 2005
Hello All,

I am using DllImport attribute to do some work againt an unmanaged dll.
The unmanaged DLL is written that way that when calling one method a global
variable is updated so when calling an another function inside the DLL the
same global variable is used to apply some work. My question is as follow:

Does the DLL remain loaded after calling a function inside it or might the
CLR unload the DLL just after calling the exported function so all globals
variables state is lost?

Thanks, Ori


 
Reply With Quote
 
 
 
 
Lloyd Dupont
Guest
Posts: n/a
 
      2nd Dec 2005
I think it stay loaded.
but, in your case, it will be easy to test!


"Ori Calvo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello All,
>
> I am using DllImport attribute to do some work againt an unmanaged dll.
> The unmanaged DLL is written that way that when calling one method a
> global variable is updated so when calling an another function inside the
> DLL the same global variable is used to apply some work. My question is as
> follow:
>
> Does the DLL remain loaded after calling a function inside it or might the
> CLR unload the DLL just after calling the exported function so all globals
> variables state is lost?
>
> Thanks, Ori
>



 
Reply With Quote
 
Mattias Sjögren
Guest
Posts: n/a
 
      2nd Dec 2005

>Does the DLL remain loaded after calling a function inside it


Yes


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
a question about DllImportAttribute dgk Microsoft VB .NET 2 3rd Jan 2005 05:49 PM
DllImportAttribute CallingConvention Mr.Tickle Microsoft VC .NET 13 20th Sep 2003 12:42 PM
DllImportAttribute CallingConvention Mr.Tickle Microsoft C# .NET 12 20th Sep 2003 12:42 PM
DllImportAttribute CallingConvention Mr.Tickle Microsoft Dot NET Framework 12 20th Sep 2003 12:42 PM
DllImportAttribute CallingConvention Mr.Tickle Microsoft Dot NET 12 20th Sep 2003 12:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:40 PM.