掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
VB6アプリでファイルの文字列が取得できません。 (ID:138104)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
これでどうかな? '===== Option Explicit Private Declare Function GetCommandLineW Lib "Kernel32" () As Long Private Declare Sub lstrcpyW Lib "Kernel32" (ByRef dest As Any, ByVal src As Any) Private Declare Function lstrlenW Lib "Kernel32" (ByVal lpString As Long) As Long Private Sub Form_Load() Dim S As String S = GetCommandLine() CreateObject("WScript.Shell").Popup "[" & S & "]" End Sub Public Function GetCommandLine() As String GetCommandLine = Command() Dim p As Long p = GetCommandLineW() If p = 0 Then Exit Function End If Dim lngLen As Long lngLen = lstrlenW(p) If lngLen = 0 Then Exit Function End If Dim result() As Byte ReDim result(0 To lngLen * 2 - 1) lstrcpyW result(0), p GetCommandLine = CStr(result) End Function
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.