G
Gordon Knote
Hi
I'm currently writing a VB.NET service that uses external
Dlls, like this:
Private Declare Function ReadSettings Lib "mydll.dll" ()
Now, how can I protect this function (ReadSettings) from
being called more then once a time?
I tried to use
System.Threading.Monitor.Enter(ReadSettings)
ReadSettings()
System.Threading.Monitor.Exit(ReadSettings)
but this caused a reference null exception. So, can
anyone tell me how I can protect external functions?
Thanks
Gordon
I'm currently writing a VB.NET service that uses external
Dlls, like this:
Private Declare Function ReadSettings Lib "mydll.dll" ()
Now, how can I protect this function (ReadSettings) from
being called more then once a time?
I tried to use
System.Threading.Monitor.Enter(ReadSettings)
ReadSettings()
System.Threading.Monitor.Exit(ReadSettings)
but this caused a reference null exception. So, can
anyone tell me how I can protect external functions?
Thanks
Gordon