Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tom Saddul
  Where is Tom Saddul?
 Paranaque
 Philippines
 Tom Saddul
 To: xfood xfood
  Where is xfood xfood?
 agrigento
 Italy
 xfood xfood
 Tags
Subject: RE: OpenNETCF
Thread ID: 373266 Message ID: 373574 # Views: 38 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: VFP and .NET
Date: Saturday, March 23, 2013 2:18:18 PM         
   


> >
> > If this is a VB.NET command, you can't just translate it to VFP since the library "OpenNETCF.Desktop.Communication.RAPI" is supposed to run under .NET environment.
> >
> > Download Rick Sthral's DotNetBridge so you can use that library within your VFP app.
>
> thank you very much
> I solved using DotNetBridge
> it works, but I get this error when compiling why?
> Also place the code maybe need someone ...
>
> Program e:\lavori_vfp\rcmd32\fox_pro\wwutils.prg has the following errors:
> Unknown HASHMD5 - Undefined
> Unknown CREATEPROCESSEX - Undefined
>
>
>
> Grazie mille
> ho risolto utilizzando DotNetBridge
> funziona, pero mi da questo errore durante la compilazione perche?
> Posto anche il codice magari serve a qualcuno...
>
> Program e:\lavori_vfp\rcmd32\fox_pro\wwutils.prg has the following errors:
> Unknown HASHMD5 - Undefined
> Unknown CREATEPROCESSEX - Undefined
>
>
>
> parameters uno,due,tre
> set sysmenu off
> _screen.Caption="Gestione Centro Connessione di Windows"
> if pcount()<3
> s_Guida("T")
> RETURN
> endif
> if upper(UNO)="/?"
> s_Guida("F")
> RETURN
> endif
> if empty(DUE) .OR. empty(TRE)
> s_Guida("F")
> RETURN
> endif
>
>
> CLEAR
> *DO wwutils && Demo only
> *LOCAL loFox as InteropExamples.Examples
> *loFox = CREATEOBJECT("InteropExamples.Examples")
>
>
> do wwDotNetBridge
> LOCAL loBridge as wwDotNetBridge
> loBridge = CreateObject("wwDotNetBridge","V4")
>
> *** Load our custom assembly
> loBridge.LoadAssembly("OpenNETCF.Desktop.Communication.dll")
> IF loBridge.lError
> MESSAGEBOX(loBridge.cErrorMsg)
> ENDIF
>
>
> *oRapi As New OpenNETCF.Desktop.Communication.RAPI
> oRapi = loBridge.CreateInstance("OpenNETCF.Desktop.Communication.RAPI")
> ?"connetto"
> IF oRapi.DevicePresent()
> ?"Terminale Esistente"
> ?"--------------------------------------------------"
> ?"Connessione in Corso..."
> ?"Operazione "+alltrim(upper(uno))
> ?"File Sorgente "+alltrim(upper(due))
> ?"File Destinazione "+alltrim(upper(tre))
> ?"Lanciato Connessione in corso..."
> ?"--------------------------------------------------"
> oRapi.Connect()
> If oRapi.Connected
> ?"Connessione al dispositivo OK ..."
> try
> do case
> case upper(uno)="INVIA"
> ?"Invio file " +alltrim(upper(DUE)) + " al dispositivo..."
> oRapi.CopyFileToDevice(alltrim(DUE),alltrim(TRE))
> case upper(uno)="RICEVI"
> ?"Ricevi file " +alltrim(upper(DUE)) + " dal dispositivo..."
> oRapi.CopyFileFromDevice(alltrim(TRE),alltrim(DUE))
> endcase
> oRapi.Disconnect()
> quit
> return
> CATCH TO oException
> ?"Errore Imprevisto su Trasferimento dati"
> FINALLY
> ?"Chiusura Forzata"
> ?"Premere un Tasto"
> inkey(0)
> quit
> return
> ENDTRY
>
>
>
> EndIf
>
> ELSE
> ?"device non presente o non connesso"
> quit
> return
> ENDIF
>
> RETURN
>
>
>
> Function s_Guida(tipo)
> ?"Visualizzazione righe di guida..."
> ?""
> If tipo = "T" Then
> ?"Guida ai parametri: rcmd32.exe by Gaetano Quattrocchi"
> ?"-----------------------------------------------------------"
> ?""
> ?" rcmd32 Invia c:\file.txt \backup\fwppc\file.txt "
> ?" rcmd32 Ricevi \backup\fwppc\file.txt c:\file.txt "
> ?""
> endif
> if tipo = "F"
> ?"Errore nei parametri: rcmd32.exe by Gaetano Quattrocchi"
> ?"-----------------------------------------------------------"
> ?""
> ?"Parametro Path\File Dispositivo e/o Pc non validi."
> endif
> inkey(0)
> QUIT
> Return

I guess those are not really needed by DotNetBridge to run so you can simply remove those lines that call those functions.

ENTIRE THREAD

OpenNETCF Posted by xfood xfood @ 3/20/2013 3:44:28 PM
RE: OpenNETCF Posted by Tom Saddul @ 3/21/2013 12:55:04 PM
RE: OpenNETCF Posted by xfood xfood @ 3/23/2013 12:16:01 PM
RE: OpenNETCF Posted by Tom Saddul @ 3/23/2013 2:18:18 PM
RE: OpenNETCF Posted by Vladimir Radjenovic @ 3/21/2013 5:18:21 PM
RE: OpenNETCF Posted by xfood xfood @ 3/21/2013 8:41:22 PM
RE: OpenNETCF Posted by Vladimir Radjenovic @ 3/22/2013 10:46:05 AM
RE: OpenNETCF Posted by xfood xfood @ 3/23/2013 12:04:37 PM
RE: OpenNETCF Posted by Vladimir Radjenovic @ 3/26/2013 10:13:55 AM
RE: OpenNETCF Posted by xfood xfood @ 3/27/2013 12:08:26 PM