Illegal Parameter Name

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

nlopes
User
Posts: 33
Joined: Tue Aug 24, 2010 3:44 am

Illegal Parameter Name

Post by nlopes »

In trying to detect events, for the first time since just recently purchasing the PDF Viewer SDK, I noticed that I cannot use one of the parameters in Visual Basic 6. Your declaration of the Event

Code: Select all

Private Sub CoPDFXCview1_OnEvent(ByVal Type As Long, ByVal Name As String, ByVal DataIn As Variant, DataOut As Variant, ByVal Flags As Long)
The "ByVal Type As Long" variable name is not allowed. If I try to do a Select Case on it or a debug.print, the line is instantly marked red as an error due to the variable called Type.

Not sure if you are aware of this or not, but I'm trying to detect if pages have been deleted or rotated (detect that event) so I can allow the user to save the document.

[UPDATE]: Now when I suddenly re-opened my project, the entire line for the event is in red

Code: Select all

Private Sub CoPDFXCview1_OnEvent(ByVal lType As Long, ByVal Name As String, ByVal DataIn As Variant, DataOut As Variant, ByVal Flags As Long)
I changed Type to lType and that seems to work. :)


Kind Regards,

Nelson
gpxi
User
Posts: 37
Joined: Mon Aug 23, 2010 6:41 am

Re: Illegal Parameter Name

Post by gpxi »

I think Type as a reserved word in VB. What you did was right. Just change it to nType or iType or anything else.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Illegal Parameter Name

Post by John - Tracker Supp »

Thanks gpxi ;-)
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