Hypercell ein ] Hypercell aus ] Zeige Navigation ] Verstecke Navigation ]
c++.de  
   
Forentreff 2012     
Bücher-Shop mit Amazon (Buchkategorien)C++ : Referenzen zu C++ : C++ Builder : Visual C++ : C# : Java : Spieleprogrammierung : Systemprogrammierung Linux : Software-Entwicklung : .NET : Compilertechnik : Algorithmen & Datenstrukturen : Objektorientierung : Entwurfsmuster : UML : eXtreme Programming : Scrum : Projektmanagement : Software-Testing : Datenbanken : Tom DeMarco : Dilbert : User Friendly
C/C++ Forum :: DOS und Win32-Konsole ::  This application has failed to start because the application configuration is incorrect...     Zeige alle Beiträge auf einer Seite Auf Beitrag antworten
Autor Nachricht
Peach_
Unregistrierter




Beitrag Peach_ Unregistrierter 16:59:25 01.03.2010   Titel:   This application has failed to start because the application configuration is incorrect...            Zitieren

Hallo

Ich bekomme beim starten meiner Applikation (auf einer 2. Maschine wo kein .NET Framework drauf ist) immer den im titel genannten Fehler.

Ich benutze aber in meinem Code keine Teile des .NET Frameworks.
An was kann das ganze liegen?

C/C++ Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Window_Disabler.cpp : Defines the entry point for the console application.
//


#include
"stdafx.h"
#include
<stdlib.h>
#include
<windows.h>
#include
"winuser.h"

int _tmain(int argc, _TCHAR* argv[])
{
    //Variabeln
    char WindowName[8]={'N','o','t','e','p','a','d'};

    HWND  WindowHandle = ::FindWindow(NULL, (LPCWSTR)WindowName);    // Handle des Hauptfensters
    HMENU MenuHandle;                                                // Handle des Menus
    HMENU SubMenuHandle;                                            // Handle des SubMenus
    MENUBARINFO  mbi;                                                // Informationen der Hauptmenubar
    int iMenuID;                                                    // ID des Menuelementes
    LPMENUINFO lpmci = new MENUINFO;                                // Information des Menus
    LPMENUITEMINFO mInfo = new MENUITEMINFO;                        // Information des Menuitems

   

    /*  Console Header */

    printf("                * * * * * * * * * * * * * * * * * * * * * * * * * \n");
    printf("                 * * * * * * * * Window Disabler * * * * * * * * * \n");
    printf("                * * * * * * * * * * * * * * * * * * * * * * * * * \n");
    printf("                 * * * * * © 2010 Roche Diagnostics AG * * * * * * \n");
    printf("                * * * * * * * * * * * * * * * * * * * * * * * * * \n\n\n");
       
   
    /* MAIN ROUTINE */

    //~ Step 1: Get the Windowhandle

    printf(" -> Entering Phase 1...\n");
    if (WindowHandle == NULL)
    {
        //Debug Ouput
        printf(">> WindowHandle not found! Handle is NULL (%d) <<\n", WindowHandle);
        system("PAUSE");    //debug session
        return 0;
    }
   

    //~ Step 2: Get the Menuhandle
    printf("WindowHandle has been found...\n -> Entering Phase 2...\n");
    MenuHandle = GetMenu(WindowHandle);
    if (MenuHandle==NULL)
    {
        //Debug Ouput
        printf(">> Menuhandle not found! Handle is NULL (%d) <<\n", MenuHandle);
        system("PAUSE");    //debug session
        return 0;
    }


    //~ Step 3: Gathering some informations
    printf("MenuHandle has been found...\n -> Entering Phase 3...\n");
    GetMenuBarInfo(WindowHandle, OBJID_MENU, 0,  &mbi);
    mInfo->cbSize = sizeof(MENUITEMINFO);
    printf("Size of MenuInfo -> %d", mInfo->cbSize);

   
    //~ Step 4: Get the SubMenu Handle
    printf("Gathered all the informations, I needed...\n -> Entering Phase 4...\n");
    SubMenuHandle = GetSubMenu(MenuHandle, 2);    // Der Index des MenuPunktes -> Index = Zero-Based
    iMenuID = GetMenuItemID(SubMenuHandle, 79);    // Der Index dex ContextMenuPunktes -> Index = Zero-Based
    if (SubMenuHandle == NULL)
    {
        printf(">> SubmenuHandle not found! Handle is NULL (%d) <<\n", SubMenuHandle);
        system("PAUSE");    //debug session
        return 0;
    }

    //~ Step 5 (FINAL Step): Disable the Menu-Entry
    printf("SubmenuHandle has been found...\n -> Entering final Phase (5)...");
    EnableMenuItem(SubMenuHandle, iMenuID, MF_GRAYED);
   
   
    system("PAUSE");    //debug session
    return 0;

}
C/C++ Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Window_Disabler.cpp : Defines the entry point for the console application.
//


#include
"stdafx.h"
#include
<stdlib.h>
#include
<windows.h>
#include
"winuser.h"

int _tmain(int argc, _TCHAR* argv[])
{
//Variabeln
char WindowName[8]={'N','o','t','e','p','a','d'};

HWND WindowHandle = ::FindWindow(NULL, (LPCWSTR)WindowName); // Handle des Hauptfensters
HMENU MenuHandle; // Handle des Menus
HMENU SubMenuHandle; // Handle des SubMenus
MENUBARINFO mbi; // Informationen der Hauptmenubar
int iMenuID; // ID des Menuelementes
LPMENUINFO lpmci = new MENUINFO; // Information des Menus
LPMENUITEMINFO mInfo = new MENUITEMINFO; // Information des Menuitems



/* Console Header */

printf(" * * * * * * * * * * * * * * * * * * * * * * * * * \n");
printf(" * * * * * * * * Window Disabler * * * * * * * * * \n");
printf(" * * * * * * * * * * * * * * * * * * * * * * * * * \n");
printf(" * * * * * © 2010 Roche Diagnostics AG * * * * * * \n");
printf(" * * * * * * * * * * * * * * * * * * * * * * * * * \n\n\n");


/* MAIN ROUTINE */

//~ Step 1: Get the Windowhandle

printf(" -> Entering Phase 1...\n");
if (WindowHandle == NULL)
{
//Debug Ouput
printf(">> WindowHandle not found! Handle is NULL (%d) <<\n", WindowHandle);
system("PAUSE"); //debug session
return 0;
}


//~ Step 2: Get the Menuhandle
printf("WindowHandle has been found...\n -> Entering Phase 2...\n");
MenuHandle = GetMenu(WindowHandle);
if (MenuHandle==NULL)
{
//Debug Ouput
printf(">> Menuhandle not found! Handle is NULL (%d) <<\n", MenuHandle);
system("PAUSE"); //debug session
return 0;
}


//~ Step 3: Gathering some informations
printf("MenuHandle has been found...\n -> Entering Phase 3...\n");
GetMenuBarInfo(WindowHandle, OBJID_MENU, 0, &mbi);
mInfo->cbSize = sizeof(MENUITEMINFO);
printf("Size of MenuInfo -> %d", mInfo->cbSize);


//~ Step 4: Get the SubMenu Handle
printf("Gathered all the informations, I needed...\n -> Entering Phase 4...\n");
SubMenuHandle = GetSubMenu(MenuHandle, 2); // Der Index des MenuPunktes -> Index = Zero-Based
iMenuID = GetMenuItemID(SubMenuHandle, 79); // Der Index dex ContextMenuPunktes -> Index = Zero-Based
if (SubMenuHandle == NULL)
{
printf(">> SubmenuHandle not found! Handle is NULL (%d) <<\n", SubMenuHandle);
system("PAUSE"); //debug session
return 0;
}

//~ Step 5 (FINAL Step): Disable the Menu-Entry
printf("SubmenuHandle has been found...\n -> Entering final Phase (5)...");
EnableMenuItem(SubMenuHandle, iMenuID, MF_GRAYED);


system("PAUSE"); //debug session
return 0;

}
C/C++ Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Window_Disabler.cpp : Defines the entry point for the console application.
//


#include
"stdafx.h"
#include
<stdlib.h>
#include
<windows.h>
#include
"winuser.h"

int _tmain(int argc, _TCHAR* argv[])
{
    //Variabeln
    char WindowName[8]={'N','o','t','e','p','a','d'};

    HWND  WindowHandle = ::FindWindow(NULL, (LPCWSTR)WindowName);    // Handle des Hauptfensters
    HMENU MenuHandle;                                                // Handle des Menus
    HMENU SubMenuHandle;                                            // Handle des SubMenus
    MENUBARINFO  mbi;                                                // Informationen der Hauptmenubar
    int iMenuID;                                                    // ID des Menuelementes
    LPMENUINFO lpmci = new MENUINFO;                                // Information des Menus
    LPMENUITEMINFO mInfo = new MENUITEMINFO;                        // Information des Menuitems

   

    /*  Console Header */

    printf("                * * * * * * * * * * * * * * * * * * * * * * * * * \n");
    printf("                 * * * * * * * * Window Disabler * * * * * * * * * \n");
    printf("                * * * * * * * * * * * * * * * * * * * * * * * * * \n");
    printf("                 * * * * * © 2010 Roche Diagnostics AG * * * * * * \n");
    printf("                * * * * * * * * * * * * * * * * * * * * * * * * * \n\n\n");
       
   
    /* MAIN ROUTINE */

    //~ Step 1: Get the Windowhandle

    printf(" -> Entering Phase 1...\n");
    if (WindowHandle == NULL)
    {
        //Debug Ouput
        printf(">> WindowHandle not found! Handle is NULL (%d) <<\n", WindowHandle);
        system("PAUSE");    //debug session
        return 0;
    }
   

    //~ Step 2: Get the Menuhandle
    printf("WindowHandle has been found...\n -> Entering Phase 2...\n");
    MenuHandle = GetMenu(WindowHandle);
    if (MenuHandle==NULL)
    {
        //Debug Ouput
        printf(">> Menuhandle not found! Handle is NULL (%d) <<\n", MenuHandle);
        system("PAUSE");    //debug session
        return 0;
    }


    //~ Step 3: Gathering some informations
    printf("MenuHandle has been found...\n -> Entering Phase 3...\n");
    GetMenuBarInfo(WindowHandle, OBJID_MENU, 0,  &mbi);
    mInfo->cbSize = sizeof(MENUITEMINFO);
    printf("Size of MenuInfo -> %d", mInfo->cbSize);

   
    //~ Step 4: Get the SubMenu Handle
    printf("Gathered all the informations, I needed...\n -> Entering Phase 4...\n");
    SubMenuHandle = GetSubMenu(MenuHandle, 2);    // Der Index des MenuPunktes -> Index = Zero-Based
    iMenuID = GetMenuItemID(SubMenuHandle, 79);    // Der Index dex ContextMenuPunktes -> Index = Zero-Based
    if (SubMenuHandle == NULL)
    {
        printf(">> SubmenuHandle not found! Handle is NULL (%d) <<\n", SubMenuHandle);
        system("PAUSE");    //debug session
        return 0;
    }

    //~ Step 5 (FINAL Step): Disable the Menu-Entry
    printf("SubmenuHandle has been found...\n -> Entering final Phase (5)...");
    EnableMenuItem(SubMenuHandle, iMenuID, MF_GRAYED);
   
   
    system("PAUSE");    //debug session
    return 0;

}


Gruss,
Peach_



PS: Komischerweise kann ich das ganze nicht in DevC++ kompilieren. Fehler -> "
[Linker error] undefined reference to `WinMain@16'
"
Peach_
Unregistrierter




Beitrag Peach_ Unregistrierter 17:25:50 01.03.2010   Titel:              Zitieren

Kann geschlossen werden.

Ich hatte ne falsche Main-Methode beim DevC++..
nun klappts. ;)

C/C++ Code:
int main(int argc, char *argv[])
C/C++ Code:
int main(int argc, char *argv[])
C/C++ Code:
int main(int argc, char *argv[])
C/C++ Forum :: DOS und Win32-Konsole ::  This application has failed to start because the application configuration is incorrect...   Auf Beitrag antworten

Zeige alle Beiträge auf einer Seite




Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Sie können Beiträge in dieses Forum schreiben.
Sie können auf Beiträge in diesem Forum antworten.
Sie können Ihre Beiträge in diesem Forum nicht bearbeiten.
Sie können Ihre Beiträge in diesem Forum nicht löschen.
Sie können an Umfragen in diesem Forum nicht mitmachen.

Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme

c++.de ist Teilnehmer des Partnerprogramms von Amazon Europe S.à.r.l. und Partner des Werbeprogramms, das zur Bereitstellung eines Mediums für Websites konzipiert wurde, mittels dessen durch die Platzierung von Werbeanzeigen und Links zu amazon.de Werbekostenerstattung verdient werden kann.

Die Vervielfältigung der auf den Seiten www.c-plusplus.de, www.c-plusplus.info, www.c-sar.de, www.c-plusplus.net und www.baeckmann.de enthaltenen Informationen ohne eine schriftliche Genehmigung des Seitenbetreibers ist untersagt (vgl. §4 Urheberrechtsgesetz). Die Nutzung und Änderung der vorgestellten Strukturen und Verfahren in privaten und kommerziellen Softwareanwendungen ist ausdrücklich erlaubt, soweit keine Rechte Dritter verletzt werden. Der Seitenbetreiber übernimmt keine Gewähr für die Funktion einzelner Beiträge oder Programmfragmente, insbesondere übernimmt er keine Haftung für eventuelle aus dem Gebrauch entstehenden Folgeschäden.