D
D
DDD2021-12-24 12:12:54
C++ / C#
DDD, 2021-12-24 12:12:54

Why can't the ShellExecute() function open a folder?

I am writing a visual application, I encountered such a problem, the ShellExecute () function opens local folders, but remote (server) does not want to, I can’t understand why

ShellExecute(NULL, NULL, L"//10.10.2.1/17_Проекты/Библиотека", NULL, NULL, SW_SHOWNORMAL);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DDD, 2022-01-18
@Kiberchief

I found what the problem is for such tasks, the QFileDialog class is best suited

QString fileName;
    if (fileName == nullptr){
        fileName = QFileDialog::getOpenFileName(
                this,
                "Open File",
                "//10.10.2.1/17_Проекты/Библиотека",
                "file (*.vsd *.vsdx)");}
    else {
        QErrorMessage *Message = new QErrorMessage();
        Message->showMessage("Error");}

P
Pavel Dunaev, 2021-12-30
@Pasha13666

Try like this:

ShellExecute(NULL, NULL, L"\\\\10.10.2.1\\17_Проекты\\Библиотека", NULL, NULL, SW_SHOWNORMAL);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question