Hi *all,
ich habe folgendes Problem:
Ich versuche ein Programm zu erstellen, welches unter Windows CE 4.2 laufen soll und lediglich ein CMD-File aufruft.
Null Ahnung von C++, ist aber das einzige, was mir fuer meine Zielplattform zur Verfügung steht (Compiler: eMbedded Visual C++ 4.0).
Source-Code:
#include <windows.h>
#include <stdio.h>
void main(){
SHELLEXECUTEINFO ext_app;
ext_app.cbSize = sizeof(SHELLEXECUTEINFO);
ext_app.fMask = SEE_MASK_NOCLOSEPROCESS;
ext_app.hwnd = NULL;
ext_app.lpVerb = "Open";
ext_app.lpFile = "\\Windows\\TRU_FM.cmd";
ext_app.lpParameters = "";
ext_app.lpDirectory = "";
ext_app.nShow = SW_SHOW;
ShellExecuteEx(&ext_app);
}
Beim Build erhalte ich folgende Fehlermeldungen:
--------------------Configuration: TRU_FM - Win32 (WCE ARMV4) Debug--------------------
Compiling...
TRU_FM.cpp
g:\projekte\tru_fm\tru_fm.cpp(9) : error C2440: '=' : cannot convert from 'char [5]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
g:\projekte\tru_fm\tru_fm.cpp(10) : error C2440: '=' : cannot convert from 'char [20]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
g:\projekte\tru_fm\tru_fm.cpp(11) : error C2440: '=' : cannot convert from 'char [1]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
g:\projekte\tru_fm\tru_fm.cpp(12) : error C2440: '=' : cannot convert from 'char [1]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing clarm.exe.
TRU_FM.exe - 4 error(s), 0 warning(s)
Was mache ich bloss verkehrt (ausser, dass ich ahnungslos mit C++ experimentiere
) ?
Danke.
Euler
ich habe folgendes Problem:
Ich versuche ein Programm zu erstellen, welches unter Windows CE 4.2 laufen soll und lediglich ein CMD-File aufruft.
Null Ahnung von C++, ist aber das einzige, was mir fuer meine Zielplattform zur Verfügung steht (Compiler: eMbedded Visual C++ 4.0).
Source-Code:
#include <windows.h>
#include <stdio.h>
void main(){
SHELLEXECUTEINFO ext_app;
ext_app.cbSize = sizeof(SHELLEXECUTEINFO);
ext_app.fMask = SEE_MASK_NOCLOSEPROCESS;
ext_app.hwnd = NULL;
ext_app.lpVerb = "Open";
ext_app.lpFile = "\\Windows\\TRU_FM.cmd";
ext_app.lpParameters = "";
ext_app.lpDirectory = "";
ext_app.nShow = SW_SHOW;
ShellExecuteEx(&ext_app);
}
Beim Build erhalte ich folgende Fehlermeldungen:
--------------------Configuration: TRU_FM - Win32 (WCE ARMV4) Debug--------------------
Compiling...
TRU_FM.cpp
g:\projekte\tru_fm\tru_fm.cpp(9) : error C2440: '=' : cannot convert from 'char [5]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
g:\projekte\tru_fm\tru_fm.cpp(10) : error C2440: '=' : cannot convert from 'char [20]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
g:\projekte\tru_fm\tru_fm.cpp(11) : error C2440: '=' : cannot convert from 'char [1]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
g:\projekte\tru_fm\tru_fm.cpp(12) : error C2440: '=' : cannot convert from 'char [1]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing clarm.exe.
TRU_FM.exe - 4 error(s), 0 warning(s)
Was mache ich bloss verkehrt (ausser, dass ich ahnungslos mit C++ experimentiere

Danke.
Euler