用软件转的不知道行不行<br>unit TEXTSERV;<br>{**************************************************************************}<br>{ }<br>{ This C DLL header file first (automatic) conversion generated by: }<br>{ HeadConv 4.0 (c) 2000 by Bob Swart (aka Dr.Bob - www.drbob42.com) }<br>{ Final Delphi-Jedi (Darth) command-line units edition }<br>{ }<br>{ Generated Date: 2005-12-20 }<br>{ Generated Time: 10:48:08 }<br>{ }<br>{**************************************************************************}<br><br>interface<br>uses<br>{$IFDEF WIN32}<br> Windows;<br>{$ELSE}<br> Wintypes, WinProcs;<br>{$ENDIF}<br><br><br>{=> f:/1/3/3.23/headconv/TEXTSERV.H <=}<br><br>var<br> OnTxCharFormatChange: function(const pcf: PCHARFORMAT): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> OnTxParaFormatChange: function(const ppf: PPARAFORMAT): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxActivate: function(var plOldState: LongInt): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetPasswordChar: function(var pch: TCHAR): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetParaFormat: function(const ppPF: PPARAFORMAT*): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetMaxLength: function(var pLength: LongInt): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxClientToScreen: function(var lppt: POINT): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxCreateCaret: function(hbmp: HBITMAP; <br> xWidth: Integer; <br> yHeight: Integer): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxDeactivate: function(lNewState: LongInt): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxEnableScrollBar: function(fuSBFlags: Integer; <br> fuArrowflags: Integer): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetAcceleratorPos: function(var pcp: LongInt): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetBackStyle: function(var pstyle: TXTBACKSTYLE): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetCharFormat: function(const ppCF: PCHARFORMAT*): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetClientRect: function(var prc: RECT): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetDC: function: HDC cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetExtent: function(var lpExtent: SIZEL): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetPropertyBits: function(dwMask: LongInt; <br> var pdwBits: LongInt): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetScrollBars: function(var pdwScrollBar: LongInt): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetSelectionBarWidth: function(var lSelBarWidth: LongInt): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetSysColor: function(nIndex: Integer): TColorRef cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxGetViewInset: function(var prc: RECT): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxImmGetContext: function: HIMC cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxImmReleaseContext: procedure(HIMC: HIMC) cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxInvalidateRect: procedure(var prc: CRECT; <br> fMode: Bool) cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxKillTimer: procedure(idTimer: Word) cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxNotify: function(iNotify: LongInt; <br> pv: Pointer): HRESULT cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxReleaseDC: function(HDC: HDC): Integer cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxScreenToClient: function(var lppt: POINT): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxScrollWindowEx: procedure(dx: Integer; <br> dy: Integer; <br> var lprcScroll: CRECT; <br> var lprcClip: CRECT; <br> hrgnUpdate: HRGN; <br> var lprcUpdate: RECT; <br> fuScroll: Word) cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxSetCapture: procedure(fCapture: Bool) cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxSetCaretPos: function(x: Integer; <br> y: Integer): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxSetCursor: procedure(hcur: HCURSOR; <br> fText: Bool) cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxSetFocus: procedure cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxSetScrollPos: function(fnBar: Integer; <br> nPos: Integer; <br> fRedraw: Bool): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxSetScrollRange: function(fnBar: Integer; <br> nMinPos: LongInt; <br> nMaxPos: Integer; <br> fRedraw: Bool): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxSetTimer: function(idTimer: Word; <br> uTimeout: Word): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxShowCaret: function(fShow: Bool): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxShowScrollBar: function(fnBar: Integer; <br> fShow: Bool): Bool cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> TxViewChange: procedure(fUpdate: Bool) cdecl {$IFDEF WIN32} stdcall {$ENDIF}; <br><br><br>var<br> DLLLoaded: Boolean { is DLL (dynamically) loaded already? }<br> {$IFDEF WIN32} = False; {$ENDIF}<br><br>implementation<br><br>var<br> SaveExit: pointer;<br> DLLHandle: THandle;<br>{$IFNDEF MSDOS}<br> ErrorMode: Integer;<br>{$ENDIF}<br><br> procedure NewExit; far;<br> begin<br> ExitProc := SaveExit;<br> FreeLibrary(DLLHandle)<br> end {NewExit};<br><br>procedure LoadDLL;<br>begin<br> if DLLLoaded then Exit;<br>{$IFNDEF MSDOS}<br> ErrorMode := SetErrorMode($8000{SEM_NoOpenFileErrorBox});<br>{$ENDIF}<br> DLLHandle := LoadLibrary('TEXTSERV.DLL');<br> if DLLHandle >= 32 then<br> begin<br> DLLLoaded := True;<br> SaveExit := ExitProc;<br> ExitProc := @NewExit;<br> @OnTxCharFormatChange := GetProcAddress(DLLHandle,'OnTxCharFormatChange');<br> {$IFDEF WIN32}<br> Assert(@OnTxCharFormatChange <> nil);<br> {$ENDIF}<br> @OnTxParaFormatChange := GetProcAddress(DLLHandle,'OnTxParaFormatChange');<br> {$IFDEF WIN32}<br> Assert(@OnTxParaFormatChange <> nil);<br> {$ENDIF}<br> @TxActivate := GetProcAddress(DLLHandle,'TxActivate');<br> {$IFDEF WIN32}<br> Assert(@TxActivate <> nil);<br> {$ENDIF}<br> @TxGetPasswordChar := GetProcAddress(DLLHandle,'TxGetPasswordChar');<br> {$IFDEF WIN32}<br> Assert(@TxGetPasswordChar <> nil);<br> {$ENDIF}<br> @TxGetParaFormat := GetProcAddress(DLLHandle,'TxGetParaFormat');<br> {$IFDEF WIN32}<br> Assert(@TxGetParaFormat <> nil);<br> {$ENDIF}<br> @TxGetMaxLength := GetProcAddress(DLLHandle,'TxGetMaxLength');<br> {$IFDEF WIN32}<br> Assert(@TxGetMaxLength <> nil);<br> {$ENDIF}<br> @TxClientToScreen := GetProcAddress(DLLHandle,'TxClientToScreen');<br> {$IFDEF WIN32}<br> Assert(@TxClientToScreen <> nil);<br> {$ENDIF}<br> @TxCreateCaret := GetProcAddress(DLLHandle,'TxCreateCaret');<br> {$IFDEF WIN32}<br> Assert(@TxCreateCaret <> nil);<br> {$ENDIF}<br> @TxDeactivate := GetProcAddress(DLLHandle,'TxDeactivate');<br> {$IFDEF WIN32}<br> Assert(@TxDeactivate <> nil);<br> {$ENDIF}<br> @TxEnableScrollBar := GetProcAddress(DLLHandle,'TxEnableScrollBar');<br> {$IFDEF WIN32}<br> Assert(@TxEnableScrollBar <> nil);<br> {$ENDIF}<br> @TxGetAcceleratorPos := GetProcAddress(DLLHandle,'TxGetAcceleratorPos');<br> {$IFDEF WIN32}<br> Assert(@TxGetAcceleratorPos <> nil);<br> {$ENDIF}<br> @TxGetBackStyle := GetProcAddress(DLLHandle,'TxGetBackStyle');<br> {$IFDEF WIN32}<br> Assert(@TxGetBackStyle <> nil);<br> {$ENDIF}<br> @TxGetCharFormat := GetProcAddress(DLLHandle,'TxGetCharFormat');<br> {$IFDEF WIN32}<br> Assert(@TxGetCharFormat <> nil);<br> {$ENDIF}<br> @TxGetClientRect := GetProcAddress(DLLHandle,'TxGetClientRect');<br> {$IFDEF WIN32}<br> Assert(@TxGetClientRect <> nil);<br> {$ENDIF}<br> @TxGetDC := GetProcAddress(DLLHandle,'TxGetDC');<br> {$IFDEF WIN32}<br> Assert(@TxGetDC <> nil);<br> {$ENDIF}<br> @TxGetExtent := GetProcAddress(DLLHandle,'TxGetExtent');<br> {$IFDEF WIN32}<br> Assert(@TxGetExtent <> nil);<br> {$ENDIF}<br> @TxGetPropertyBits := GetProcAddress(DLLHandle,'TxGetPropertyBits');<br> {$IFDEF WIN32}<br> Assert(@TxGetPropertyBits <> nil);<br> {$ENDIF}<br> @TxGetScrollBars := GetProcAddress(DLLHandle,'TxGetScrollBars');<br> {$IFDEF WIN32}<br> Assert(@TxGetScrollBars <> nil);<br> {$ENDIF}<br> @TxGetSelectionBarWidth := GetProcAddress(DLLHandle,'TxGetSelectionBarWidth');<br> {$IFDEF WIN32}<br> Assert(@TxGetSelectionBarWidth <> nil);<br> {$ENDIF}<br> @TxGetSysColor := GetProcAddress(DLLHandle,'TxGetSysColor');<br> {$IFDEF WIN32}<br> Assert(@TxGetSysColor <> nil);<br> {$ENDIF}<br> @TxGetViewInset := GetProcAddress(DLLHandle,'TxGetViewInset');<br> {$IFDEF WIN32}<br> Assert(@TxGetViewInset <> nil);<br> {$ENDIF}<br> @TxImmGetContext := GetProcAddress(DLLHandle,'TxImmGetContext');<br> {$IFDEF WIN32}<br> Assert(@TxImmGetContext <> nil);<br> {$ENDIF}<br> @TxImmReleaseContext := GetProcAddress(DLLHandle,'TxImmReleaseContext');<br> {$IFDEF WIN32}<br> Assert(@TxImmReleaseContext <> nil);<br> {$ENDIF}<br> @TxInvalidateRect := GetProcAddress(DLLHandle,'TxInvalidateRect');<br> {$IFDEF WIN32}<br> Assert(@TxInvalidateRect <> nil);<br> {$ENDIF}<br> @TxKillTimer := GetProcAddress(DLLHandle,'TxKillTimer');<br> {$IFDEF WIN32}<br> Assert(@TxKillTimer <> nil);<br> {$ENDIF}<br> @TxNotify := GetProcAddress(DLLHandle,'TxNotify');<br> {$IFDEF WIN32}<br> Assert(@TxNotify <> nil);<br> {$ENDIF}<br> @TxReleaseDC := GetProcAddress(DLLHandle,'TxReleaseDC');<br> {$IFDEF WIN32}<br> Assert(@TxReleaseDC <> nil);<br> {$ENDIF}<br> @TxScreenToClient := GetProcAddress(DLLHandle,'TxScreenToClient');<br> {$IFDEF WIN32}<br> Assert(@TxScreenToClient <> nil);<br> {$ENDIF}<br> @TxScrollWindowEx := GetProcAddress(DLLHandle,'TxScrollWindowEx');<br> {$IFDEF WIN32}<br> Assert(@TxScrollWindowEx <> nil);<br> {$ENDIF}<br> @TxSetCapture := GetProcAddress(DLLHandle,'TxSetCapture');<br> {$IFDEF WIN32}<br> Assert(@TxSetCapture <> nil);<br> {$ENDIF}<br> @TxSetCaretPos := GetProcAddress(DLLHandle,'TxSetCaretPos');<br> {$IFDEF WIN32}<br> Assert(@TxSetCaretPos <> nil);<br> {$ENDIF}<br> @TxSetCursor := GetProcAddress(DLLHandle,'TxSetCursor');<br> {$IFDEF WIN32}<br> Assert(@TxSetCursor <> nil);<br> {$ENDIF}<br> @TxSetFocus := GetProcAddress(DLLHandle,'TxSetFocus');<br> {$IFDEF WIN32}<br> Assert(@TxSetFocus <> nil);<br> {$ENDIF}<br> @TxSetScrollPos := GetProcAddress(DLLHandle,'TxSetScrollPos');<br> {$IFDEF WIN32}<br> Assert(@TxSetScrollPos <> nil);<br> {$ENDIF}<br> @TxSetScrollRange := GetProcAddress(DLLHandle,'TxSetScrollRange');<br> {$IFDEF WIN32}<br> Assert(@TxSetScrollRange <> nil);<br> {$ENDIF}<br> @TxSetTimer := GetProcAddress(DLLHandle,'TxSetTimer');<br> {$IFDEF WIN32}<br> Assert(@TxSetTimer <> nil);<br> {$ENDIF}<br> @TxShowCaret := GetProcAddress(DLLHandle,'TxShowCaret');<br> {$IFDEF WIN32}<br> Assert(@TxShowCaret <> nil);<br> {$ENDIF}<br> @TxShowScrollBar := GetProcAddress(DLLHandle,'TxShowScrollBar');<br> {$IFDEF WIN32}<br> Assert(@TxShowScrollBar <> nil);<br> {$ENDIF}<br> @TxViewChange := GetProcAddress(DLLHandle,'TxViewChange');<br> {$IFDEF WIN32}<br> Assert(@TxViewChange <> nil);<br> {$ENDIF}<br> end<br> else<br> begin<br> DLLLoaded := False;<br> { Error: TEXTSERV.DLL could not be loaded !! }<br> end;<br>{$IFNDEF MSDOS}<br> SetErrorMode(ErrorMode)<br>{$ENDIF}<br>end {LoadDLL};<br><br>begin<br> LoadDLL;<br>end.