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 zusammen,

habe schon eure Suchfunktion benutzt, aber irgendwie dazu nix gefunden :confused:

Kann mir jemand einen Tipp geben, wie ich das Verzeichnis worin meine Exe liegt, herausfinden kann?

Bin dankbar für jeden Tipp!

Gruß

Kitty

hehe ich wusste das die frage kommt ;)

im ernst? :confused: woher?? :beagolisc

das klappt leider nicht. Er gibt mir hier das verzeichnis über der Exe an. Brauche aber genau das Verzeichnis wo die Exe liegt.

Ich brauche daher das Verzeichnis, weil die Exe eine Datei immer benötigt, die genau da liegt, wo sie selber ist ...

noch ne Idee? :(

danke + Gruß

Kitty

//Edit hatte mich verschaut, funktioniert doch ...

Da dank ich dir mal wieder ganz herzlich für deine Hilfe!

na wegen deiner Frage zum Speichern der Daten in einer Datei :)

dann probiers mal mit GetModuleFileName

*Edit: Nagut, aber GetModuleFileName ist evtl doch besser weil dir GetCurrentDirectory glaube ich "nur" das Arbeitsverzeichnis liefert. D.h. wenn du eine Verknüpfung zu deiner Exe anlegst und da dann bei Ausführen in einen anderen Pfad angibst dann sollte dir GetCurrentDirectory diesen Pfad liefern.

das klappt dann noch besser. da bringt er mir den kompletten pfad zurück.

danke!!

im ernst? :confused: woher?? :beagolisc

noch ne Idee? :(

Ich hab grad zwar nicht viel Zeit, hab aber trotzdem mal meine Idee entworfen:


#include <windows.h> 

#include <stdio.h>

#include <conio.h>

#include <tchar.h>


#define BUFSIZE MAX_PATH


int _tmain(int argc, TCHAR **argv, TCHAR **envp) 

{ 

   TCHAR Buffer[BUFSIZE];

   DWORD dwRet;



   dwRet = GetCurrentDirectory(BUFSIZE, Buffer);


   if(argv[0][1] == ':' || argv[0][1] == '\\') {

     printf("%s", argv[0]);

   } else {

     printf("%s", Buffer);     

   }


}

Prinzip ist klar? Wenn nicht fragen.

Das Snippet ist noch nicht perfekt. Aus argv[0] muesste man noch den Namen des Executables abschneiden.

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.