Search found 299 matches

by edk
Mon Mar 13, 2017 9:41 am
Forum: General Discussions
Topic: Block Check Character (BCC)
Replies: 22
Views: 3475

Re: Block Check Character (BCC)

I'm using such a function with communication with Polish fiscal printers to calculate CRC: function CalculateCRC param cString local nResult := 0xff local nChar local i local cRetValue for i:=1 to len(cString) nChar := asc(substr(cString,i,1)) nResult := numxor(nResult, nChar) next i // conversion ...
by edk
Mon Mar 13, 2017 9:30 am
Forum: General Discussions
Topic: Block Check Character (BCC)
Replies: 22
Views: 3475

Re: Block Check Character (BCC)

Roberto Lopez wrote:
Mon Mar 13, 2017 12:44 am
Yes. It provides a nice OCX and other things, but, I like do my apps portable, so I prefer not to rely on an OCX control that could generate unexpected problems.
I mean here the idea to see how libraries provided by the manufacturer calculate the BCC.
by edk
Sun Mar 12, 2017 10:20 am
Forum: HMG Samples
Topic: Download file from WWW
Replies: 49
Views: 8330

Re: Download file from WWW

mol wrote:
Sun Mar 12, 2017 6:06 am
Can you add to your code lines, which changes http AGENT to Mozilla or IE?
Marku add after oSoap:open

Code: Select all

oSoap:setRequestHeader ("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)")
edk.
by edk
Sun Mar 12, 2017 9:18 am
Forum: HMG Samples
Topic: Download file from WWW
Replies: 49
Views: 8330

Re: Download file from WWW

hbtip library itself does not support https.
You need to add support for SSL to be able to use https protocol.
by edk
Fri Mar 10, 2017 12:27 pm
Forum: HMG Samples
Topic: Download file from WWW
Replies: 49
Views: 8330

Re: Download file from WWW

Just where EXE is located.
Edward.
by edk
Fri Mar 10, 2017 10:29 am
Forum: HMG Samples
Topic: Download file from WWW
Replies: 49
Views: 8330

Re: Download file from WWW

Hi RPC. Try this: C:\hmg.3.4.3\HARBOUR\contrib\hbtip\tests\loadhtml.prg But, if you need to read pages from https, you must include SSL suport #require "hbssl" REQUEST __HBEXTERN__HBSSL__ IF !tip_SSL() MsgStop("Required SSL") Return ENDIF oHttp := TIPClientHTTP():new( "https://www.google.com/search"...
by edk
Fri Mar 10, 2017 10:06 am
Forum: General Discussions
Topic: Block Check Character (BCC)
Replies: 22
Views: 3475

Re: Block Check Character (BCC)

Hi again. Sorry for the delay, but I was in the delegation. The description of BCC in the manual (translated from original Spanish) is as follows: BCC = Four hexadecimales. Binary sum of all prior bytes In my opinion the binary sum of all bytes is nothing but the sum of the ASCII codes of each chara...
by edk
Wed Mar 08, 2017 8:45 pm
Forum: General Discussions
Topic: Block Check Character (BCC)
Replies: 22
Views: 3475

Re: Block Check Character (BCC)

Hi Roberto.
Way of calculating the checksum should be described in the programmer's documentation. What's a model of fiscal printer?

Code: Select all

[STX]1[ESC]*[FS]0000[FS]0000[FS]0004[FS]3[FS]83[FS]81[FS]2[FS]0[FS]0
[ETX]0054
is similar to polish Posnet protocol.

Edward.
by edk
Sun Feb 26, 2017 9:37 am
Forum: HMG General Help
Topic: Communication via HTTP with SOAP
Replies: 18
Views: 1884

Re: Communication via HTTP with SOAP

I believed you can do it. :)