コメント |
[[旧形式(非推奨)]]
@DIV
Imports System.Text
Module MyModule
REM ********************************************************
REM * DLL 内 関数宣言
REM ********************************************************
Declare Function GetSystemDirectory Lib "kernel32" Alias _
"GetSystemDirectoryA" (ByVal lpBuffer As StringBuilder, ByVal nSize As Integer) As Integer
REM ********************************************************
REM * 実行
REM ********************************************************
Sub Main()
Dim strPath As new StringBuilder( 512 )
Call GetSystemDirectory( strPath, strPath.Capacity )
Call System.Console.WriteLine( strPath )
End Sub
End Module
@END
[[推奨]]
@DIV
Imports System.Text
Imports System.Runtime.InteropServices
Module MyModule
REM ********************************************************
REM * DLL 内 関数インターフェイス定義
REM ********************************************************
<DllImport("Kernel32.dll", CharSet:=CharSet.Auto)> _
Public Function GetSystemDirectory( _
ByVal lpBuffer As StringBuilder, _
ByVal nSize As Integer) As Integer
End Function
REM ********************************************************
REM * 実行
REM ********************************************************
Sub Main()
Dim strPath As new StringBuilder( 512 )
Call GetSystemDirectory( strPath, strPath.Capacity )
Call System.Console.WriteLine( strPath )
End Sub
End Module
@END
|