这个DLL有错??
我用VC写的一个选择目录的DLL,如下
_declspec(dllexport) BOOL selectdir(HWND hWinHandle,LPSTR lpDisplayName,LPCSTR lpTitle,LPSTR DirPath)
{
BROWSEINFO lpbi;
LPCITEMIDLIST idlRoot;
lpbi.hwndOwner=hWinHandle;
lpbi.pidlRoot=NULL;
lpbi.pszDisplayName=lpDisplayName;
lpbi.lpszTitle=lpTitle;
lpbi.ulFlags=BIF_RETURNONLYFSDIRS;
lpbi.lpfn=NULL;
idlRoot=SHBrowseForFolder(&lpbi);
// if (idlRoot=NULL )
// return FALSE;
/* if (SHGetPathFromIDList(idlRoot,DirPath))
{
MessageBox(hWinHandle,DirPath,"34",64);*/
return TRUE;
//}
//else return FALSE;
}
在PB中如下调用:
string ls_dirname,tt='343'
ulong l_handle
l_handle=handle(this)
ls_dirname = space(255)
if selectdir(l_handle,tt,tt,ls_dirname) then
messagebox("dsaf","ok")
end if
运行时能弹出选择目录对话框,可一确定,就出:
Specified argument type differs from required argument type at
runtime in DLL function selectdir
我百思不得其解!WHY?