JohnOne Posted April 30, 2011 Share Posted April 30, 2011 Wernt quite sure where to put this, so here it is. Can anyone tell me about the nature of dllimport, I mean once the dll is imported is it like autoits dllopen in any fashion? Let me try to explain, If my dll has a conditional statement attached to ul_reason_for_call and I use autoit to access a function in that dll, then the conditional statement is only checked when I use dllopen, and I'm free to then call its functions without the conditions being checked if I use the handle returned by DllOpen. If I just use the filename the condition is checked upon each call to a function in the dll. My question is, what is the behaviour of a call to an external dll function when being used from C#? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 30, 2011 Share Posted April 30, 2011 In .Net, once a library has been loaded via DllImport, it remains loaded until the Application Domain is closed. If you don't know what Application Domains are, then you aren't modifying them and they close when your application ends. Link to comment Share on other sites More sharing options...
JohnOne Posted April 30, 2011 Author Share Posted April 30, 2011 Thank you, thats the answer I was hoping for. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted May 1, 2011 Author Share Posted May 1, 2011 Another question regarding this subject if someone knows. When you import multiple functions from same external library (for instance autoitx3), is an instance of the library loaded for each function? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 1, 2011 Share Posted May 1, 2011 Single instance is loaded. Link to comment Share on other sites More sharing options...
JohnOne Posted May 1, 2011 Author Share Posted May 1, 2011 Great, Thanks again Richard Robertson. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
mailro Posted September 20, 2011 Share Posted September 20, 2011 Can someone give a sample code how to import multiple functions from same DLL? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now