By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

enumerating and using fonts installed by AddFontResourceEx

P: n/a
1. I've installed a bunch of fonts in main application, which is in native
C++ code using AddFontResourceEx
2. A C# application is launched from this main application, but failed to
enumerate those installed fonts.

My issue is that I don't want those fonts to be used outside of the main
application so that I've set the font characteristics as FR_PRIVATE. However,
I want the C# application be able to use those fonts. Although the C# app is
from Main application, probably it is in another process so that it is not
able to enumerate the fonts.

My question is may I view and use those fonts in C# application? And how?

Thanks in advance,
Aug 15 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Gary,

You can't do this. The documentation specifically states that fonts
added using the FR_PRIVATE flag are only accessible by the process that made
the call.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gary" <Ga**@discussions.microsoft.comwrote in message
news:4A**********************************@microsof t.com...
1. I've installed a bunch of fonts in main application, which is in native
C++ code using AddFontResourceEx
2. A C# application is launched from this main application, but failed to
enumerate those installed fonts.

My issue is that I don't want those fonts to be used outside of the main
application so that I've set the font characteristics as FR_PRIVATE.
However,
I want the C# application be able to use those fonts. Although the C# app
is
from Main application, probably it is in another process so that it is not
able to enumerate the fonts.

My question is may I view and use those fonts in C# application? And how?

Thanks in advance,

Aug 15 '06 #2

P: n/a
Yes. I think it is impossible for one process to get private fonts from
another process. However, this C# app is actually in side the Main process.
It is an addin to that application.

Is there a way to check the private fonts?

"Nicholas Paldino [.NET/C# MVP]" wrote:
Gary,

You can't do this. The documentation specifically states that fonts
added using the FR_PRIVATE flag are only accessible by the process that made
the call.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gary" <Ga**@discussions.microsoft.comwrote in message
news:4A**********************************@microsof t.com...
1. I've installed a bunch of fonts in main application, which is in native
C++ code using AddFontResourceEx
2. A C# application is launched from this main application, but failed to
enumerate those installed fonts.

My issue is that I don't want those fonts to be used outside of the main
application so that I've set the font characteristics as FR_PRIVATE.
However,
I want the C# application be able to use those fonts. Although the C# app
is
from Main application, probably it is in another process so that it is not
able to enumerate the fonts.

My question is may I view and use those fonts in C# application? And how?

Thanks in advance,


Aug 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.