When calling the function PXC_SetTextLeading with the following declaration and call method, VB6 shows the error dialog of "Bad DLL calling convention". Is there something that I am doing wrong?
Code Here:
Public Declare Function PXC_SetTextLeading Lib "pxclib40.dll" (ByVal content As Long, ByVal Leading As Double, ByVal oldLeading As Double) As Long
hr = PXC_SetTextLeading(hDstPage, TextElement.Leading, 0)
PXC_SetTextLeading replying Bad DLL calling convention - VB6
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 31
- Joined: Tue Oct 26, 2010 2:40 pm
-
- Site Admin
- Posts: 677
- Joined: Thu Jun 28, 2007 8:42 am
Re: PXC_SetTextLeading replying Bad DLL calling convention - VB6
C++ declaration is
so yours should be
Code: Select all
PDFXCLIB_API HRESULT PXC_API PXC_SetTextScaling(_PXCContent* content, double scale, double* oldscale);
Code: Select all
Public Declare Function PXC_SetTextLeading Lib "pxclib40.dll" (ByVal content As Long, ByVal Leading As Double, ByRef oldLeading As Double) As Long
Dim OldLeading As Double
hr = PXC_SetTextLeading(hDstPage, TextElement.Leading, OldLeading)
Victor
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 31
- Joined: Tue Oct 26, 2010 2:40 pm
Re: PXC_SetTextLeading replying Bad DLL calling convention - VB6
Thanks! Replacing the third parameter with ByRef instead of ByVal fixed this issue.
-
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
Re: PXC_SetTextLeading replying Bad DLL calling convention - VB6
Excellent news - thanks for coming back
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com