[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

Anyone know what VB2theMax was and in what publication it appeared?

(Mike Mitchell)

3/17/2011 6:09:00 PM

I thought I would have it on my VBPJ archive CDs, but that doesn't
appear to be the case.

For example, Dino Esposito wrote an article on June 5, 1999,
"Capturing the Output of a MS-DOS Program", which explains a very
elegant way of redirecting StdOut. There were two files to go with the
article: cshell.cls and cshell.bas, but I can't find either anywhere
on the internet.

MM
13 Answers

Peter T

2/9/2010 12:38:00 PM

0

So what's wrong with alt-r, r

Regards,
Peter T

"Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message
news:upET0NYqKHA.3676@TK2MSFTNGP04.phx.gbl...
>I don't want to have to do all that bloomin' clicking! I'm looking for a
>single click solution! :)
>
> M
>
>
> "Peter T" <peter_t@discussions> wrote in message
> news:e$TuQHYqKHA.1796@TK2MSFTNGP02.phx.gbl...
>> F5 will run the code so the only way to stop, or rather 'break' is with
>> ctrl-Break or Esc. If you then press Enter you will be in debug mode as
>> if you had started with F8.
>>
>> In debug mode to stop or reset, apart from clicking the button you could
>> do -
>>
>> Alt-r, r
>>
>> (might be different in non-English systems)
>>
>> Regards,
>> Peter T
>>
>>
>> "Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message
>> news:8EBECF49-A48C-46EA-996F-7CD1F877C6E0@microsoft.com...
>>> Hello, I use F5 and F8 to run and debug my code, is there a key that
>>> will stop the debugger?
>>>
>>> I always feel like 'Esc' should do it, but it doesn't
>>>
>>> M
>>
>>
>


Karl E. Peterson

3/17/2011 6:22:00 PM

0

MM explained :
> I thought I would have it on my VBPJ archive CDs, but that doesn't
> appear to be the case.
>
> For example, Dino Esposito wrote an article on June 5, 1999,
> "Capturing the Output of a MS-DOS Program", which explains a very
> elegant way of redirecting StdOut. There were two files to go with the
> article: cshell.cls and cshell.bas, but I can't find either anywhere
> on the internet.

Take a look at this:

VB Helper: HowTo: Execute a console program and capture its output
http://www.vb-helper.com/howto_capture_console_s...

--
..NET: It's About Trust!
http://vfre...


(Mike Mitchell)

3/17/2011 8:22:00 PM

0

On Thu, 17 Mar 2011 11:22:12 -0700, Karl E. Peterson <karl@exmvps.org>
wrote:

>MM explained :
>> I thought I would have it on my VBPJ archive CDs, but that doesn't
>> appear to be the case.
>>
>> For example, Dino Esposito wrote an article on June 5, 1999,
>> "Capturing the Output of a MS-DOS Program", which explains a very
>> elegant way of redirecting StdOut. There were two files to go with the
>> article: cshell.cls and cshell.bas, but I can't find either anywhere
>> on the internet.
>
>Take a look at this:
>
>VB Helper: HowTo: Execute a console program and capture its output
>http://www.vb-helper.com/howto_capture_console_s...

It's not just the capturing of the output that's important, it's
getting hold of whatever return code (ERRORLEVEL) par2.exe sends back
on completion, e.g.

0 = Success
1 = RepairPossible (data files damaged, but sufficient recovery data)
2 = RepairNotPossible (data files damaged, but insufficient recovery
data)

etc, etc (further 6 codes)

Anyway, it appears to work now with
lRet = ExecCmd("C:\WINNT\system32\cmd.exe" & " /c " & "c:\utils\par2 v
" & SourceFile & " > c:\temp\temp.txt")

I'll try and see what went wrong when I tried Environ("comspec") --
maybe too many/not enough quotes.

MM

Karl E. Peterson

3/17/2011 8:57:00 PM

0

MM formulated the question :
> On Thu, 17 Mar 2011 11:22:12 -0700, Karl E. Peterson <karl@exmvps.org>
> wrote:
>
>> MM explained :
>>> I thought I would have it on my VBPJ archive CDs, but that doesn't
>>> appear to be the case.
>>>
>>> For example, Dino Esposito wrote an article on June 5, 1999,
>>> "Capturing the Output of a MS-DOS Program", which explains a very
>>> elegant way of redirecting StdOut. There were two files to go with the
>>> article: cshell.cls and cshell.bas, but I can't find either anywhere
>>> on the internet.
>>
>> Take a look at this:
>>
>> VB Helper: HowTo: Execute a console program and capture its output
>> http://www.vb-helper.com/howto_capture_console_s...
>
> It's not just the capturing of the output that's important, it's
> getting hold of whatever return code (ERRORLEVEL) par2.exe sends back
> on completion, e.g.
>
> 0 = Success
> 1 = RepairPossible (data files damaged, but sufficient recovery data)
> 2 = RepairNotPossible (data files damaged, but insufficient recovery
> data)
>
> etc, etc (further 6 codes)

That's easy. Did you see my other posts?

> Anyway, it appears to work now with
> lRet = ExecCmd("C:\WINNT\system32\cmd.exe" & " /c " & "c:\utils\par2 v
> " & SourceFile & " > c:\temp\temp.txt")
>
> I'll try and see what went wrong when I tried Environ("comspec") --
> maybe too many/not enough quotes.

You might've forgotten the space before the "/c"?

I dunno. Nothing should go wrong. Don't hardcode the path.

--
..NET: It's About Trust!
http://vfre...


(Mike Mitchell)

3/17/2011 9:06:00 PM

0

On Thu, 17 Mar 2011 13:56:54 -0700, Karl E. Peterson <karl@exmvps.org>
wrote:

>MM formulated the question :
>> On Thu, 17 Mar 2011 11:22:12 -0700, Karl E. Peterson <karl@exmvps.org>
>> wrote:
>>
>>> MM explained :
>>>> I thought I would have it on my VBPJ archive CDs, but that doesn't
>>>> appear to be the case.
>>>>
>>>> For example, Dino Esposito wrote an article on June 5, 1999,
>>>> "Capturing the Output of a MS-DOS Program", which explains a very
>>>> elegant way of redirecting StdOut. There were two files to go with the
>>>> article: cshell.cls and cshell.bas, but I can't find either anywhere
>>>> on the internet.
>>>
>>> Take a look at this:
>>>
>>> VB Helper: HowTo: Execute a console program and capture its output
>>> http://www.vb-helper.com/howto_capture_console_s...
>>
>> It's not just the capturing of the output that's important, it's
>> getting hold of whatever return code (ERRORLEVEL) par2.exe sends back
>> on completion, e.g.
>>
>> 0 = Success
>> 1 = RepairPossible (data files damaged, but sufficient recovery data)
>> 2 = RepairNotPossible (data files damaged, but insufficient recovery
>> data)
>>
>> etc, etc (further 6 codes)
>
>That's easy. Did you see my other posts?
>
>> Anyway, it appears to work now with
>> lRet = ExecCmd("C:\WINNT\system32\cmd.exe" & " /c " & "c:\utils\par2 v
>> " & SourceFile & " > c:\temp\temp.txt")
>>
>> I'll try and see what went wrong when I tried Environ("comspec") --
>> maybe too many/not enough quotes.
>
>You might've forgotten the space before the "/c"?

I was using /k as per the advice given in
http://www.vbmonster.com/Uwe/Forum.aspx/vb/14063/VB6...

(Scroll down to bottom of page.)

>I dunno. Nothing should go wrong. Don't hardcode the path.

No, I don't want to do that!

MM

Fake Name

3/17/2011 10:42:00 PM

0

You can find the code here--it's near the bottom:

http://web.archive.org/web/20010405000337/www.vb2themax.com/ArticleBank.asp?PageID=A...



"MM" wrote in message news:6kt4o6lbjtrddgnmfep2m6rl95p1gclu5q@4ax.com...

On Thu, 17 Mar 2011 13:56:54 -0700, Karl E. Peterson <karl@exmvps.org>
wrote:

>MM formulated the question :
>> On Thu, 17 Mar 2011 11:22:12 -0700, Karl E. Peterson <karl@exmvps.org>
>> wrote:
>>
>>> MM explained :
>>>> I thought I would have it on my VBPJ archive CDs, but that doesn't
>>>> appear to be the case.
>>>>
>>>> For example, Dino Esposito wrote an article on June 5, 1999,
>>>> "Capturing the Output of a MS-DOS Program", which explains a very
>>>> elegant way of redirecting StdOut. There were two files to go with the
>>>> article: cshell.cls and cshell.bas, but I can't find either anywhere
>>>> on the internet.
>>>
>>> Take a look at this:
>>>
>>> VB Helper: HowTo: Execute a console program and capture its output
>>> http://www.vb-helper.com/howto_capture_console_s...
>>
>> It's not just the capturing of the output that's important, it's
>> getting hold of whatever return code (ERRORLEVEL) par2.exe sends back
>> on completion, e.g.
>>
>> 0 = Success
>> 1 = RepairPossible (data files damaged, but sufficient recovery data)
>> 2 = RepairNotPossible (data files damaged, but insufficient recovery
>> data)
>>
>> etc, etc (further 6 codes)
>
>That's easy. Did you see my other posts?
>
>> Anyway, it appears to work now with
>> lRet = ExecCmd("C:\WINNT\system32\cmd.exe" & " /c " & "c:\utils\par2 v
>> " & SourceFile & " > c:\temp\temp.txt")
>>
>> I'll try and see what went wrong when I tried Environ("comspec") --
>> maybe too many/not enough quotes.
>
>You might've forgotten the space before the "/c"?

I was using /k as per the advice given in
http://www.vbmonster.com/Uwe/Forum.aspx/vb/14063/VB6...

(Scroll down to bottom of page.)

>I dunno. Nothing should go wrong. Don't hardcode the path.

No, I don't want to do that!

MM

(Mike Mitchell)

3/18/2011 6:38:00 AM

0

On Thu, 17 Mar 2011 17:42:16 -0500, "Fake Name" <no@nothing.com>
wrote:

>You can find the code here--it's near the bottom:
>
>http://web.archive.org/web/20010405000337/www.vb2themax.com/ArticleBank.asp?PageID=A...


Crikey! Thanks! I searched and searched yesterday, and even tried th
wayback machine, only to get an error from it saying "server down".
I've just downloaded the code and am reading it right now.

Much joy!

MM

Fake Name

3/18/2011 12:48:00 PM

0

Yeah, isn't the wayback machine great? Nothing like getting server errors
every time you try to use it. You're going to have to modify the code to get
it to work, though. Here are the modifications:

Add this to the cshell.bas module:

Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type


Add this in the Execute Function in the cshell.cls:

Dim sa As SECURITY_ATTRIBUTES
sa.nLength = Len(sa)
sa.bInheritHandle = 1&
sa.lpSecurityDescriptor = 0&


Change CreateFile to this:

hFile = CreateFile(sTempFile, GENERIC_READ Or GENERIC_WRITE,
_
0, sa, CREATE_ALWAYS, 0, ByVal 0&)


Change CreateProcess to this:

bResult = CreateProcess(szProgram, vbNullString, _
sa, sa, 1&, NORMAL_PRIORITY_CLASS, _
ByVal 0&, vbNullString, si, pi)





"MM" wrote in message news:64v5o6dj30vd3kuventkaerguicrvq5hef@4ax.com...

On Thu, 17 Mar 2011 17:42:16 -0500, "Fake Name" <no@nothing.com>
wrote:

>You can find the code here--it's near the bottom:
>
>http://web.archive.org/web/20010405000337/www.vb2themax.com/ArticleBank.asp?PageID=A...


Crikey! Thanks! I searched and searched yesterday, and even tried th
wayback machine, only to get an error from it saying "server down".
I've just downloaded the code and am reading it right now.

Much joy!

MM

(Mike Mitchell)

3/18/2011 3:07:00 PM

0

On Fri, 18 Mar 2011 10:19:55 -0500, "Mayayana"
<mayayana@invalid.nospam> wrote:

>
>| Crikey! Thanks! I searched and searched yesterday, and even tried th
>| wayback machine
>
> It often works to search for the file names. I entered
>your CLS and BAS file names at Google. I got your posting
>as the first return. The second return was a DevX
>copy of Dino Esposito's article. In many cases a file
>name search works even better: Often the files will
>be archived at Koders.com by name, and Google will
>find them.

I probably would have found the code too, if the wayback machine's
server(s) hadn't been down.

MM

Mayayana

3/18/2011 3:20:00 PM

0


| Crikey! Thanks! I searched and searched yesterday, and even tried th
| wayback machine

It often works to search for the file names. I entered
your CLS and BAS file names at Google. I got your posting
as the first return. The second return was a DevX
copy of Dino Esposito's article. In many cases a file
name search works even better: Often the files will
be archived at Koders.com by name, and Google will
find them.