#QFR_0 = 0 ; Unknown #QFR_DESCRIPTION = 1 ; Имя шрифта, которое используется системой #QFR_LOGFONT = 2 ; Массив структур LOGFONT #QFR_PDEV = 3 ; Unknown #QFR_FONTFILE = 4 ; Имя файла шрифта #QFR_5 = 5 ; Unknown #FR_NOT_ENUM = $20 Import "gdi32.lib" ; BOOL GetFontResourceInfo( ; LPCTSTR lpszFilename, // font file name ; LPDWORD cbBuffer, // size of buffer For resouce information ; LPVOID lpBuffer, // buffer For returned resouce information ; DWORD dwQueryType, / resouce information query type ; ); GetFontResourceInfo(*ttf_file,cbBuffer,*buff,flg) As "_GetFontResourceInfoW@16" AddFontResourceEx(*name,fl,res) As "_AddFontResourceExW@12";https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-addfontresourceexa RemoveFontResourceEx(*name,fl,res) As "_RemoveFontResourceExW@12";https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-removefontresourceexw EndImport ;https://www.manhunter.ru/assembler/1953_poluchenie_informacii_o_shrifte_s_pomoschyu_funkcii_getfontresourceinfo.html cb=#MAX_PATH *buff=AllocateMemory(cb) ttf$="d:\0\font.ttf"; path to .TTF rr=AddFontResourceEx(@ttf$,#FR_NOT_ENUM,0) rr=GetFontResourceInfo(@ttf$,@cb,*buff,#QFR_DESCRIPTION) ;ShowMemoryViewer(*buff,cb) Debug PeekS(*buff,-1,#PB_Unicode) RemoveFontResourceEx(@ttf$,#FR_NOT_ENUM,0) FreeMemory(*buff)
Надоело возиться с LoadLibrary(), GetFunction().
gdi32.lib взял из пакета MASM32. Есть ли способ создания .lib для других DLL?