nel mentre ho risolto così
codice:
#include <windows.h>
#include <shlobj.h>
#include <tchar.h>
#include <stdio.h>
OPENFILENAME ofn;
char szFileName[500];
int main(int argc, char* argv[])
{
szFileName[0] = '\0';
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = NULL;
ofn.lpstrFile = szFileName;
ofn.nMaxFile = sizeof(szFileName);
ofn.hInstance = NULL;
ofn.lpstrFilter = TEXT("Type Libraries *.tlb,*.olb\0*.tlb;*.olb\0All Files*.*\0*.*\0\0");
ofn.nFilterIndex = 1;
ofn.Flags= OFN_FILEMUSTEXIST;
int bRes;
bRes = GetOpenFileName(&ofn);
MessageBox(0,szFileName,"-",MB_OK);
system("pause");
return 0;
}
stampa tramite la finestra il path del file desiderato,
grazie per l'aiuto!