General access to Windows Directories on PPC, C#

  • Thread starter Thread starter Neville Lang
  • Start date Start date
N

Neville Lang

Hi all,

During installation of my PPC app (C#), I install a custom font file (TTF)
into the \Windows\Fonts directory on the PPC. This is achieved in the .INF
file by specifying its location as %CE15%, a macro string.

However, in my C# code, I hard-code this path in one of my global strings,
as follows:
public static string strFontPath = @"\Windows\Fonts\";

I have now found that international versions of Windows do not use the
English name "Fonts" as a folder name. Are there macro-like strings in C#
that I can use to access the specific Font folder without the need to
hard-code it? Or is there a more "international" standard of accessing these
folders without knowing the local language?

In fact, this question will apply to all sub-folders under \Windows. I
understand that the word "Windows" is used as a folder for all languages but
I am not 100% sure of this.

Regards,
Neville Lang
 
Peter,

Thank you for the tip. After not finding anything in the C# documentation, I
must admit I had forgotten about P/Invoking something in the OS.

Just a further question - can I assume that the \Windows folder on a Pocket
PC exists for ALL country installations, regardless of language? Others
list members may have an input here too.

Regards,
Neville Lang
 
I wouldn't make that assumption, although I'd bet that, right now, it is
true that every language has a "Windows" directory.

Paul T.
 
Back
Top