Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ShellExecuteEx + Access Denied

Empfohlene Antworten

Veröffentlicht

Hallo lieber Foren-Gemeinde,

ich habe vor etwas längerer Zeit eine Borland Turbo C++ Applikation geschrieben. Dabei werden verschiedene Setups via ShellExecuteEx ausgeführt. IDE: Borland Developer Studio 2006. Dies stellte bis Gestern kein Problem da. Nachdem ich jedoch an anderer Stelle eine definierte Funktion aufrufe, bekomme ich besagte Fehlermeldung.

Hier der Code zur Funktion:

    

               SHELLEXECUTEINFO ExecInfo;


		ExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);

		ExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;

		ExecInfo.hwnd = GetActiveWindow();

		ExecInfo.lpVerb = "open";

		ExecInfo.lpFile = InstallPath.c_str();

		ExecInfo.lpParameters = NULL;

		ExecInfo.nShow = SW_SHOW;

		ExecInfo.hInstApp = NULL;

		ShellExecuteEx(&ExecInfo);    // Prozess starten


		while(WaitForSingleObject(ExecInfo.hProcess, 100) == WAIT_TIMEOUT)

		{

			Application->ProcessMessages(); // Nachrichtenwarteschlage verarbeiten

		}

Merkwürdig ist, dass wenn ich vor ShellExecuteEx(&ExecInfo); ein ShowMessage() aufrufe, erscheint die Exception nicht und das Setup wird erfolgreich gestartet. Ein reguläres ShellExecute funktioniert einwandfrei.

Ich würde mich über ein paar Tipps freuen.

Gruß,

Sebastian

Hallo,

Fehler gefunden.

ExecInfo.lpDirectory = NULL; fehlt. Ohne es zu spezifizieren verwendet lpDirectory das Arbeitsverzeichniss der Applikation. Dort hatte es keinen Zugriff, folglich die Access-Denied Exception.

Gruß,

Sebastian

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.