J'écris une commande externe (sans fenêtre) sous VB6.
Comment on affiche dans la console ?
merci
--
Embryon de site : http://gilles.ronsin.free.fr
Nouvelle astuce : Script de création de raccourcis cible
http://gilles.ronsin.free.fr/#targetlnk
Il est impossible pour un optimiste d'être agréablement surpris.
pour info je suis parti la dessus mais ça marche pas vraiment (ça fait planter VB en mode debug !)
----------------------------------------------------------------------- Public Const STD_INPUT_HANDLE = -10& Public Const STD_OUTPUT_HANDLE = -11&
Public Declare Function stdin Lib "kernel32" Alias "GetStdHandle" _ (Optional ByVal Handletype As Long = STD_INPUT_HANDLE) As Long
Public Declare Function stdout Lib "kernel32" Alias "GetStdHandle" _ (Optional ByVal Handletype As Long = STD_OUTPUT_HANDLE) As Long
Public Declare Function ReadFile Lib "kernel32" ( _ ByVal hFile As Long, _ ByVal lpBuffer As Any, _ ByVal nNumberOfBytesToRead As Long, _ lpNumberOfBytesRead As Long, _ Optional ByVal lpOverlapped As Long = 0& _ ) As Long
Public Declare Function WriteFile Lib "kernel32" ( _ ByVal hFile As Long, _ ByVal lpBuffer As Any, _ ByVal nNumberOfBytesToWrite As Long, _ lpNumberOfBytesWritten As Long, _ Optional ByVal lpOverlapped As Long = 0&) As Long
Sub Main() ConsolePrint "Syntaxe :" ConsolePrint "---------" & vbCrLf End Sub
Private Sub ConsolePrint(szOut As String) WriteFile stdout(), szOut, Len(szOut), vbNull, vbNull End Sub
-- Embryon de site : http://gilles.ronsin.free.fr Nouvelle astuce : Script de création de raccourcis cible http://gilles.ronsin.free.fr/#targetlnk Il est impossible pour un optimiste d'être agréablement surpris.
pour info je suis parti la dessus mais ça marche pas vraiment (ça fait
planter VB en mode debug !)
-----------------------------------------------------------------------
Public Const STD_INPUT_HANDLE = -10&
Public Const STD_OUTPUT_HANDLE = -11&
Public Declare Function stdin Lib "kernel32" Alias "GetStdHandle" _
(Optional ByVal Handletype As Long = STD_INPUT_HANDLE) As Long
Public Declare Function stdout Lib "kernel32" Alias "GetStdHandle" _
(Optional ByVal Handletype As Long = STD_OUTPUT_HANDLE) As Long
Public Declare Function ReadFile Lib "kernel32" ( _
ByVal hFile As Long, _
ByVal lpBuffer As Any, _
ByVal nNumberOfBytesToRead As Long, _
lpNumberOfBytesRead As Long, _
Optional ByVal lpOverlapped As Long = 0& _
) As Long
Public Declare Function WriteFile Lib "kernel32" ( _
ByVal hFile As Long, _
ByVal lpBuffer As Any, _
ByVal nNumberOfBytesToWrite As Long, _
lpNumberOfBytesWritten As Long, _
Optional ByVal lpOverlapped As Long = 0&) As Long
Sub Main()
ConsolePrint "Syntaxe :"
ConsolePrint "---------" & vbCrLf
End Sub
Private Sub ConsolePrint(szOut As String)
WriteFile stdout(), szOut, Len(szOut), vbNull, vbNull
End Sub
--
Embryon de site : http://gilles.ronsin.free.fr
Nouvelle astuce : Script de création de raccourcis cible
http://gilles.ronsin.free.fr/#targetlnk
Il est impossible pour un optimiste d'être agréablement surpris.
pour info je suis parti la dessus mais ça marche pas vraiment (ça fait planter VB en mode debug !)
----------------------------------------------------------------------- Public Const STD_INPUT_HANDLE = -10& Public Const STD_OUTPUT_HANDLE = -11&
Public Declare Function stdin Lib "kernel32" Alias "GetStdHandle" _ (Optional ByVal Handletype As Long = STD_INPUT_HANDLE) As Long
Public Declare Function stdout Lib "kernel32" Alias "GetStdHandle" _ (Optional ByVal Handletype As Long = STD_OUTPUT_HANDLE) As Long
Public Declare Function ReadFile Lib "kernel32" ( _ ByVal hFile As Long, _ ByVal lpBuffer As Any, _ ByVal nNumberOfBytesToRead As Long, _ lpNumberOfBytesRead As Long, _ Optional ByVal lpOverlapped As Long = 0& _ ) As Long
Public Declare Function WriteFile Lib "kernel32" ( _ ByVal hFile As Long, _ ByVal lpBuffer As Any, _ ByVal nNumberOfBytesToWrite As Long, _ lpNumberOfBytesWritten As Long, _ Optional ByVal lpOverlapped As Long = 0&) As Long
Sub Main() ConsolePrint "Syntaxe :" ConsolePrint "---------" & vbCrLf End Sub
Private Sub ConsolePrint(szOut As String) WriteFile stdout(), szOut, Len(szOut), vbNull, vbNull End Sub
-- Embryon de site : http://gilles.ronsin.free.fr Nouvelle astuce : Script de création de raccourcis cible http://gilles.ronsin.free.fr/#targetlnk Il est impossible pour un optimiste d'être agréablement surpris.
ng
Salut,
Essaye vbAdvance : http://www.vbadvance.com/ C'est un plugin permettant notammant la compilation d'application console (un module est fourni pour lire/ecrire sur le console).
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/
Gilles RONSIN wrote:
salut,
J'écris une commande externe (sans fenêtre) sous VB6. Comment on affiche dans la console ?
merci
Salut,
Essaye vbAdvance : http://www.vbadvance.com/
C'est un plugin permettant notammant la compilation d'application console
(un module est fourni pour lire/ecrire sur le console).
--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
Gilles RONSIN wrote:
salut,
J'écris une commande externe (sans fenêtre) sous VB6.
Comment on affiche dans la console ?
Essaye vbAdvance : http://www.vbadvance.com/ C'est un plugin permettant notammant la compilation d'application console (un module est fourni pour lire/ecrire sur le console).
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/
Gilles RONSIN wrote:
salut,
J'écris une commande externe (sans fenêtre) sous VB6. Comment on affiche dans la console ?
merci
Gilles RONSIN
"ng" , le lun. 06 déc. 2004 22:45:21, écrivait ceci:
Salut Nicolas
http://www.vbadvance.com/
Je vais tester. Merci
-- Embryon de site : http://gilles.ronsin.free.fr Nouvelle astuce : Script de création de raccourcis cible http://gilles.ronsin.free.fr/#targetlnk Il est impossible pour un optimiste d'être agréablement surpris.
"ng" <ng@ngsoft-fr.com>, le lun. 06 déc. 2004 22:45:21, écrivait
ceci:
Salut Nicolas
http://www.vbadvance.com/
Je vais tester.
Merci
--
Embryon de site : http://gilles.ronsin.free.fr
Nouvelle astuce : Script de création de raccourcis cible
http://gilles.ronsin.free.fr/#targetlnk
Il est impossible pour un optimiste d'être agréablement surpris.
"ng" , le lun. 06 déc. 2004 22:45:21, écrivait ceci:
Salut Nicolas
http://www.vbadvance.com/
Je vais tester. Merci
-- Embryon de site : http://gilles.ronsin.free.fr Nouvelle astuce : Script de création de raccourcis cible http://gilles.ronsin.free.fr/#targetlnk Il est impossible pour un optimiste d'être agréablement surpris.