Search code examples
c#winapipinvoketask

Is WNetGetResourceInformation thread safe?


I am making calls using PInvoke to WNetGetResourceInformation. I have a number of these calls and would like to have these run concurrently on different tasks.

Can I safe make multi-threaded calls to this function?


Solution

  • There is no object involved here, so there's no thread-safety needed. You can call it from any thread.