lonewolf32
Member
- Joined
- May 3, 2006
- Messages
- 17
How do I P/Invoke a DLL that I wrote in C, that is not in the path? I need to do the following steps in C#:
- Query the registry to find the location of unmanaged DLL
- Somehow communicate the location of the DLL to P/Invoke
- Then utilize the member functions of the unmanaged DLL
If I put my unmanaged DLL in system32, P/Invoke finds it fine and I can utilize its functionality however this is not an option on the customer system. The unmanaged DLL gets installed to a Program Files directory that the customer can change, and its not the same directory where my C# assembly is located.
Thanks!
- Query the registry to find the location of unmanaged DLL
- Somehow communicate the location of the DLL to P/Invoke
- Then utilize the member functions of the unmanaged DLL
If I put my unmanaged DLL in system32, P/Invoke finds it fine and I can utilize its functionality however this is not an option on the customer system. The unmanaged DLL gets installed to a Program Files directory that the customer can change, and its not the same directory where my C# assembly is located.
Thanks!