ユーザ用ツール

サイト用ツール


it技術:vb2clr

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
it技術:vb2clr [2026/02/02 09:47] – [テキストファイルの読込み] yajuadminit技術:vb2clr [2026/02/02 09:50] (現在) – [テキストファイルの読込み] yajuadmin
行 274: 行 274:
  
     Set host = Nothing     Set host = Nothing
 +    Set filetype = Nothing 
 +    Set encType = Nothing 
 +    Set reader = Nothing
 End Function End Function
 </code> </code>
行 300: 行 302:
  
     ' File.ReadAllText(path, enc) を呼ぶ(静的メソッド)     ' File.ReadAllText(path, enc) を呼ぶ(静的メソッド)
-    Dim text As Variant+    Dim text As String
     text = host.CLRInvokeStaticMethod(filetype, "ReadAllText", path, enc)     text = host.CLRInvokeStaticMethod(filetype, "ReadAllText", path, enc)
          
-    ReadFile = CStr(text)+    ReadFile = text
  
     Set host = Nothing     Set host = Nothing
 +    Set filetype = Nothing 
 +    Set encType = Nothing 
 +    Set reader = Nothing
 End Function End Function
 </code> </code>
it技術/vb2clr.1769993268.txt.gz · 最終更新: 2026/02/02 09:47 by yajuadmin