O HAI THIS BLOG PURPZIEZ 2 B UZED AZ MAH PLESIOUS MEM. :)

2006/04/17

Office.Nomikai++; VB + redirect == bad;

新入社員歓迎会と言う事で金曜日の夜は飲み会をして頂きました.
でも,最初の乾杯のビール一杯と少しで回って仕舞い,
その後は,コーラでお付き合い.
飲み屋,飲み屋,カラオケ,飲み屋と巡って朝五時に帰宅.
で,気付いたら日曜日の昼でした.
色々ムニャムニャ語って仕舞って先輩達に,
「キミは新入社員っぽくないねー」と言われた. :P
[At last Friday, I've attended the welcome party.
But, I couldn't get second beer.
So, I've taken with many cola. :P
IZakaYa, IZakaYa, Karaoke, IZakaYa, then,
I've returned my home at about 5:00 AM.
got some Z's, awoke at noon of Sunday.
Some seniors said to me like that
"You look like not a fresh man, though." :P]

で,嫌々やっていたVBのコーディングですが,
一応それっぽくなったので早々に終了する.
ハマッたのはVB内部から外部の実行ファイルをコマンドラインに含めて実行,
その標準出力をリダイレクトして任意のファイル名を付ける部分.
調べた結果,VB内部からリダイレクトを直接使う事は仕様上不可能で,
一時的にバッチファイルをOpen()やらPrintやらで記述して,
その後にこいつをShell()かCreateProcess()で叩くと言う意味不明な仕様... :(
[BTW, about my stupid VB coding.
It looks like kinda working.
The PITA was to execute external executable binary inside VB.
According to some VB gurus stuffs,
VB cann't handle to execute external executable binary
with any redirections, directly.
So, it should do like that,
1. create temporary batch file with Open() or Print.
2. execute it by Shell() or CreateProcess().
Umm, so awkward... :(]

0 件のコメント: