|
-
February 29th, 2008, 09:37 AM
#1
dllimport
Hi
I use C# wrapper classes from a SDK in my C# application
This wrapper is using dllimport to load DLLs
When i run my app , it complains , these Dlls cannot be found
I dont know how to set the path where the dllimport will look for the dlls
I did set the PATH variable from RightCLick->MyComputer , but no change
in Visual Studio 2003.NET for C#.NET applicatiion
or should i manually copy these Dlls in System32 folder
Regards
-
February 29th, 2008, 09:55 AM
#2
Re: dllimport
For problems like this you should ALWAYS post the exact error message (copy&paste), as well as the code (using code-tags of course).
If you are refrencing aaa.dll, which in turn references bbb.dll you may get error messages related to aaa.dll when in fact the problem is that bbb.dll can not be found [that is twhy there is Depends.exe]
Also copying to system32 should NOT be done for "normal" non-shared items. As a first atempt I would try copying them locally.
Also run from within the IDE debugger, and pay CAREFUL attention to the Output window.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
February 29th, 2008, 10:10 AM
#3
Re: dllimport
or to put simly
DllImport("MyDLL.Dll", ....... );
does not find MyDll.dll
but if put
DllImport("C:\\MyDLLS\\MyDLL.Dll", ....... );
i.e hard code the path , alls well
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|