wcglorioso
Programmer
"I am creating an event handler for a COM server."
"Here is my class definition in Visual Foxpro 7:"
DEFINE CLASS KeyEVH as Session OLEPUBLIC
IMPLEMENTS IAppEventHandler IN "dataentry.exe"
PROCEDURE IAppEventHandler_EventNotify( ;
evtID As Long, ;
fdt As Long, ;
hwindow As Long, ;
FieldName As String, ;
FieldData As Variant, ;
p1 As Variant, ;
p2 As Variant, ;
evtDisposition As Long @, ;
R1 As Variant @, ;
R2 As Variant @)
ENDPROC
ENDEFINE
"It is based on both a Visual Basic 6 and Visual C++ 6 class definition which worked as expected but which faile.d"
"Here is an equivalent class module definition in Visual Basic 6:"
Option Explicit
Implements IAppEventHandler
Private Sub IAppEventHandler_EventNotify( _
ByVal evtID As Long, _
ByVal fdt As Long, _
ByVal hwnd As Long, _
ByVal FieldName As String, _
ByVal FieldData As Variant, _
ByVal p1 As Variant, _
ByVal p2 As Variant, _
evtDisposition As Long, _
R1 As Variant, _
R2 As Variant)
EndSub
"A memory read access violation is generated when I use the Visual Foxpro version which does not occur in Visual Basic and Visual C++ (compile time error is negative, just this runtime error)"
"I removed all other properties and methods not related to implementing the interface and merely declared the only method defined by the interface (to prevent compilation error) but still the error persist when I open the COM server with the external event handler."
"What do you think was happening?"
"What might I have done wrong?"
"Don't want to learn another programming language just for this."
"Hope you can enlighten me on this."
"If my details are insufficient please let me know."
"Thanks in advance."
"Here is my class definition in Visual Foxpro 7:"
DEFINE CLASS KeyEVH as Session OLEPUBLIC
IMPLEMENTS IAppEventHandler IN "dataentry.exe"
PROCEDURE IAppEventHandler_EventNotify( ;
evtID As Long, ;
fdt As Long, ;
hwindow As Long, ;
FieldName As String, ;
FieldData As Variant, ;
p1 As Variant, ;
p2 As Variant, ;
evtDisposition As Long @, ;
R1 As Variant @, ;
R2 As Variant @)
ENDPROC
ENDEFINE
"It is based on both a Visual Basic 6 and Visual C++ 6 class definition which worked as expected but which faile.d"
"Here is an equivalent class module definition in Visual Basic 6:"
Option Explicit
Implements IAppEventHandler
Private Sub IAppEventHandler_EventNotify( _
ByVal evtID As Long, _
ByVal fdt As Long, _
ByVal hwnd As Long, _
ByVal FieldName As String, _
ByVal FieldData As Variant, _
ByVal p1 As Variant, _
ByVal p2 As Variant, _
evtDisposition As Long, _
R1 As Variant, _
R2 As Variant)
EndSub
"A memory read access violation is generated when I use the Visual Foxpro version which does not occur in Visual Basic and Visual C++ (compile time error is negative, just this runtime error)"
"I removed all other properties and methods not related to implementing the interface and merely declared the only method defined by the interface (to prevent compilation error) but still the error persist when I open the COM server with the external event handler."
"What do you think was happening?"
"What might I have done wrong?"
"Don't want to learn another programming language just for this."
"Hope you can enlighten me on this."
"If my details are insufficient please let me know."
"Thanks in advance."