usp10 for delphi
library usp10;uses
Windows,
{$R *.res}
var
ModHandle: Cardinal;
POldLpkPresent: Pointer;
POldScriptApplyDigitSubstitution: Pointer;
POldScriptApplyLogicalWidth: Pointer;
POldScriptBreak: Pointer;
POldScriptCPtoX: Pointer;
POldScriptCacheGetHeight: Pointer;
POldScriptFreeCache: Pointer;
POldScriptGetCMap: Pointer;
POldScriptGetFontProperties: Pointer;
POldScriptGetGlyphABCWidth: Pointer;
POldScriptGetLogicalWidths: Pointer;
POldScriptGetProperties: Pointer;
POldScriptIsComplex: Pointer;
POldScriptItemize: Pointer;
POldScriptJustify: Pointer;
POldScriptLayout: Pointer;
POldScriptPlace: Pointer;
POldScriptRecordDigitSubstitution: Pointer;
POldScriptShape: Pointer;
POldScriptStringAnalyse: Pointer;
POldScriptStringCPtoX: Pointer;
POldScriptStringFree: Pointer;
POldScriptStringGetLogicalWidths: Pointer;
POldScriptStringGetOrder: Pointer;
POldScriptStringOut: Pointer;
POldScriptStringValidate: Pointer;
POldScriptStringXtoCP: Pointer;
POldScriptString_pLogAttr: Pointer;
POldScriptString_pSize: Pointer;
POldScriptString_pcOutChars: Pointer;
POldScriptTextOut: Pointer;
POldScriptXtoCP: Pointer;
POldUspAllocCache: Pointer;
POldUspAllocTemp: Pointer;
POldUspFreeMem: Pointer;
procedure LpkPresent; asm jmp POldLpkPresent end;
procedure ScriptApplyDigitSubstitution; asm jmp POldScriptApplyDigitSubstitution end;
procedure ScriptApplyLogicalWidth; asm jmp POldScriptApplyLogicalWidth end;
procedure ScriptBreak; asm jmp POldScriptBreak end;
procedure ScriptCPtoX; asm jmp POldScriptCPtoX end;
procedure ScriptCacheGetHeight; asm jmp POldScriptCacheGetHeight end;
procedure ScriptFreeCache; asm jmp POldScriptFreeCache end;
procedure ScriptGetCMap; asm jmp POldScriptGetCMap end;
procedure ScriptGetFontProperties; asm jmp POldScriptGetFontProperties end;
procedure ScriptGetGlyphABCWidth; asm jmp POldScriptGetGlyphABCWidth end;
procedure ScriptGetLogicalWidths; asm jmp POldScriptGetLogicalWidths end;
procedure ScriptGetProperties; asm jmp POldScriptGetProperties end;
procedure ScriptIsComplex; asm jmp POldScriptIsComplex end;
procedure ScriptItemize; asm jmp POldScriptItemize end;
procedure ScriptJustify; asm jmp POldScriptJustify end;
procedure ScriptLayout; asm jmp POldScriptLayout end;
procedure ScriptPlace; asm jmp POldScriptPlace end;
procedure ScriptRecordDigitSubstitution; asm jmp POldScriptRecordDigitSubstitution end;
procedure ScriptShape; asm jmp POldScriptShape end;
procedure ScriptStringAnalyse; asm jmp POldScriptStringAnalyse end;
procedure ScriptStringCPtoX; asm jmp POldScriptStringCPtoX end;
procedure ScriptStringFree; asm jmp POldScriptStringFree end;
procedure ScriptStringGetLogicalWidths; asm jmp POldScriptStringGetLogicalWidths end;
procedure ScriptStringGetOrder; asm jmp POldScriptStringGetOrder end;
procedure ScriptStringOut; asm jmp POldScriptStringOut end;
procedure ScriptStringValidate; asm jmp POldScriptStringValidate end;
procedure ScriptStringXtoCP; asm jmp POldScriptStringXtoCP end;
procedure ScriptString_pLogAttr; asm jmp POldScriptString_pLogAttr end;
procedure ScriptString_pSize; asm jmp POldScriptString_pSize end;
procedure ScriptString_pcOutChars; asm jmp POldScriptString_pcOutChars end;
procedure ScriptTextOut; asm jmp POldScriptTextOut end;
procedure ScriptXtoCP; asm jmp POldScriptXtoCP end;
procedure UspAllocCache; asm jmp POldUspAllocCache end;
procedure UspAllocTemp; asm jmp POldUspAllocTemp end;
procedure UspFreeMem; asm jmp POldUspFreeMem end;
exports
LpkPresent,
ScriptApplyDigitSubstitution,
ScriptApplyLogicalWidth,
ScriptBreak,
ScriptCPtoX,
ScriptCacheGetHeight,
ScriptFreeCache,
ScriptGetCMap,
ScriptGetFontProperties,
ScriptGetGlyphABCWidth,
ScriptGetLogicalWidths,
ScriptGetProperties,
ScriptIsComplex,
ScriptItemize,
ScriptJustify,
ScriptLayout,
ScriptPlace,
ScriptRecordDigitSubstitution,
ScriptShape,
ScriptStringAnalyse,
ScriptStringCPtoX,
ScriptStringFree,
ScriptStringGetLogicalWidths,
ScriptStringGetOrder,
ScriptStringOut,
ScriptStringValidate,
ScriptStringXtoCP,
ScriptString_pLogAttr,
ScriptString_pSize,
ScriptString_pcOutChars,
ScriptTextOut,
ScriptXtoCP,
UspAllocCache,
UspAllocTemp,
UspFreeMem;
begin
ModHandle:= LoadLibrary('C:\WINDOWS\system32\usp10.dll');
if ModHandle > 0 then
begin
POldLpkPresent:= GetProcAddress(ModHandle, 'LpkPresent');
POldScriptApplyDigitSubstitution:= GetProcAddress(ModHandle, 'ScriptApplyDigitSubstitution');
POldScriptApplyLogicalWidth:= GetProcAddress(ModHandle, 'ScriptApplyLogicalWidth');
POldScriptBreak:= GetProcAddress(ModHandle, 'ScriptBreak');
POldScriptCPtoX:= GetProcAddress(ModHandle, 'ScriptCPtoX');
POldScriptCacheGetHeight:= GetProcAddress(ModHandle, 'ScriptCacheGetHeight');
POldScriptFreeCache:= GetProcAddress(ModHandle, 'ScriptFreeCache');
POldScriptGetCMap:= GetProcAddress(ModHandle, 'ScriptGetCMap');
POldScriptGetFontProperties:= GetProcAddress(ModHandle, 'ScriptGetFontProperties');
POldScriptGetGlyphABCWidth:= GetProcAddress(ModHandle, 'ScriptGetGlyphABCWidth');
POldScriptGetLogicalWidths:= GetProcAddress(ModHandle, 'ScriptGetLogicalWidths');
POldScriptGetProperties:= GetProcAddress(ModHandle, 'ScriptGetProperties');
POldScriptIsComplex:= GetProcAddress(ModHandle, 'ScriptIsComplex');
POldScriptItemize:= GetProcAddress(ModHandle, 'ScriptItemize');
POldScriptJustify:= GetProcAddress(ModHandle, 'ScriptJustify');
POldScriptLayout:= GetProcAddress(ModHandle, 'ScriptLayout');
POldScriptPlace:= GetProcAddress(ModHandle, 'ScriptPlace');
POldScriptRecordDigitSubstitution:= GetProcAddress(ModHandle, 'ScriptRecordDigitSubstitution');
POldScriptShape:= GetProcAddress(ModHandle, 'ScriptShape');
POldScriptStringAnalyse:= GetProcAddress(ModHandle, 'ScriptStringAnalyse');
POldScriptStringCPtoX:= GetProcAddress(ModHandle, 'ScriptStringCPtoX');
POldScriptStringFree:= GetProcAddress(ModHandle, 'ScriptStringFree');
POldScriptStringGetLogicalWidths:= GetProcAddress(ModHandle, 'ScriptStringGetLogicalWidths');
POldScriptStringGetOrder:= GetProcAddress(ModHandle, 'ScriptStringGetOrder');
POldScriptStringOut:= GetProcAddress(ModHandle, 'ScriptStringOut');
POldScriptStringValidate:= GetProcAddress(ModHandle, 'ScriptStringValidate');
POldScriptStringXtoCP:= GetProcAddress(ModHandle, 'ScriptStringXtoCP');
POldScriptString_pLogAttr:= GetProcAddress(ModHandle, 'ScriptString_pLogAttr');
POldScriptString_pSize:= GetProcAddress(ModHandle, 'ScriptString_pSize');
POldScriptString_pcOutChars:= GetProcAddress(ModHandle, 'ScriptString_pcOutChars');
POldScriptTextOut:= GetProcAddress(ModHandle, 'ScriptTextOut');
POldScriptXtoCP:= GetProcAddress(ModHandle, 'ScriptXtoCP');
POldUspAllocCache:= GetProcAddress(ModHandle, 'UspAllocCache');
POldUspAllocTemp:= GetProcAddress(ModHandle, 'UspAllocTemp');
POldUspFreeMem:= GetProcAddress(ModHandle, 'UspFreeMem');
end;
begin
//你要干的事~
end.
咱不说明这是什么?
看不懂:( 类似LPK那种系统DLL劫持,可以用来做补丁~比LPK好,可以兼容vista下使用~ 这个很不错,有VC的吗 楼上:类似LPK那种系统DLL劫持,可以用来做补丁~比LPK好,可以兼容vista下使用~
usp10 加载机制和 lpk 应该是一样的 ??
页:
[1]