Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OneDrive
Message
From
27/11/2020 05:15:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
OneDrive
Miscellaneous
Thread ID:
01677291
Message ID:
01677291
Views:
72
Respected Seniors

I have following codes to to connect with onedrive
LOCAL loNet, lcNombreDisco, lcIdOneDrive, lcEmail, lcPassword, lnElementos
 
  #DEFINE MSG_BOTON_OK    0
  #DEFINE MSG_ICONO_ERROR 16
  #DEFINE MSG_KEY_ENTER   CHR(13)
 
  loNet = CreateObject("WScript.Network")
 
  IF Vartype(loNet) == "O" THEN
    lcNombreDisco = "L:"
    IF DriveType(lcNombreDisco) = 4 THEN    && If it is a removable disk or network disk
      TRY
        loNet.RemoveNetworkDrive(lcNombreDisco)
      CATCH
        =MessageBox("I couldn't remove the disk " + lcNombreDisco, MSG_ICONO_ERROR + MSG_BOTON_OK, "There is a problem.")
      ENDTRY
    ENDIF
    lcIdOneDrive = ""
    lcEmail      = ""
    lcPassword   = ""
    lonet.MapNetworkDrive(lcNombreDisco, "https://d.docs.live.net/" + lcIdOneDrive, , lcEmail, lcPassword)
  ELSE
    =MessageBox("It couldn't instantiate the object WScript.Network", MSG_ICONO_ERROR + MSG_BOTON_OK, "There is a problem ...")
  ENDIF
 
  loNet = .NULL.
 
  RELEASE loNet
 
RETURN
The code work, I connect with onedrive.
Now I want to upload file to my onedrive with VFP codes.

How is it possible?

Please
Next
Reply
Map
View

Click here to load this message in the networking platform