Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing output from ActiveX control event programatica
Message
 
 
To
13/05/1998 15:54:43
Donny Sims
Independent Computer Consultants Inc
Scottsboro, Alabama, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00098174
Message ID:
00099209
Views:
30
The VB code where it shows ByVal means that the parameter is passed by value, and the function called isn't capable of changing the item. You do not use @ for ByValue parameters.

The VB code would use ByRef (I think I don't do VB) if the parameter was to be passed by reference, ie the address of the item so that the function called can change the item.

So you ? SMTPForm.Session1.Response( lcString )

I guess Response() then is only capable of returning .t. or .f. to indicate success or failure. Maybe there is another method or property of the server that holds the result you are expecting. You might be able to examine the server in the locals or watch window and browse it. Make sure you have saved all of the code, classes, forms that are open for edit though because VFP sometimes crashes hard while using the debug windows to peer inside an ActiveX object.

>>? SMTPForm.Session1.Response( @lcString )
>The above only returns .T.
>
>>You might also try not using @ and see if it works.
>Tried dozens of different combo's with and without the @, nada.
>
>I could not find any examples of code for the Response event of this control. This is the only snipet that involved an event with the LPCTSTR parameter, it came from a different control in the same set, hopefully this will give you enough info (and the controls work the same).
>
>From the Control Docs:
>
>DirectoryLine( BOOL fDir, LPCTSTR Name, long Size )
>This event is called ones for each line in a directory structure returned after a call to the GetRemoteDirFile method. The fDir parameter is set to true if the line represents a directory. The Name parameter is the directory/file name and the Size is the size (in bytes) for the file.
>
>If you want to fill information in listboxes you can use code as the following. ListDirs is a listbox holding directory information and ListFiles is a listbox holding file information.
>
>
>Private Sub EsFtp1_DirectoryLine(ByVal fDir As Boolean, ByVal Name As String, ByVal Size As Long)
>    If fDir = True Then
>        ListDirs.AddItem Name '+ " " + Str(Size)
>    Else
>        ListFiles.AddItem Name '+ " " + Str(Size)
>    End If
>End Sub
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform