ActiveX BSTR type
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.
ActiveX BSTR type
Hi,
I try to implement the pdfxchange editor in our project. I use Windev as language (http://www.windev.com)
I have some problems with the BSTR type, because windev only knows strings or unicode strings.
How can I call this :
HRESULT OpenDocFromPath([in] BSTR sSrcPath,
[in, defaultvalue(NULL)] ICab* pOpenParams);
I try something:
MyPath is unicode string="d:\test.pdf"
AX_Pdf>>OpenDocFromPath(&MyPath)
but I get the Error "Parameter1 is wrong format". How could I create a BSTR if my language doesn´t have a type for that ?
Perhaps any windev developer has something made before and could share his knowledge ?
regards Michael
I try to implement the pdfxchange editor in our project. I use Windev as language (http://www.windev.com)
I have some problems with the BSTR type, because windev only knows strings or unicode strings.
How can I call this :
HRESULT OpenDocFromPath([in] BSTR sSrcPath,
[in, defaultvalue(NULL)] ICab* pOpenParams);
I try something:
MyPath is unicode string="d:\test.pdf"
AX_Pdf>>OpenDocFromPath(&MyPath)
but I get the Error "Parameter1 is wrong format". How could I create a BSTR if my language doesn´t have a type for that ?
Perhaps any windev developer has something made before and could share his knowledge ?
regards Michael
Re: ActiveX BSTR type
Ok,
after some test with other functions (witch are working without any special convertation to BSTR) I think its perhaps a bug in the opendocfrompath function ?
regards Michael
after some test with other functions (witch are working without any special convertation to BSTR) I think its perhaps a bug in the opendocfrompath function ?
regards Michael
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: ActiveX BSTR type
Hello Michael,
Try passing NULL as a second parameter of the OpenDocFromPath and see whether this helps.
Cheers,
Alex
Try passing NULL as a second parameter of the OpenDocFromPath and see whether this helps.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: ActiveX BSTR type
Hi Alex,
I did it before I posted this.
With NULL as second parameter I get "Wrong Parameter 2".
I try this before:
1. AX_Pdf>>CreateNewBlankDoc2("A3",2,90) //works
2. AX_Pdf>>OpenDocWithDlg("C:\Windows") //works
3. AX_Pdf>>OpenDocFromPath("D:\test.pdf") //Error
1. + 2. have also BSTR input definitions and they work how expected.
What is different in (3) ? I tried also with a variable, same.
regards Michael
I did it before I posted this.
With NULL as second parameter I get "Wrong Parameter 2".
I try this before:
1. AX_Pdf>>CreateNewBlankDoc2("A3",2,90) //works
2. AX_Pdf>>OpenDocWithDlg("C:\Windows") //works
3. AX_Pdf>>OpenDocFromPath("D:\test.pdf") //Error
1. + 2. have also BSTR input definitions and they work how expected.
What is different in (3) ? I tried also with a variable, same.
regards Michael
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: ActiveX BSTR type
Hello Michael,
Maybe you need to escape the slash character in path?
Cheers,
Alex
Maybe you need to escape the slash character in path?
Code: Select all
"D:\\test.pdf"
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: ActiveX BSTR type
Hi,
no change, still error. In (2) the path works without "\\"
no change, still error. In (2) the path works without "\\"
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: ActiveX BSTR type
Hello Michael,
And that document does physically exist on disk by that path and is correctly being opened by the Editor?
Cheers,
Alex
And that document does physically exist on disk by that path and is correctly being opened by the Editor?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: ActiveX BSTR type
Yes.
Is there any debug or logfile mechanism included, perhaps with a hidden key or function ?
regards MIchael
Is there any debug or logfile mechanism included, perhaps with a hidden key or function ?
regards MIchael
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: ActiveX BSTR type
Hello Michael,
The strange thing is that passing the NULL as the second parameter validates the first one and tells that the second is invalid. Let's try creating the OpenDocumentParameters and passing them as the second parameter. For that use this method:
https://sdkhelp.pdf-xchange.com/vi ... nDocParams
Cheers,
Alex
The strange thing is that passing the NULL as the second parameter validates the first one and tells that the second is invalid. Let's try creating the OpenDocumentParameters and passing them as the second parameter. For that use this method:
https://sdkhelp.pdf-xchange.com/vi ... nDocParams
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ