ZIP書庫の解凍
<世界標準の圧縮形式のZIP形式のファイルを解凍>
|
宣 言 |
| (Private) Declare Function UnZip Lib "unzip32" ( ByVal hWnd As Long,ByVal szCmdLine As String,ByVal szOutput As String, ByVal wSize As Long) As Long |
|
引 数 説 明 |
|
hWnd |
Long |
ウィンドウハンドル |
|
szCmdLine |
String |
UnZipに渡すコマンド(LHAと互換性あり) |
|
szOutput |
String |
今回は使用していないがUnZipが結果を返すための変数 |
|
wSize |
Long |
szOutputの大きさ |
|
サ ン プ ル プ ロ グ ラ ム |
プログラムを張りつけ実行しフォームをクリックするとc:\temp\temp.zipというファイルを解凍します。なお実行には「c:\temp\temp.zip」というZip書庫が必要になります。あらかじめ用意しておいてください。
動作確認:Visual Basic 5.0,Windows98
| Private Declare Function UnZip Lib "unzip32" (ByVal hWnd
As Long, ByVal szCmdLine As String, ByVal szOutput As String, ByVal wSize As Long) As Long Private Sub Form_Click() UnZip Me.hWnd, "-xs c:\temp\temp.zip c:\temp\", "", 0 End Sub |