Print HTML

This forum is for eXpress++ general support.
Message
Author
eborger
Posts: 5
Joined: Fri Apr 16, 2010 8:55 am

Print HTML

#1 Post by eborger »

Hi,

is there an easy way to print the content of an html variable ?

cResponse := LoadFromURL( cURL )

I want to print cResponse, but not just a plain text print, but a formated version, is it possible ?

Thanks,
Edgar

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Print HTML

#2 Post by rdonnay »

Edgar -

You cannot do this with LoadFromUrl(), but you can do it from XbpHtmlViewer() or DCHTMLVIEWER.
Look at the below code:

Code: Select all

#INCLUDE "dcdialog.CH"

#define OLECMDID_PRINT 6
#define OLECMDID_PRINTPREVIEW 7
#define OLECMDID_PAGESETUP 8
#define OLECMDID_PRINT2 49

#define OLECMDEXECOPT_DODEFAULT 0
#define OLECMDEXECOPT_PROMPTUSER 1
#define OLECMDEXECOPT_DONTPROMPTUSER 2
#define OLECMDEXECOPT_SHOWHELP 3


FUNCTION Main( cUrl )

LOCAL GetList[0], GetOptions, oWebBrowser

@ 0,0 DCHTMLVIEWER oWebBrowser SIZE 400,400 PIXEL ;
      NAVIGATE cUrl


DCREAD GUI FIT TITLE 'HTML Document Print Test' ;
   EVAL {||PrintDocument(oWebBrowser)}

RETURN nil

PROC appsys ; RETURN

STATIC FUNCTION PrintDocument(oWebBrowser)

oWebBrowser:ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, NIL, NIL)

RETURN nil
This will display the HTML document in the viewer and then invoke the print.
The eXpress train is coming - and it has more cars.

eborger
Posts: 5
Joined: Fri Apr 16, 2010 8:55 am

Re: Print HTML

#3 Post by eborger »

Hi Roger,

thanks, yes it works, but is it possible to print it without display the htmlviewer window ?

Regards,
Edgar

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Print HTML

#4 Post by Eugene Lutsenko »

Is it possible to get ntml file as the value of a variable that is available for further analysis in the program?
This is done as follows:
cResponse := LoadFromURL( cURL )

I gives an error when linking that function does not exist: LoadFromURL

D:\ALASKA\AIDOS-X>CLS

D:\ALASKA\AIDOS-X>ARC _Aidos.arc

D:\ALASKA\AIDOS-X>XPP _aidos-x

D:\ALASKA\AIDOS-X>ALINK _aidos-x _Aidos.res /PM:PM
Alaska 32-Bit Linker Version 1.90.355
Copyright (c) Alaska Software 1997-2009. All rights reserved.

_aidos-x.obj: error ALK2102: unresolved external symbol LOADFROMURL
ALINK: fatal error ALK4102: 1 external symbols unresolved

It seems to me an extremely exciting opportunity to program in Alaska, which could open the sites, analyze their content and move to other sites on the links listed in them.
Last edited by Eugene Lutsenko on Thu Aug 14, 2014 10:38 am, edited 1 time in total.

eborger
Posts: 5
Joined: Fri Apr 16, 2010 8:55 am

Re: Print HTML

#5 Post by eborger »

You can get LoadfromUrl from here : http://www.alaska-software.com/download ... ection=400

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Print HTML

#6 Post by Eugene Lutsenko »

eborger wrote:You can get LoadfromUrl from here : http://www.alaska-software.com/download ... ection=400
Thank you very much! Really a lot of fun at the indicated link.

Downloaded on this link you LoadfromUrl and try to compile and run this program. He writes that he can not find the file: xbpcre.ch. And where can I get it? In the downloaded archive is only lfromurl.ch.

Large please provide a complete example program LoadfromUrl that can be compiled and explore

Is it possible for this purpose to use the function: DC_ReadHtml()?
Roger! If so, you could give an example of a simple reference to this function to get a text-only site with a given URL
Last edited by Eugene Lutsenko on Thu Aug 14, 2014 12:25 pm, edited 5 times in total.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Print HTML

#7 Post by Eugene Lutsenko »

rdonnay wrote:Edgar -

You cannot do this with LoadFromUrl(), but you can do it from XbpHtmlViewer() or DCHTMLVIEWER.
Look at the below code:

Code: Select all

#INCLUDE "dcdialog.CH"

#define OLECMDID_PRINT 6
#define OLECMDID_PRINTPREVIEW 7
#define OLECMDID_PAGESETUP 8
#define OLECMDID_PRINT2 49

#define OLECMDEXECOPT_DODEFAULT 0
#define OLECMDEXECOPT_PROMPTUSER 1
#define OLECMDEXECOPT_DONTPROMPTUSER 2
#define OLECMDEXECOPT_SHOWHELP 3


FUNCTION Main( cUrl )

LOCAL GetList[0], GetOptions, oWebBrowser

@ 0,0 DCHTMLVIEWER oWebBrowser SIZE 400,400 PIXEL ;
      NAVIGATE cUrl


DCREAD GUI FIT TITLE 'HTML Document Print Test' ;
   EVAL {||PrintDocument(oWebBrowser)}

RETURN nil

PROC appsys ; RETURN

STATIC FUNCTION PrintDocument(oWebBrowser)

oWebBrowser:ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, NIL, NIL)

RETURN nil
This will display the HTML document in the viewer and then invoke the print.
Hello, Roger! I have your program compiles, runs and runs, but is issued at the time of execution issued information about the error:


------------------------------------------------------------------------------
FEHLERPROTOKOLL von "D:\ALASKA\AIDOS-X\WebBrowser.exe" Datum: 14.08.2014 22:21:39

Xbase++ Version : Xbase++ (R) Version 1.90.355
Betriebssystem : Windows 7 06.01 Build 07601 Service Pack 1
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: C VALUE: ExecWB
-> VALTYPE: N VALUE: 6
-> VALTYPE: N VALUE: 1
-> VALTYPE: U VALUE: NIL
-> VALTYPE: U VALUE: NIL
oError:canDefault : Y
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : ¦юяvЄър юЄьхэшЄ№ ъюэхўэюх ьхёЄю яхЁхэюёр, ъюЄюЁюх эх сvыю чрЁхушёЄЁшЁютрэю
0
oError:filename : NIL
oError:genCode : NIL
oError:operation : ExecWB
oError:osCode : -2147221248
oError:severity : 2
oError:subCode : 6500
oError:subSystem : Automation
oError:thread : 1
oError:tries : NIL
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------

Called from PRINTDOCUMENT(87)
Called from (B)MAIN(79)
Called from DC_GETLIST:READGUI(3753)
Called from DC_READGUI(111)
Called from MAIN(79)

I added except dcdialog.Ch are other ch-files

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Print HTML

#8 Post by Auge_Ohr »

Eugene Lutsenko wrote:I have your program compiles, runs and runs

oError:operation : ExecWB
oError:osCode : -2147221248
oError:severity : 2
oError:subCode : 6500
oError:subSystem : Automation
your Connection to Target was drop.
use some SLEEP(10) before next Call.

Code: Select all

Function AutomationError(nError)
///----------------------------------------------------------------------------
   Local cErrorMessage:=""
*  Automation   Automation
*  Error        Error
*  in Decimal   in Hex       Error Description
   Do Case
      Case nError==-2147418113 /*8000FFFF*/ ;   cErrorMessage:="Katastrofale fout."
      Case nError==-2147942413 /*8007000D*/ ;   cErrorMessage:="The Data is invalid."
      Case nError==-2147467263 /*80004001*/ ;   cErrorMessage:="Not implemented."
      Case nError==-2147024882 /*8007000E*/ ;   cErrorMessage:="Ran out of memory."
      Case nError==-2147024809 /*80070057*/ ;   cErrorMessage:="One or more arguments are invalid."
      Case nError==-2147467262 /*80004002*/ ;   cErrorMessage:="No such interface supported."
      Case nError==-2147467261 /*80004003*/ ;   cErrorMessage:="Invalid pointer."
      Case nError==-2147024890 /*80070006*/ ;   cErrorMessage:="Invalid handle."
      Case nError==-2147467260 /*80004004*/ ;   cErrorMessage:="Operation aborted."
      Case nError==-2147467259 /*80004005*/ ;   cErrorMessage:="Unspecified error."
      Case nError==-2147024891 /*80070005*/ ;   cErrorMessage:="General access denied error."
      Case nError==-2147483647 /*80000001*/ ;   cErrorMessage:="Not implemented."
      Case nError==-2147483646 /*80000002*/ ;   cErrorMessage:="Ran out of memory."
      Case nError==-2147483645 /*80000003*/ ;   cErrorMessage:="One or more arguments are invalid."
      Case nError==-2147483644 /*80000004*/ ;   cErrorMessage:="No such interface supported."
      Case nError==-2147483643 /*80000005*/ ;   cErrorMessage:="Invalid pointer."
      Case nError==-2147483642 /*80000006*/ ;   cErrorMessage:="Invalid handle."
      Case nError==-2147483641 /*80000007*/ ;   cErrorMessage:="Operation aborted."
      Case nError==-2147483640 /*80000008*/ ;   cErrorMessage:="Unspecified error."
      Case nError==-2147483639 /*80000009*/ ;   cErrorMessage:="General access denied error."
      Case nError==-2147483638 /*8000000A*/ ;   cErrorMessage:="The data necessary to complete this operation not yet available."
      Case nError==-2147467258 /*80004006*/ ;   cErrorMessage:="Thread local storage failure."
      Case nError==-2147467257 /*80004007*/ ;   cErrorMessage:="Get shared memory allocator failure."
      Case nError==-2147467256 /*80004008*/ ;   cErrorMessage:="Get memory allocator failure."
      Case nError==-2147467255 /*80004009*/ ;   cErrorMessage:="Unable to initialize class cache."
      Case nError==-2147467254 /*8000400A*/ ;   cErrorMessage:="Unable to initialize RPC services."
      Case nError==-2147467253 /*8000400B*/ ;   cErrorMessage:="Cannot set thread local storage channel control."
      Case nError==-2147467252 /*8000400C*/ ;   cErrorMessage:="Could not allocate thread local storage channel control."
      Case nError==-2147467251 /*8000400D*/ ;   cErrorMessage:="The user supplied memory allocator is unacceptable."
      Case nError==-2147467250 /*8000400E*/ ;   cErrorMessage:="The OLE service mutex already exists."
      Case nError==-2147467249 /*8000400F*/ ;   cErrorMessage:="The OLE service file mapping already exists."
      Case nError==-2147467248 /*80004010*/ ;   cErrorMessage:="Unable to map view of file for OLE service."
      Case nError==-2147467247 /*80004011*/ ;   cErrorMessage:="Failure attempting to launch OLE service."
      Case nError==-2147467246 /*80004012*/ ;   cErrorMessage:="There was an attempt to call CoInitialize a second time while single threaded."
      Case nError==-2147467245 /*80004013*/ ;   cErrorMessage:="A Remote activation was necessary but was not allowed."
      Case nError==-2147467244 /*80004014*/ ;   cErrorMessage:="A Remote activation was necessary but the server name provided was invalid."
      Case nError==-2147467243 /*80004015*/ ;   cErrorMessage:="The class is configured to run as a security id different from the caller."
      Case nError==-2147467242 /*80004016*/ ;   cErrorMessage:="Use of Ole1 services requiring DDE windows is disabled."
      Case nError==-2147467241 /*80004017*/ ;   cErrorMessage:="A RunAs specification must be A RunAs specification must be <domain name>\<user name> or simply <user name>."
      Case nError==-2147467240 /*80004018*/ ;   cErrorMessage:="The server process could not be started. The pathname may be incorrect."
      Case nError==-2147467239 /*80004019*/ ;   cErrorMessage:="The server process could not be started as the configured identity. The pathname may be incorrect or unavailable."
      Case nError==-2147467238 /*8000401A*/ ;   cErrorMessage:="The server process could not be started because the configured identity is incorrect. Check the username and password."
      Case nError==-2147467237 /*8000401B*/ ;   cErrorMessage:="The client is not allowed to launch this server."
      Case nError==-2147467236 /*8000401C*/ ;   cErrorMessage:="The service providing this server could not be started."
      Case nError==-2147467235 /*8000401D*/ ;   cErrorMessage:="This computer was unable to communicate with the computer providing the server."
      Case nError==-2147467234 /*8000401E*/ ;   cErrorMessage:="The server did not respond after being launched."
      Case nError==-2147467233 /*8000401F*/ ;   cErrorMessage:="The registration information for this server is inconsistent or incomplete."
      Case nError==-2147467232 /*80004020*/ ;   cErrorMessage:="The registration information for this interface is inconsistent or incomplete."
      Case nError==-2147467231 /*80004021*/ ;   cErrorMessage:="The operation attempted is not supported."
      Case nError==-2147221504 /*80040000*/ ;   cErrorMessage:="Invalid OLEVERB structure."
      Case nError==-2147221503 /*80040001*/ ;   cErrorMessage:="Invalid advise flags."
      Case nError==-2147221502 /*80040002*/ ;   cErrorMessage:="Can't enumerate any more, because the associated data is missing."
      Case nError==-2147221501 /*80040003*/ ;   cErrorMessage:="This implementation doesn't take advises."
      Case nError==-2147221500 /*80040004*/ ;   cErrorMessage:="There is no connection for this connection ID."
      Case nError==-2147221499 /*80040005*/ ;   cErrorMessage:="Need to run the object to perform this operation."
      Case nError==-2147221498 /*80040006*/ ;   cErrorMessage:="There is no cache to operate on."
      Case nError==-2147221497 /*80040007*/ ;   cErrorMessage:="Uninitialized object."
      Case nError==-2147221496 /*80040008*/ ;   cErrorMessage:="Linked object's source class has changed."
      Case nError==-2147221495 /*80040009*/ ;   cErrorMessage:="Not able to get the moniker of the object."
      Case nError==-2147221494 /*8004000A*/ ;   cErrorMessage:="Not able to bind to the source."
      Case nError==-2147221493 /*8004000B*/ ;   cErrorMessage:="Object is static; operation not allowed."
      Case nError==-2147221492 /*8004000C*/ ;   cErrorMessage:="User cancelled out of save dialog."
      Case nError==-2147221491 /*8004000D*/ ;   cErrorMessage:="Invalid rectangle."
      Case nError==-2147221490 /*8004000E*/ ;   cErrorMessage:="compobj.dll is too old for the ole2.dll initialized."
      Case nError==-2147221489 /*8004000F*/ ;   cErrorMessage:="Invalid window handle."
      Case nError==-2147221488 /*80040010*/ ;   cErrorMessage:="Object is not in any of the inplace active states."
      Case nError==-2147221487 /*80040011*/ ;   cErrorMessage:="Not able to convert object."
      Case nError==-2147221486 /*80040012*/ ;   cErrorMessage:="Not able to perform the operation because object is not given storage yet."
      Case nError==-2147221404 /*80040064*/ ;   cErrorMessage:="Invalid FORMATETC structure."
      Case nError==-2147221403 /*80040065*/ ;   cErrorMessage:="Invalid DVTARGETDEVICE structure."
      Case nError==-2147221402 /*80040066*/ ;   cErrorMessage:="Invalid STDGMEDIUM structure."
      Case nError==-2147221401 /*80040067*/ ;   cErrorMessage:="Invalid STATDATA structure."
      Case nError==-2147221400 /*80040068*/ ;   cErrorMessage:="Invalid lindex."
      Case nError==-2147221399 /*80040069*/ ;   cErrorMessage:="Invalid tymed."
      Case nError==-2147221398 /*8004006A*/ ;   cErrorMessage:="Invalid clipboard format."
      Case nError==-2147221397 /*8004006B*/ ;   cErrorMessage:="Invalid aspect(s*/."
      Case nError==-2147221396 /*8004006C*/ ;   cErrorMessage:="tdSize parameter of the DVTARGETDEVICE structure is invalid."
      Case nError==-2147221395 /*8004006D*/ ;   cErrorMessage:="Object doesn't support IViewObject interface."
      Case nError==-2147221248 /*80040100*/ ;   cErrorMessage:="Trying to revoke a drop target that has not been registered."
      Case nError==-2147221247 /*80040101*/ ;   cErrorMessage:="This window has already been registered as a drop target."
      Case nError==-2147221246 /*80040102*/ ;   cErrorMessage:="Invalid window handle."
      Case nError==-2147221232 /*80040110*/ ;   cErrorMessage:="Class does not support aggregation (or class object is remote*/."
      Case nError==-2147221231 /*80040111*/ ;   cErrorMessage:="ClassFactory cannot supply requested class."
      Case nError==-2147221184 /*80040140*/ ;   cErrorMessage:="Error drawing view."
      Case nError==-2147221168 /*80040150*/ ;   cErrorMessage:="Could not read key from registry."
      Case nError==-2147221167 /*80040151*/ ;   cErrorMessage:="Could not write key to registry."
      Case nError==-2147221166 /*80040152*/ ;   cErrorMessage:="Could not find the key in the registry."
      Case nError==-2147221165 /*80040153*/ ;   cErrorMessage:="Invalid value for registry."
      Case nError==-2147221164 /*80040154*/ ;   cErrorMessage:="Class not registered."
      Case nError==-2147221163 /*80040155*/ ;   cErrorMessage:="Interface not registered."
      Case nError==-2147221136 /*80040170*/ ;   cErrorMessage:="Cache not updated."
      Case nError==-2147221120 /*80040180*/ ;   cErrorMessage:="No verbs for OLE object."
      Case nError==-2147221119 /*80040181*/ ;   cErrorMessage:="Invalid verb for OLE object."
      Case nError==-2147221088 /*800401A0*/ ;   cErrorMessage:="Undo is not available."
      Case nError==-2147221087 /*800401A1*/ ;   cErrorMessage:="Space for tools is not available."
      Case nError==-2147221056 /*800401C0*/ ;   cErrorMessage:="OLESTREAM Get method failed."
      Case nError==-2147221055 /*800401C1*/ ;   cErrorMessage:="OLESTREAM Put method failed."
      Case nError==-2147221054 /*800401C2*/ ;   cErrorMessage:="Contents of the OLESTREAM not in correct format."
      Case nError==-2147221053 /*800401C3*/ ;   cErrorMessage:="There was an error in a Windows GDI call while converting the bitmap to a DIB."
      Case nError==-2147221052 /*800401C4*/ ;   cErrorMessage:="Contents of the IStorage not in correct format."
      Case nError==-2147221051 /*800401C5*/ ;   cErrorMessage:="Contents of IStorage is missing one of the standard streams."
      Case nError==-2147221050 /*800401C6*/ ;   cErrorMessage:="There was an error in a Windows GDI call while converting the DIB to a bitmap."
      Case nError==-2147221040 /*800401D0*/ ;   cErrorMessage:="OpenClipboard Failed."
      Case nError==-2147221039 /*800401D1*/ ;   cErrorMessage:="EmptyClipboard Failed."
      Case nError==-2147221038 /*800401D2*/ ;   cErrorMessage:="SetClipboard Failed."
      Case nError==-2147221037 /*800401D3*/ ;   cErrorMessage:="Data on clipboard is invalid."
      Case nError==-2147221036 /*800401D4*/ ;   cErrorMessage:="CloseClipboard Failed."
      Case nError==-2147221024 /*800401E0*/ ;   cErrorMessage:="Moniker needs to be connected manually."
      Case nError==-2147221023 /*800401E1*/ ;   cErrorMessage:="Operation exceeded deadline."
      Case nError==-2147221022 /*800401E2*/ ;   cErrorMessage:="Moniker needs to be generic."
      Case nError==-2147221021 /*800401E3*/ ;   cErrorMessage:="Operation unavailable."
      Case nError==-2147221020 /*800401E4*/ ;   cErrorMessage:="Invalid syntax."
      Case nError==-2147221019 /*800401E5*/ ;   cErrorMessage:="No object for moniker."
      Case nError==-2147221018 /*800401E6*/ ;   cErrorMessage:="Bad extension for file."
      Case nError==-2147221017 /*800401E7*/ ;   cErrorMessage:="Intermediate operation failed."
      Case nError==-2147221016 /*800401E8*/ ;   cErrorMessage:="Moniker is not bindable."
      Case nError==-2147221015 /*800401E9*/ ;   cErrorMessage:="Moniker is not bound."
      Case nError==-2147221014 /*800401EA*/ ;   cErrorMessage:="Moniker cannot open file."
      Case nError==-2147221013 /*800401EB*/ ;   cErrorMessage:="User input required for operation to succeed."
      Case nError==-2147221012 /*800401EC*/ ;   cErrorMessage:="Moniker class has no inverse."
      Case nError==-2147221011 /*800401ED*/ ;   cErrorMessage:="Moniker does not refer to storage."
      Case nError==-2147221010 /*800401EE*/ ;   cErrorMessage:="No common prefix."
      Case nError==-2147221009 /*800401EF*/ ;   cErrorMessage:="Moniker could not be enumerated."
      Case nError==-2147221008 /*800401F0*/ ;   cErrorMessage:="CoInitialize has not been called."
      Case nError==-2147221007 /*800401F1*/ ;   cErrorMessage:="CoInitialize has already been called."
      Case nError==-2147221006 /*800401F2*/ ;   cErrorMessage:="Class of object cannot be determined."
      Case nError==-2147221005 /*800401F3*/ ;   cErrorMessage:="Invalid class string."
      Case nError==-2147221004 /*800401F4*/ ;   cErrorMessage:="Invalid interface string."
      Case nError==-2147221003 /*800401F5*/ ;   cErrorMessage:="Application not found."
      Case nError==-2147221002 /*800401F6*/ ;   cErrorMessage:="Application cannot be run more than once."
      Case nError==-2147221001 /*800401F7*/ ;   cErrorMessage:="Some error in application program."
      Case nError==-2147221000 /*800401F8*/ ;   cErrorMessage:="DLL for class not found."
      Case nError==-2147220999 /*800401F9*/ ;   cErrorMessage:="Error in the DLL."
      Case nError==-2147220998 /*800401FA*/ ;   cErrorMessage:="Verkeerd Operating system of verkeerde versie van het Operating System."
      Case nError==-2147220997 /*800401FB*/ ;   cErrorMessage:="Object is not registered."
      Case nError==-2147220996 /*800401FC*/ ;   cErrorMessage:="Object is already registered."
      Case nError==-2147220995 /*800401FD*/ ;   cErrorMessage:="Object is not connected to server."
      Case nError==-2147220994 /*800401FE*/ ;   cErrorMessage:="Application was launched but it didn't register a class factory."
      Case nError==-2147220993 /*800401FF*/ ;   cErrorMessage:="Object has been released."
      Case nError==-2146959359 /*80080001*/ ;   cErrorMessage:="Attempt to create a class object failed."
      Case nError==-2146959358 /*80080002*/ ;   cErrorMessage:="OLE service could not bind object."
      Case nError==-2146959357 /*80080003*/ ;   cErrorMessage:="RPC communication failed with OLE service."
      Case nError==-2146959356 /*80080004*/ ;   cErrorMessage:="Bad path to object."
      Case nError==-2146959355 /*80080005*/ ;   cErrorMessage:="Server execution failed."
      Case nError==-2146959354 /*80080006*/ ;   cErrorMessage:="OLE service could not communicate with the object server."
      Case nError==-2146959353 /*80080007*/ ;   cErrorMessage:="Moniker path could not be normalized."
      Case nError==-2146959352 /*80080008*/ ;   cErrorMessage:="Object server is stopping when OLE service contacts it."
      Case nError==-2146959351 /*80080009*/ ;   cErrorMessage:="An invalid root block pointer was specified."
      Case nError==-2146959344 /*80080010*/ ;   cErrorMessage:="An allocation chain contained an invalid link pointer."
      Case nError==-2146959343 /*80080011*/ ;   cErrorMessage:="The requested allocation size was too large."
      Case nError==-2147352575 /*80020001*/ ;   cErrorMessage:="Unknown interface."
      Case nError==-2147352573 /*80020003*/ ;   cErrorMessage:="Member not found."
      Case nError==-2147352572 /*80020004*/ ;   cErrorMessage:="Parameter not found."
      Case nError==-2147352571 /*80020005*/ ;   cErrorMessage:="Type mismatch."
      Case nError==-2147352570 /*80020006*/ ;   cErrorMessage:="Unknown name."
      Case nError==-2147352569 /*80020007*/ ;   cErrorMessage:="No named arguments."
      Case nError==-2147352568 /*80020008*/ ;   cErrorMessage:="Bad variable type."
      Case nError==-2147352567 /*80020009*/ ;   cErrorMessage:="Exception occurred."
      Case nError==-2147352566 /*8002000A*/ ;   cErrorMessage:="Out of present range."
      Case nError==-2147352565 /*8002000B*/ ;   cErrorMessage:="Invalid index."
      Case nError==-2147352564 /*8002000C*/ ;   cErrorMessage:="Unknown language."
      Case nError==-2147352563 /*8002000D*/ ;   cErrorMessage:="Memory is locked."
      Case nError==-2147352562 /*8002000E*/ ;   cErrorMessage:="Invalid number of parameters."
      Case nError==-2147352561 /*8002000F*/ ;   cErrorMessage:="Parameter not optional."
      Case nError==-2147352560 /*80020010*/ ;   cErrorMessage:="Invalid callee."
      Case nError==-2147352559 /*80020011*/ ;   cErrorMessage:="Does not support a collection."
      Case nError==-2147319786 /*80028016*/ ;   cErrorMessage:="Buffer too small."
      Case nError==-2147319784 /*80028018*/ ;   cErrorMessage:="Old format or invalid type library."
      Case nError==-2147319783 /*80028019*/ ;   cErrorMessage:="Old format or invalid type library."
      Case nError==-2147319780 /*8002801C*/ ;   cErrorMessage:="Error accessing the OLE registry."
      Case nError==-2147319779 /*8002801D*/ ;   cErrorMessage:="Library not registered."
      Case nError==-2147319769 /*80028027*/ ;   cErrorMessage:="Bound to unknown type."
      Case nError==-2147319768 /*80028028*/ ;   cErrorMessage:="Qualified name disallowed."
      Case nError==-2147319767 /*80028029*/ ;   cErrorMessage:="Invalid forward reference, or reference to uncompiled type."
      Case nError==-2147319766 /*8002802A*/ ;   cErrorMessage:="Type mismatch."
      Case nError==-2147319765 /*8002802B*/ ;   cErrorMessage:="Element not found."
      Case nError==-2147319764 /*8002802C*/ ;   cErrorMessage:="Ambiguous name."
      Case nError==-2147319763 /*8002802D*/ ;   cErrorMessage:="Name already exists in the library."
      Case nError==-2147319762 /*8002802E*/ ;   cErrorMessage:="Unknown LCID."
      Case nError==-2147319761 /*8002802F*/ ;   cErrorMessage:="Function not defined in specified DLL."
      Case nError==-2147317571 /*800288BD*/ ;   cErrorMessage:="Wrong module kind for the operation."
      Case nError==-2147317563 /*800288C5*/ ;   cErrorMessage:="Size may not exceed 64K."
      Case nError==-2147317562 /*800288C6*/ ;   cErrorMessage:="Duplicate ID in inheritance hierarchy."
      Case nError==-2147317553 /*800288CF*/ ;   cErrorMessage:="Incorrect inheritance depth in standard OLE hmember."
      Case nError==-2147316576 /*80028CA0*/ ;   cErrorMessage:="Type mismatch."
      Case nError==-2147316575 /*80028CA1*/ ;   cErrorMessage:="Invalid number of arguments."
      Case nError==-2147316574 /*80028CA2*/ ;   cErrorMessage:="I/O Error."
      Case nError==-2147316573 /*80028CA3*/ ;   cErrorMessage:="Error creating unique tmp file."
      Case nError==-2147312566 /*80029C4A*/ ;   cErrorMessage:="Error loading type library/DLL."
      Case nError==-2147312509 /*80029C83*/ ;   cErrorMessage:="Inconsistent property functions."
      Case nError==-2147312508 /*80029C84*/ ;   cErrorMessage:="Circular dependency between types/modules."
      Case nError==-2147287039 /*80030001*/ ;   cErrorMessage:="Unable to perform requested operation."
      Case nError==-2147287038 /*80030002*/ ;   cErrorMessage:="%1 could not be found."
      Case nError==-2147287037 /*80030003*/ ;   cErrorMessage:="The path %1 could not be found."
      Case nError==-2147287036 /*80030004*/ ;   cErrorMessage:="There are insufficient resources to open another file."
      Case nError==-2147287035 /*80030005*/ ;   cErrorMessage:="Access Denied."
      Case nError==-2147287034 /*80030006*/ ;   cErrorMessage:="Attempted an operation on an invalid object."
      Case nError==-2147287032 /*80030008*/ ;   cErrorMessage:="There is insufficient memory available to complete operation."
      Case nError==-2147287031 /*80030009*/ ;   cErrorMessage:="Invalid pointer error."
      Case nError==-2147287022 /*80030012*/ ;   cErrorMessage:="There are no more entries to return."
      Case nError==-2147287021 /*80030013*/ ;   cErrorMessage:="Disk is write-protected."
      Case nError==-2147287015 /*80030019*/ ;   cErrorMessage:="An error occurred during a seek operation."
      Case nError==-2147287011 /*8003001D*/ ;   cErrorMessage:="A disk error occurred during a write operation."
      Case nError==-2147287010 /*8003001E*/ ;   cErrorMessage:="A disk error occurred during a read operation."
      Case nError==-2147287008 /*80030020*/ ;   cErrorMessage:="A share violation has occurred."
      Case nError==-2147287007 /*80030021*/ ;   cErrorMessage:="A lock violation has occurred."
      Case nError==-2147286960 /*80030050*/ ;   cErrorMessage:="%1 already exists."
      Case nError==-2147286953 /*80030057*/ ;   cErrorMessage:="Invalid parameter error."
      Case nError==-2147286928 /*80030070*/ ;   cErrorMessage:="There is insufficient disk space to complete operation."
      Case nError==-2147286800 /*800300F0*/ ;   cErrorMessage:="Illegal write of non-simple property to simple property set."
      Case nError==-2147286790 /*800300FA*/ ;   cErrorMessage:="An API call exited abnormally."
      Case nError==-2147286789 /*800300FB*/ ;   cErrorMessage:="The file %1 is not a valid compound file."
      Case nError==-2147286788 /*800300FC*/ ;   cErrorMessage:="The name %1 is not valid."
      Case nError==-2147286787 /*800300FD*/ ;   cErrorMessage:="An unexpected error occurred."
      Case nError==-2147286786 /*800300FE*/ ;   cErrorMessage:="That function is not implemented."
      Case nError==-2147286785 /*800300FF*/ ;   cErrorMessage:="Invalid flag error."
      Case nError==-2147286784 /*80030100*/ ;   cErrorMessage:="Attempted to use an object that is busy."
      Case nError==-2147286783 /*80030101*/ ;   cErrorMessage:="The storage has been changed since the last commit."
      Case nError==-2147286782 /*80030102*/ ;   cErrorMessage:="Attempted to use an object that has ceased to exist."
      Case nError==-2147286781 /*80030103*/ ;   cErrorMessage:="Can't save."
      Case nError==-2147286780 /*80030104*/ ;   cErrorMessage:="The compound file %1 was produced with an incompatible version of storage."
      Case nError==-2147286779 /*80030105*/ ;   cErrorMessage:="The compound file %1 was produced with a newer version of storage."
      Case nError==-2147286778 /*80030106*/ ;   cErrorMessage:="Share.exe or equivalent is required for operation."
      Case nError==-2147286777 /*80030107*/ ;   cErrorMessage:="Illegal operation called on non-file based storage."
      Case nError==-2147286776 /*80030108*/ ;   cErrorMessage:="Illegal operation called on object with extant marshallings."
      Case nError==-2147286775 /*80030109*/ ;   cErrorMessage:="The docfile has been corrupted."
      Case nError==-2147286768 /*80030110*/ ;   cErrorMessage:="OLE32.DLL has been loaded at the wrong address."
      Case nError==-2147286527 /*80030201*/ ;   cErrorMessage:="The file download was aborted abnormally. The file is incomplete."
      Case nError==-2147286526 /*80030202*/ ;   cErrorMessage:="The file download has been terminated."
      Case nError==-2147418111 /*80010001*/ ;   cErrorMessage:="Call was rejected by callee."
      Case nError==-2147418110 /*80010002*/ ;   cErrorMessage:="Call was canceled by the message filter."
      Case nError==-2147418109 /*80010003*/ ;   cErrorMessage:="The caller is dispatching an intertask SendMessage call and cannot call out via PostMessage."
      Case nError==-2147418108 /*80010004*/ ;   cErrorMessage:="The caller is dispatching an asynchronous call and cannot make an outgoing call on behalf of this call."
      Case nError==-2147418107 /*80010005*/ ;   cErrorMessage:="It is illegal to call out while inside message filter."
      Case nError==-2147418106 /*80010006*/ ;   cErrorMessage:="The connection terminated or is in a bogus state and cannot be used any more. Other connections are still valid."
      Case nError==-2147418105 /*80010007*/ ;   cErrorMessage:="The callee (server [not server application]*/ is not available and disappeared; all connections are invalid. The call may have executed."
      Case nError==-2147418104 /*80010008*/ ;   cErrorMessage:="The caller (client*/ disappeared while the callee (server*/ was processing a call."
      Case nError==-2147418103 /*80010009*/ ;   cErrorMessage:="The data packet with the marshalled parameter data is incorrect."
      Case nError==-2147418102 /*8001000A*/ ;   cErrorMessage:="The call was not transmitted properly; the message queue was full and was not emptied after yielding."
      Case nError==-2147418101 /*8001000B*/ ;   cErrorMessage:="The client (caller*/ cannot marshal the parameter data - low memory, etc."
      Case nError==-2147418100 /*8001000C*/ ;   cErrorMessage:="The client (caller*/ cannot unmarshal the return data - low memory, etc."
      Case nError==-2147418099 /*8001000D*/ ;   cErrorMessage:="The server (callee*/ cannot marshal the return data - low memory, etc."
      Case nError==-2147418098 /*8001000E*/ ;   cErrorMessage:="The server (callee*/ cannot unmarshal the parameter data - low memory, etc."
      Case nError==-2147418097 /*8001000F*/ ;   cErrorMessage:="Received data is invalid; could be server or client data."
      Case nError==-2147418096 /*80010010*/ ;   cErrorMessage:="A particular parameter is invalid and cannot be (un*/marshalled."
      Case nError==-2147418095 /*80010011*/ ;   cErrorMessage:="There is no second outgoing call on same channel in DDE conversation."
      Case nError==-2147418094 /*80010012*/ ;   cErrorMessage:="The callee (server [not server application]*/ is not available and disappeared; all connections are invalid. The call did not execute."
      Case nError==-2147417856 /*80010100*/ ;   cErrorMessage:="System call failed."
      Case nError==-2147417855 /*80010101*/ ;   cErrorMessage:="Could not allocate some required resource (memory, events, ...*/"
      Case nError==-2147417854 /*80010102*/ ;   cErrorMessage:="Attempted to make calls on more than one thread in single threaded mode."
      Case nError==-2147417853 /*80010103*/ ;   cErrorMessage:="The requested interface is not registered on the server object."
      Case nError==-2147417852 /*80010104*/ ;   cErrorMessage:="RPC could not call the server or could not return the results of calling the server."
      Case nError==-2147417851 /*80010105*/ ;   cErrorMessage:="The server threw an exception."
      Case nError==-2147417850 /*80010106*/ ;   cErrorMessage:="Cannot change thread mode after it is set."
      Case nError==-2147417849 /*80010107*/ ;   cErrorMessage:="The method called does not exist on the server."
      Case nError==-2147417848 /*80010108*/ ;   cErrorMessage:="The object invoked has disconnected from its clients."
      Case nError==-2147417847 /*80010109*/ ;   cErrorMessage:="The object invoked chose not to process the call now. Try again later."
      Case nError==-2147417846 /*8001010A*/ ;   cErrorMessage:="The message filter indicated that the application is busy."
      Case nError==-2147417845 /*8001010B*/ ;   cErrorMessage:="The message filter rejected the call."
      Case nError==-2147417844 /*8001010C*/ ;   cErrorMessage:="A call control interfaces was called with invalid data."
      Case nError==-2147417843 /*8001010D*/ ;   cErrorMessage:="An outgoing call cannot be made since the application is dispatching an input-synchronous call."
      Case nError==-2147417842 /*8001010E*/ ;   cErrorMessage:="The application called an interface that was marshalled for a different thread."
      Case nError==-2147417841 /*8001010F*/ ;   cErrorMessage:="CoInitialize has not been called on the current thread."
      Case nError==-2147417840 /*80010110*/ ;   cErrorMessage:="The version of OLE on the client and server machines does not match."
      Case nError==-2147417839 /*80010111*/ ;   cErrorMessage:="OLE received a packet with an invalid header."
      Case nError==-2147417838 /*80010112*/ ;   cErrorMessage:="OLE received a packet with an invalid extension."
      Case nError==-2147417837 /*80010113*/ ;   cErrorMessage:="The requested object or interface does not exist."
      Case nError==-2147417836 /*80010114*/ ;   cErrorMessage:="The requested object does not exist."
      Case nError==-2147417835 /*80010115*/ ;   cErrorMessage:="OLE has sent a request and is waiting for a reply."
      Case nError==-2147417834 /*80010116*/ ;   cErrorMessage:="OLE is waiting before retrying a request."
      Case nError==-2147417833 /*80010117*/ ;   cErrorMessage:="Call context cannot be accessed after call completed."
      Case nError==-2147417832 /*80010118*/ ;   cErrorMessage:="Impersonate on unsecured calls is not supported."
      Case nError==-2147417831 /*80010119*/ ;   cErrorMessage:="Security must be initialized before any interfaces are marshalled or unmarshalled. It cannot be changed once initialized."
      Case nError==-2147417830 /*8001011A*/ ;   cErrorMessage:="No security packages are installed on this machine or the user is not logged on or there are no compatible security packages between the client and server."
      Case nError==-2147417829 /*8001011B*/ ;   cErrorMessage:="Access is denied."
      Case nError==-2147417828 /*8001011C*/ ;   cErrorMessage:="Remote calls are not allowed for this process."
      Case nError==-2147417827 /*8001011D*/ ;   cErrorMessage:="The marshalled interface data packet (OBJREF*/ has an invalid or unknown format."
      Case nError==-2147352577 /*8001FFFF*/ ;   cErrorMessage:="An internal error occurred."
      Case nError==-2146893823 /*80090001*/ ;   cErrorMessage:="Bad UID."
      Case nError==-2146893822 /*80090002*/ ;   cErrorMessage:="Bad Hash."
      Case nError==-2146893821 /*80090003*/ ;   cErrorMessage:="Bad Key."
      Case nError==-2146893820 /*80090004*/ ;   cErrorMessage:="Bad Length."
      Case nError==-2146893819 /*80090005*/ ;   cErrorMessage:="Bad Data."
      Case nError==-2146893818 /*80090006*/ ;   cErrorMessage:="Invalid Signature."
      Case nError==-2146893817 /*80090007*/ ;   cErrorMessage:="Bad Version of provider."
      Case nError==-2146893816 /*80090008*/ ;   cErrorMessage:="Invalid algorithm specified."
      Case nError==-2146893815 /*80090009*/ ;   cErrorMessage:="Invalid flags specified."
      Case nError==-2146893814 /*8009000A*/ ;   cErrorMessage:="Invalid type specified."
      Case nError==-2146893813 /*8009000B*/ ;   cErrorMessage:="Key not valid for use in specified state."
      Case nError==-2146893812 /*8009000C*/ ;   cErrorMessage:="Hash not valid for use in specified state."
      Case nError==-2146893811 /*8009000D*/ ;   cErrorMessage:="Key does not exist."
      Case nError==-2146893810 /*8009000E*/ ;   cErrorMessage:="Insufficient memory available for the operation."
      Case nError==-2146893809 /*8009000F*/ ;   cErrorMessage:="Object already exists."
      Case nError==-2146893808 /*80090010*/ ;   cErrorMessage:="Access denied."
      Case nError==-2146893807 /*80090011*/ ;   cErrorMessage:="Object was not found."
      Case nError==-2146893806 /*80090012*/ ;   cErrorMessage:="Data already encrypted."
      Case nError==-2146893805 /*80090013*/ ;   cErrorMessage:="Invalid provider specified."
      Case nError==-2146893804 /*80090014*/ ;   cErrorMessage:="Invalid provider type specified."
      Case nError==-2146893803 /*80090015*/ ;   cErrorMessage:="Provider's public key is invalid."
      Case nError==-2146893802 /*80090016*/ ;   cErrorMessage:="Keyset does not exist."
      Case nError==-2146893801 /*80090017*/ ;   cErrorMessage:="Provider type not defined."
      Case nError==-2146893800 /*80090018*/ ;   cErrorMessage:="Provider type as registered is invalid."
      Case nError==-2146893799 /*80090019*/ ;   cErrorMessage:="The keyset is not defined."
      Case nError==-2146893798 /*8009001A*/ ;   cErrorMessage:="Keyset as registered is invalid."
      Case nError==-2146893797 /*8009001B*/ ;   cErrorMessage:="Provider type does not match registered value."
      Case nError==-2146893796 /*8009001C*/ ;   cErrorMessage:="The digital signature file is corrupt."
      Case nError==-2146893795 /*8009001D*/ ;   cErrorMessage:="Provider DLL failed to initialize correctly."
      Case nError==-2146893794 /*8009001E*/ ;   cErrorMessage:="Provider DLL could not be found."
      Case nError==-2146893793 /*8009001F*/ ;   cErrorMessage:="The Keyset parameter is invalid."
      Case nError==-2146893792 /*80090020*/ ;   cErrorMessage:="An internal error occurred."
      Case nError==-2146893791 /*80090021*/ ;   cErrorMessage:="A base error occurred."
      Case nError==-2146762751 /*800B0001*/ ;   cErrorMessage:="The specified trust provider is not known on this system."
      Case nError==-2146762750 /*800B0002*/ ;   cErrorMessage:="The trust verification action specified is not supported by the specified trust provider."
      Case nError==-2146762749 /*800B0003*/ ;   cErrorMessage:="The form specified for the subject is not one supported or known by the specified trust provider."
      Case nError==-2146762748 /*800B0004*/ ;   cErrorMessage:="The subject is not trusted for the specified action."
      Case nError==-2146762747 /*800B0005*/ ;   cErrorMessage:="Error due to problem in ASN.1 encoding process."
      Case nError==-2146762746 /*800B0006*/ ;   cErrorMessage:="Error due to problem in ASN.1 decoding process."
      Case nError==-2146762745 /*800B0007*/ ;   cErrorMessage:="Reading / writing Extensions where Attributes are appropriate, and visa versa."
      Case nError==-2146762744 /*800B0008*/ ;   cErrorMessage:="Unspecified cryptographic failure."
      Case nError==-2146762743 /*800B0009*/ ;   cErrorMessage:="The size of the data could not be determined."
      Case nError==-2146762742 /*800B000A*/ ;   cErrorMessage:="The size of the indefinite-sized data could not be determined."
      Case nError==-2146762741 /*800B000B*/ ;   cErrorMessage:="This object does not read and write self-sizing data."
      Case nError==-2146762496 /*800B0100*/ ;   cErrorMessage:="No signature was present in the subject."
      Case nError==-2146762495 /*800B0101*/ ;   cErrorMessage:="A required certificate is not within its validity period."
      Case nError==-2146762494 /*800B0102*/ ;   cErrorMessage:="The validity periods of the certification chain do not nest correctly."
      Case nError==-2146762493 /*800B0103*/ ;   cErrorMessage:="A certificate that can only be used as an end-entity is being used as a CA or visa versa."
      Case nError==-2146762492 /*800B0104*/ ;   cErrorMessage:="A path length constraint in the certification chain has been violated."
      Case nError==-2146762491 /*800B0105*/ ;   cErrorMessage:="An extension of unknown type that is labeled 'critical' is present in a certificate."
      Case nError==-2146762490 /*800B0106*/ ;   cErrorMessage:="A certificate is being used for a purpose other than that for which it is permitted."
      Case nError==-2146762489 /*800B0107*/ ;   cErrorMessage:="A parent of a given certificate in fact did not issue that child certificate."
      Case nError==-2146762488 /*800B0108*/ ;   cErrorMessage:="A certificate is missing or has an empty value for an important field, such as a subject or issuer name."
      Case nError==-2146762487 /*800B0109*/ ;   cErrorMessage:="A certification chain processed correctly, but terminated in a root certificate which isn't trusted by the trust provider."
      Case nError==-2146762486 /*800B010A*/ ;   cErrorMessage:="A chain of certs didn't chain as they should in a certain application of chaining."
   EndCase
Return cErrorMessage
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Print HTML

#9 Post by rdonnay »

Hello, Roger! I have your program compiles, runs and runs, but is issued at the time of execution issued information about the error:
You must make sure that you navigate to a valid web page first.

Try this:

cUrl := "http://donnay-software.com''
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Print HTML

#10 Post by rdonnay »

Downloaded on this link you LoadfromUrl and try to compile and run this program. He writes that he can not find the file: xbpcre.ch. And where can I get it? In the downloaded archive is only lfromurl.ch.
You link to add ASINET10.LIB to your project file.
If you don't have Asinet, then you probably did not purchase the professional subscription.
The eXpress train is coming - and it has more cars.

Post Reply