FoxPro Programming
VFP9 Hidden Properties and Subclasses...
07/01/2009
02:14:52 AM
2OS1FFT94 Show this entire thread in new window
From:
Richard Norris
To:
All
Attachments:
None
Hi all,

Had a strange one today. A customer of ours placed a support call regarding an error they were recieving relating to the cryptographic functionality the system provides. The error was "Property "HPROVIDERHANDLE" is not found (Error 1734)" which indicates the property HPROVIDERHANDLE for the class did not exist.

After some investigation it appears we subclassed the Foundation Classes _Crypt class to extend its functionality. One of the key properties of this class is HPROVIDERHANDLE but it is a HIDDEN property. Subclasses cannot access or modify HIDDEN properties which explained the error. What doesn't make any sense is why it has only errored this once, as all the other times this code has worked without error. I can only assume that there is some bug in VFP which is preventing an access violation on this property from within this subclass most of the time. Has anyone had any experience with this kind of behaviour before or do you think I'm missing something obvious??

Edit 01/07/2009:

I tried the following without any error and I do not believe it should of worked. Is this a VFP bug?

LOCAL oObj oObj = CREATEOBJECT("MYCLASS") oObj.FirstCall() oObj.SecondCall() DEFINE CLASS MYBASECLASS AS Session HIDDEN cString FUNCTION FirstCall() This.cString = "Second Call" MESSAGEBOX("First Call") ENDFUNC ENDDEFINE DEFINE CLASS MYCLASS AS MYBASECLASS FUNCTION SecondCall() MESSAGEBOX(This.cString) ENDFUNC ENDDEFINE


TIA

Richard