Welcome! Log In Create A New Profile

Advanced

Michael Drechsel: [WD22] API Question

Posted by harvey68 
Michael Drechsel: [WD22] API Question
September 07, 2018 07:36AM
Autor: Michael Drechsel

Link zum Beitrag: [27130.foren.mysnip.de]

Hi API Gurus,

I need some help.

I use a OCR API which has the following function:

HRESULT OCR_MakeSearchable(
PXODocument Doc,
PXO_Options* pOptions,
PXO_Pagelist PageList = NULL
);

PXO_Options is a structure

My Code:


OCR_MakeSearchable is API Description
OCR_MakeSearchable..DLLName="OcrTools.x86.dll"
OCR_MakeSearchable..FunctionName="OCR_MakeSearchable"
OCR_MakeSearchable..ReturnType=apiSystemInt
OCR_MakeSearchable..Parameter[1]..Type=apiSystemInt//PDF
OCR_MakeSearchable..Parameter[2]..Type=stMyPXO //Structur
<<<<<<<<<<<<ERROR
OCR_MakeSearchable..Parameter[3]..Type=apiSystemInt //NULL

How to declare a structure parameter ?
Michael Drechsel: [WD22] API Question
September 07, 2018 07:40AM
Autor: Michael Drechsel
Link zum Beitrag: [27130.foren.mysnip.de]

Hi,

first problem resolved. But I have another:

I have to create a Callback function in Windev and these function should
be called with his adress:

nRes = OCR_SetCallback(doc, AddressOf Callback, 0)


I have no idea, how to do that in WD.

Any hints ?
Peter Holemans: [WD22] API Question
September 07, 2018 07:41AM
Autor: Peter Holemans

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Michael,

If I recall correctly you should simply provide an ampersand in front of
the callback procedure.

nRes = OCR_SetCallback(doc, &MyProcedureName, 0)


Cheers,

Peter Holemans
Michael Drechsel: [WD22] API Question
September 07, 2018 07:43AM
Autor: Michael Drechsel

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Peter,

nope.

WD says: Error:The & operator applies to variables only.
pService.OCR, Local Procedure, line 59, column 33


Can I put the adress of the function in a variable ? And if yes, how ?
Peter Holemans: [WD22] API Question
September 07, 2018 07:44AM
Autor: Peter Holemans

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Michael,

It's all in the help: [doc.windev.com]

See section: "Procedure called in CallBack"

Cheers,

Peter H.
Fabrice Harari: [WD22] API Question
September 07, 2018 07:45AM
Autor: Fabrice Harari

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Michael,

as you must know, the mysnip forum is duplicated on the pcsoft us
forum...

As a result from time to time, some people are answering the mysnip
questions on the pcsoft forum and we don't see their answers here.

You are in this case, and the developer answering has used the same api
and is giving you full code examples over there...

Now you know

Best regards
Art Bonds: [WD22] API Question
September 07, 2018 07:46AM
Autor: Art Bonds

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Michael,

as you must know, the mysnip forum is duplicated on the pcsoft us
forum...

As a result from time to time, some people are answering the mysnip
questions on the pcsoft forum and we don't see their answers here.

You are in this case, and the developer answering has used the same api
and is giving you full code examples over there...

Now you know

Best regards


So the 'duplication' is only one way... mysnip >> pcsoft, and not mysnip
<<->> pcsoft?
Fabrice Harari: [WD22] API Question
September 07, 2018 07:48AM
Autor: Fabrice Harari

Link zum Beitrag: [27130.foren.mysnip.de]

yep...

it was bidirectionnal in the beginning, a few years back, but it never
worked correctly (duplicates)...

I suppose that considering the small number of messages ORIGINATING on
their forum, they didn't bother rewriting that part.

Or they just want to suck the substance from here without adding
anything... you choose...

Best regards
Michael Drechsel: [WD22] API Question
September 07, 2018 07:49AM
Autor: Michael Drechsel
Link zum Beitrag: [27130.foren.mysnip.de]

Hi Fabrice,

many thanks. Without your hint I didnĀ“t have get the answer from the
pcs forum ....
GuenterP: [WD22] API Question
September 07, 2018 07:50AM
Autor: GuenterP
Link zum Beitrag: [27130.foren.mysnip.de]

Hi Art,

in principle, we could duplicate the answers from the PCS forum to our
forum as well. PCS has a guy for that, transfer from here to there
doesn't come through the cheap lane. Whenever the transfer of the forum
is done and all the pain is over, we could officially deal with the
issue.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: