Differenze tra le versioni di "Conoscere con le risorse del API di Glib la directory unica per l'utente corrente sul sistema locale"

Da Gambas-it.org - Wikipedia.
Riga 9: Riga 9:
 
   
 
   
 
  <FONT Color=gray>' ''const gchar * g_get_user_runtime_dir (void)''
 
  <FONT Color=gray>' ''const gchar * g_get_user_runtime_dir (void)''
  ''Returns a directory that is unique to the current user on the local system.''</font>
+
  ' ''Returns a directory that is unique to the current user on the local system.''</font>
 
  Private Extern g_get_user_runtime_dir() As String
 
  Private Extern g_get_user_runtime_dir() As String
 
   
 
   
 
   
 
   
  '''Public''' Public Sub Main()
+
  '''Public''' Sub Main()
 
+
 
 
   Dim s As String
 
   Dim s As String
 
    
 
    

Versione delle 11:33, 29 ott 2015

Per conoscere la directory, che è unica, sul sistema locale relativa all'utente corrente, si può utilizzare la funzione g_get_user_runtime_dir() della libreria Glib.


E' necessario avere installata e richiamare in Gambas la libreria dinamica condivisa: libglib-2.0.so


Mostriamo un semplice esempio pratico:

Library "libglib-2.0"

' const gchar * g_get_user_runtime_dir (void)
' Returns a directory that is unique to the current user on the local system.
Private Extern g_get_user_runtime_dir() As String


Public Sub Main()
 
 Dim s As String
 
  s = g_get_user_runtime_dir()
  
  Print s
  
End



Riferimenti