IPXV_SearchCallback - OnStartPtr / OnStopPtr  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by zarkogajic »

Hi Support,

I've figured out how to "ignore" / "skip" some documents when doing a folder search (so they don't appear in SearchView's pane result list). I do it inside the OnNewEntry method.

What would the OnStartPtr / OnStopPtr methods be used for?

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

The OnStartPtr is being launched when the search starts processing a new entity (document, page etc):
https://sdkhelp.pdf-xchange.com/vi ... OnStartPtr
The OnEndPtr is being launched when the search is finished for the current entity.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by zarkogajic »

Hi Alex,

Does that mean that for each "entity" first the OnStartPtr is called, then a series of OnNewEntry for that entity, and finally OnStopPtr ?

Is there a way to skip/stop OnNewEntry being called for a specific IPXV_SearchPtr in OnStartPtr by returning some hresult?

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Yeah, that's how it works Start/NewEntry/Stop.
But, from what I see, there is only a way to break the operation execution, not just ignore some Entry. I will ask whether this can be updated.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by zarkogajic »

Hi Alex,

Thanks.

When searching in folder it would be ideal to get notified even before a subfolder is about to be processed or even better per file - so I could say "skip".


Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

What I see from our code, we can update the OnStartPtr so that the operation will check it's returning value and break the currently searched item and continue to the next one.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by zarkogajic »

Great, thanks.

Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by zarkogajic »

Hi Support,

Has this maybe been done:
What I see from our code, we can update the OnStartPtr so that the operation will check it's returning value and break the currently searched item and continue to the next one.
-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2351
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by Vasyl-Tracker Dev Team »

Hi zarko,

I can confirm that there is no way to skip/ignore some docs when search-operation searches in folder. But if you use the search-operation directly - you can easily enumerate folder in your own code, skip any docs by your own criteria, and pass to search-operation only necessary docs, one by one. Also one possible benefit with that way - you may make multithreaded search that can process different docs in different threads - it may dramatically increase performance of the search-in-folder feature...

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by zarkogajic »

Hi Vasyl,

Ok, thanks.

Just to confirm: "your" search in folder is already multithreaded, is it not?


User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2351
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by Vasyl-Tracker Dev Team »

Hi zarko.

You can run the search-operation in any thread you want, not just in main thread. But the operation is single-threaded - i.e it processes pages/documents in single thread only, one by one, not in parallel sub-threads. In the future we planning to make that operation multithreaded, but not at the moment.

Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_SearchCallback - OnStartPtr / OnStopPtr  SOLVED

Post by zarkogajic »

Hi Vasyl,

ok, thanks.

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

IPXV_SearchCallback - OnStartPtr / OnStopPtr

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply