#include <windows.h>
#include "stdio.h"
#include "time.h"
extern "C" {
#include "unlha32.h"
}

int main()
{
char szCmdLine[1024], szOutput[256];
HWND hParentWnd = NULL;
int retcode;

std::sprintf(szCmdLine, "a -+d1 \"%s\" \"%s\\\" \"%s\"", "c:\\hoge.lzh", "c:\\borland", "learn*");
if ((retcode = Unlha(hParentWnd, szCmdLine, szOutput, sizeof(szOutput))) == 0) {
MessageBox(hParentWnd, "圧縮OK", "テスト", MB_OK);
} else {
if (retcode == 0x8020) {
MessageBox(hParentWnd, "ユーザーによる中断(8020)", "テスト", MB_OK);
}
MessageBox(hParentWnd, "圧縮NG", "テスト", MB_OK);
}
}