Skip navigation

使用.NET CF的API

Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)+@"\"

使用P/Invoke Core API:

Q: How can I get current directory of my application on .net cf
A: Unfortunately I don’t know the .NET CF answer for this. I know in native code you can use GetModuleFileName to get the full path to the current .exe, and chop off the .exe name to get the path. In general Windows CE does not expose the concept of a “current directory,” but the .NET CF may.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>