op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception SOLVED
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hi Support,
I'm trying to copy all bookmarks from one core document to another.
I thought of using op.bookmarks.export / op.bookmarks.import while storing the bookmarks in an IStream.
The SDK Help for op.bookmarks.import states that IStream is an acceptable source. However, IStream is not listed as acceptable export location for op.bookmarks.export.
I have tried using IStream instance for the "ExportTo" parameter but "The parameter is incorrect" exception is being raised.
Can I export bookmarks to an IStream and use it for import?
Any other idea how to copy all bookmarks from one document to another (without writing to the filesystem)?
-žarko
I'm trying to copy all bookmarks from one core document to another.
I thought of using op.bookmarks.export / op.bookmarks.import while storing the bookmarks in an IStream.
The SDK Help for op.bookmarks.import states that IStream is an acceptable source. However, IStream is not listed as acceptable export location for op.bookmarks.export.
I have tried using IStream instance for the "ExportTo" parameter but "The parameter is incorrect" exception is being raised.
Can I export bookmarks to an IStream and use it for import?
Any other idea how to copy all bookmarks from one document to another (without writing to the filesystem)?
-žarko
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hi Support,
I've "solved" my case by using IAFS_Name and deleting the file at the end.
Still, the question remains: can IStream be used (actually a memory stream) ?
-žarko
I've "solved" my case by using IAFS_Name and deleting the file at the end.
Still, the question remains: can IStream be used (actually a memory stream) ?
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hello zarkogajic,
From what I see, the IStream can be used for import, but cannot be used for export. Thus the failure on your side.
Cheers,
Alex
From what I see, the IStream can be used for import, but cannot be used for export. Thus the failure on your side.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
HI Alex,
Thanks. Would it be possible (aka feature request) to allow for IStream (memory stream to be precise) for the ExportTo parameter?
That way, no need for a physical file on the filesystem during export/mport...
-žarko
Thanks. Would it be possible (aka feature request) to allow for IStream (memory stream to be precise) for the ExportTo parameter?
That way, no need for a physical file on the filesystem during export/mport...
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hello zarkogajic,
Implemented. This will be available from the next release.
Cheers,
Alex
Implemented. This will be available from the next release.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hi Alex,
Using IStream for op.bookmarks.export (['Options']['ExportTo']) now (v353) is accepted and works - the memory stream is filled with some data.
However, when I use the same IStream instance for op.bookmarks.import (['Options']['ImportSource']), the Do() method raises an AV (nothing meaningful in terms of FormatHRESULT)
-žarko
Using IStream for op.bookmarks.export (['Options']['ExportTo']) now (v353) is accepted and works - the memory stream is filled with some data.
However, when I use the same IStream instance for op.bookmarks.import (['Options']['ImportSource']), the Do() method raises an AV (nothing meaningful in terms of FormatHRESULT)
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hello zarkogajic,
Probably the problem is in the stream implementation itself?
Cheers,
Alex
Probably the problem is in the stream implementation itself?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hi Alex,
I'm using the IStream implementation from my framework (Delphi's TStreamAdapter) - and it works without issues when, for example, using it to open files from IStream.
Also, saving to IStream works - I see data inside.
Only reading from it results in AV - and without any further exception details - I cannot dig into if the problem is on my side...
p.s.
I've tried with StringStream and MemoryStream (both wrapped into IStream via TStreamAdapter).
-žarko
I'm using the IStream implementation from my framework (Delphi's TStreamAdapter) - and it works without issues when, for example, using it to open files from IStream.
Also, saving to IStream works - I see data inside.
Only reading from it results in AV - and without any further exception details - I cannot dig into if the problem is on my side...
p.s.
I've tried with StringStream and MemoryStream (both wrapped into IStream via TStreamAdapter).
-žarko
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: op.bookmarks.export / op.bookmarks.import via IStream : "the parameter is incorrect" exception
Hi Zarko.
Reviewed the code and found a bug that prevents using IStream/IAFS_File as input for ImportBookmarks-operation.
Will fix it in the next build.
Cheers.
Reviewed the code and found a bug that prevents using IStream/IAFS_File as input for ImportBookmarks-operation.
Will fix it in the next build.
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London