Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamsoft Source Anywhere SDK
Message
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01269789
Message ID:
01269792
Views:
8
>Has anyone ever programmed against the Dynamsoft SourceAnywhere (SAWVSDK.dll) for VSS SDK? I cannot seem to access it no matter what! The do give a VB example as follows:
>
>Dim WithEvents SdkObject As DYNAMSAWVSDKLib.SAWVSDK
>
>Set SdkObject = new DYNAMSAWVSDKLib.SAWVSDK
>
>Private Sub GetFilesByProject_Click()
>
>    Dim ResultValue As Long
>    Dim Canceled As Boolean
>    Dim ResultDescription As String
>
>    Dim FilesByProject As New SAWVFilesByProject
>
>    'Read all the files under project "$/ServerProjectName" on server. The read operation is limited to this directory.
>    ResultValue = SdkObject.GetFilesByProject("$/ServerProjectName", FilesByProject, Canceled, ResultDescription)
>
>    If ResultValue = 0 Then
>        Dim Count As Long
>        Count = FilesByProject.GetCount()
>        Dim Index As Long
>        For Index = 0 To Count - 1
>            Dim FileName As String
>            FilesByProject.Get Index, FileName
>        Next
>    Else
>        MsgBox "Calling 'GetFilesByProject' function fails."
>    End If
>
>End Sub
>
>
>Thanks
>
>Glenn

Translated to VFP that should look like this:
LOCAL SdkObject As DYNAMSAWVSDKLib.SAWVSDK 
SdkObject = CREATEOBJECT([DYNAMSAWVSDKLib.SAWVSDK])

LOCAL ResultValue
LOCAL Canceled
LOCAL ResultDescription
ResultDescription = []

FilesByProject = CREATEOBJECT([DYNAMSAWVSDKLib.SAWVFilesByProject]) && I am not sure about library prefix here

*Read all the files under project "$/ServerProjectName" on server. The read operation is limited to this directory.
ResultValue = SdkObject.GetFilesByProject("$/ServerProjectName", FilesByProject, @Canceled, @ResultDescription)

If ResultValue = 0 Then
   LOCAL Count, Index, FileName
   Count = FilesByProject.GetCount()
   For Index = 0 To Count - 1
       FilesByProject.Get(Index, @FileName)
   Next
 Else
    MessageBox("Calling 'GetFilesByProject' function fails.")
 EndIf
Of course I am not sure at all about this. You should test it by yourself to see if that would work.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform