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.

Empfohlene Antworten

Veröffentlicht

Hallo,

ich will mit einer DLL eine Batch aufrufen


ShellExecute(
handle,
"open",
"test.bat",
NULL,
NULL,
SW_SHOWNORMAL
);
[/PHP]

habe #include <windows.h> verwendet und bekomme die Fehlermeldung:

D:\TEMP\test\test.cpp(24) : error C2065: 'ShellExecute' : nichtdeklarierter Bezeichner

Vermutlich benötige ich noch einen anderen Header.

Aber welchen???

Vielen Dank!

Gruß Walter

Erst einmal vielen Dank für die Hilfe,

eine DLL ohne MFC zu erstellen ist für mich wieder mal was Neues, ....

Gruß Walter

Original geschrieben von Klotzkopp

Nein, die Shell-API-Funktion sind von den MFC unabhängig.

Ok sorry für die falsche info ;(

Aber warum geht es dann nicht ??


#include <iostream.h>
#include <shellapi.h>
int main()
{
ShellExecute(NULL, "open", "test.bat", NULL, NULL, SW_SHOWNORMAL);
return 0;
}
[/PHP]

Fehler :

[b]c:\programme\microsoft visual studio\vc98\include\shellapi.h(53) : error C2065: 'HDROP' : nichtdeklarierter Bezeichner[/b]

Original geschrieben von Klotzkopp

shellapi.h braucht windows.h

also so :


#include <iostream.h>
#include <shellapi.h>
#include <windows.h>
int main()
{
ShellExecute(NULL, "open", "test.bat", NULL, NULL, SW_SHOWNORMAL);
return 0;
}
[/PHP]

den gleichen Fehler :confused:

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.