Source code of Windows XP (NT5)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// Test program for new font query stuff
#include <windows.h>
#include <stdio.h>
#include <process.h>
#include "psqfont.h"
int __cdecl main() {
PS_QUERY_FONT_HANDLE hFontQ; DWORD dwNumFonts; TCHAR szFont[500]; TCHAR szFile[500]; DWORD dwSizeFont; DWORD dwSizeFile; DWORD i;
if (PsBeginFontQuery(&hFontQ) != PS_QFONT_SUCCESS ) { printf("\nPsbegin font query failed"); exit(1); }
if( PsGetNumFontsAvailable( hFontQ, &dwNumFonts) != PS_QFONT_SUCCESS){ printf("\nPsGetNumFontsAvailable failed"); PsEndFontQuery(hFontQ); exit(1); }
// now enum the fonts
for (i = 0 ; i < dwNumFonts;i++ ) { dwSizeFont = sizeof(szFont); dwSizeFile = sizeof(szFile);
PsGetFontInfo( hFontQ, i, szFont, &dwSizeFont, szFile, &dwSizeFile); printf("\n%s %d ::::: %s %d", szFont,dwSizeFont,szFile,dwSizeFile);
} PsEndFontQuery(hFontQ);
return(0); }
|