🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: fj.lang.visualbasic
3 messages
3 total messages Started by 椎名正昭 Mon, 23 Feb 1998 00:00
文字列を結合する方法
#625
Author: 椎名正昭
Date: Mon, 23 Feb 1998 00:00
18 lines
1372 bytes
椎名と申します。いつもお世話になっております。

今、APIから戻ってきた文字列に文字列を新たに結合したいのですが
上手く行きません。
APIから戻ってきた文字列の終端にNull文字が付いている性らしい
ということまでは分かったのですが、Null文字までの文字列を切り出す
方法が分かりません。

具体的には
あるプログラムAからコマンドライン文字列を生成してプログラムBを
Shell()関数を使い起動しようとしています。
プログラムAからBに対し、データファイルを指定するのですが、
プログラムBの仕様上、ロングファイル名が受け付けられません。
そのため、GetShortPathName()というAPIを使いファイル名を加工して
から渡そうとしています。

どなたか上手い方法をご存知でしたらお教えいただけないでしょうか?
Re: $BJ8;zNs$r7k9g$9$kJ}K!(J
#626
Author: Hideaki.Ishikawa
Date: Mon, 23 Feb 1998 00:00
17 lines
1037 bytes
$B$O$8$a$^$7$F!"@P@n$G$9!#(J

> $B:#!"#A#P#I$+$iLa$C$F$-$?J8;zNs$KJ8;zNs$r?7$?$K7k9g$7$?$$$N$G$9$,(J
> $B>e<j$/9T$-$^$;$s!#(J
> $B#A#P#I$+$iLa$C$F$-$?J8;zNs$N=*C<$K#N#u#l#lJ8;z$,IU$$$F$$$k@-$i$7$$(J
> $B$H$$$&$3$H$^$G$OJ,$+$C$?$N$G$9$,!"#N#u#l#lJ8;z$^$G$NJ8;zNs$r@Z$j=P$9(J
> $BJ}K!$,J,$+$j$^$;$s!#(J
INSTR$B4X?t$r;H$($P2DG=$@$H;W$$$^$9!#(J

$B$?$H$($P(JstrBuff$BJQ?t$K(JAPI$B$NLa$jCM$,3JG<$5$l$F$$$?$H$7$F(J..
strShortFileName=Left$(strBuff,instr$(strBuff$,chr$(0))-1)

$B$G!"(JNull$BJ8;z$^$G!J(JNull$BJ8;z$r4^$^$J$$!K$NJ8;zNs$r@Z$j=P$9$3$H$,(J
$B=PMh$^$9!#(J

$B$G$O$G$O!#(J
Re: 文字列を結合する方法
#534
Author: 椎名正昭
Date: Tue, 24 Feb 1998 00:00
16 lines
1198 bytes
さっそくレス、ありがとうございました。
なんとか解決できました。
今度また困ったら質問させてください。

Hideaki.Ishikawa wrote in message <6crmvk$hc7$1@nw012.infoweb.or.jp>...
>はじめまして、石川です。
>INSTR関数を使えば可能だと思います。
>
>たとえばstrBuff変数にAPIの戻り値が格納されていたとして..
>strShortFileName=Left$(strBuff,instr$(strBuff$,chr$(0))-1)
>
>で、Null文字まで(Null文字を含まない)の文字列を切り出すことが
>出来ます。
>
>ではでは。
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads