Thread View: fj.lang.visualbasic
2 messages
2 total messages
Started by ToyotaMacs Ogawa
Mon, 06 Apr 1998 00:00
Windowsがインストールされている場所を調べる方法
Author: ToyotaMacs Ogawa
Date: Mon, 06 Apr 1998 00:00
Date: Mon, 06 Apr 1998 00:00
19 lines
1248 bytes
1248 bytes
こんにちは。小川と申します。 VB5.0でWindows95やWindowsNTが、インストールされている ドライブやディレクトリを、調べる方法について教えてください。 API関数を探したところ「GetWindowsDirectory」を使うのかな と思い、次のように記述してみたところ”lpBuffer”には何も返って きませんでした。 Dim lpBuffer As String Dim nSize As Long Dim rtn As Integer rtn = GetWindowsDirectory(lpBuffer, nSize) 使用例がなくてどう使えばいいのかよく分りません。 わかる方よろしくお願いします。 E-mail k-ogawa@syseng.toyotamacs.co.jp
Re: Windows がインストールされている場所を調べる方法
Author: Sato Masahiro
Date: Mon, 06 Apr 1998 00:00
Date: Mon, 06 Apr 1998 00:00
20 lines
1252 bytes
1252 bytes
In article <6ga7je$4fq$1@nn-os001.ocn.ad.jp>, ToyotaMacs Ogawa wrote: > API関数を探したところ「GetWindowsDirectory」を使うのかな >と思い、次のように記述してみたところ”lpBuffer”には何も返って >きませんでした。 以下のようにしてみてください。 Dim lpBuffer As String * 100 'バッファ Dim nSize As Long 'バッファのサイズ Dim rtn As Long '返された文字列の長さ nSize = 100 rtn = GetWindowsDirectory(lpBuffer, nSize) ちなみに、Visual Basic の Environ 関数を使用しても、同様の ことができると思います。 -- Computer Institute of Japan, Ltd. 佐藤正宏 masahiro@cij.co.jp
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