Click here to Skip to main content
15,915,848 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionscript Pin
m_anya2126-Oct-05 20:49
m_anya2126-Oct-05 20:49 
AnswerRe: script Pin
enjoycrack27-Oct-05 7:04
enjoycrack27-Oct-05 7:04 
Question.NET & CR Pin
hung_ngole26-Oct-05 18:15
hung_ngole26-Oct-05 18:15 
QuestionOpenGL Pin
Guerven26-Oct-05 16:10
Guerven26-Oct-05 16:10 
AnswerRe: OpenGL Pin
Christian Graus26-Oct-05 16:14
protectorChristian Graus26-Oct-05 16:14 
GeneralRe: THANKS Pin
Guerven26-Oct-05 16:29
Guerven26-Oct-05 16:29 
QuestionHook selectCert listbox when adding a signature in Word Pin
herve Cadieu26-Oct-05 15:34
herve Cadieu26-Oct-05 15:34 
QuestionSending Commands to cmd.exe Pin
gte999s26-Oct-05 13:53
gte999s26-Oct-05 13:53 
I have been trying for a week now to use VBA to send commands to cmd.exe input buffer. I've been able to send text to its screen buffer using writeconsole and writefile along with the std_output_handle. But whenever i use writefile with the std_input_handle it doesnt write any bytes. Also, i'm having trouble figuring out writeconsoleinput, because of the INPUT_RECORD datatype. Basically, i dont know how to create an INPUT_RECORD datatype, along with a KEY_EVENT data type in VBA.

Any help on how to use these functions would be great. here is what i have for writefile:


Private Const STD_ERROR_HANDLE As Long = -12&
Private Const STD_INPUT_HANDLE As Long = -10&
Private Const STD_OUTPUT_HANDLE As Long = -11&

m_StdInput = GetStdHandle(STD_INPUT_HANDLE)
m_StdOutput = GetStdHandle(STD_OUTPUT_HANDLE)
i = m_StdInput
WriteFile(i, ByVal Text, Len(Text), BytesWritten, ByVal 0&)

This works when i substitute m_StdOutput for 'i', but not for m_StdInput.

finally, this is for a program that askes for a username/password in sequence after being called from cmd.exe. I want to find a way of inputing the username/password. Ive tried redirecting with <, but that only works for the username.

Any suggestions/help would be greatly appreciated!


Nik
QuestionBrowsing remote files Pin
Member 227600326-Oct-05 12:42
Member 227600326-Oct-05 12:42 
AnswerRe: Browsing remote files Pin
enjoycrack26-Oct-05 13:23
enjoycrack26-Oct-05 13:23 
QuestionCountDown between dates Pin
im_hoser26-Oct-05 10:00
im_hoser26-Oct-05 10:00 
AnswerRe: CountDown between dates Pin
KaptinKrunch26-Oct-05 10:31
KaptinKrunch26-Oct-05 10:31 
GeneralRe: CountDown between dates Pin
im_hoser26-Oct-05 10:59
im_hoser26-Oct-05 10:59 
AnswerRe: CountDown between dates Pin
rwestgraham26-Oct-05 13:03
rwestgraham26-Oct-05 13:03 
AnswerRe: CountDown between dates Pin
George B Gilbert27-Oct-05 7:45
George B Gilbert27-Oct-05 7:45 
AnswerRe: CountDown between dates Pin
George B Gilbert27-Oct-05 8:25
George B Gilbert27-Oct-05 8:25 
GeneralRe: CountDown between dates Pin
im_hoser27-Oct-05 14:20
im_hoser27-Oct-05 14:20 
QuestionInstallation on a remote computer. Pin
Jim Wilcox26-Oct-05 8:07
Jim Wilcox26-Oct-05 8:07 
AnswerRe: Installation on a remote computer. Pin
rwestgraham26-Oct-05 14:48
rwestgraham26-Oct-05 14:48 
Questionsql problem Pin
microuser_200026-Oct-05 6:09
microuser_200026-Oct-05 6:09 
AnswerRe: sql problem Pin
Joshua Quick26-Oct-05 8:14
Joshua Quick26-Oct-05 8:14 
GeneralRe: sql problem Pin
microuser_200026-Oct-05 8:25
microuser_200026-Oct-05 8:25 
GeneralRe: sql problem Pin
Joshua Quick26-Oct-05 9:01
Joshua Quick26-Oct-05 9:01 
GeneralRe: sql problem Pin
microuser_200026-Oct-05 11:09
microuser_200026-Oct-05 11:09 
QuestionRemove Duplications Pin
stevelam26-Oct-05 5:27
stevelam26-Oct-05 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.