ShellExecute - problem w zmiennych

0

Witam, korzystam z Visual C++ 2010, po wstawieniu funkcji ShellExecute wyskakuje mi błąd:

private: System::Void Zaloguj_Click(System::Object^  sender, System::EventArgs^  e) 
{
	ShellExecute(0, "open", "http://www.google.pl", 0, 0, 1);
}

ERROR:

error C2664: 'ShellExecuteW' : cannot convert parameter 2 from 'const char [5]' to 'LPCWSTR'

Przy zmienie kodowania znaków w projekcie z "Use Unicode Character Set" na "Use Multi-Byte Character Set" wyskakuje taki błąd:

error LNK2028: unresolved token (0A00001E) "extern "C" struct HINSTANCE__ * __stdcall ShellExecuteA(struct HWND__ *,char const *,char const *,char const *,char const *,int)" (?ShellExecuteA@@$$J224YGPAUHINSTANCE__@@PAUHWND__@@PBD111H@Z) referenced in function "private: void __clrcall Launcher::Form1::Zaloguj_Click(class System::Object ^,class System::EventArgs ^)" (?Zaloguj_Click@Form1@Launcher@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)

Proszę o pomoc.

0
private: System::Void Zaloguj_Click(System::Object^  sender, System::EventArgs^  e) 
{
        ShellExecute(0, L"open", L"http://www.google.pl", 0, 0, 1);
}
0
_13th_Dragon napisał(a)
private: System::Void Zaloguj_Click(System::Object^  sender, System::EventArgs^  e) 
{
        ShellExecute(0, L"open", L"http://www.google.pl", 0, 0, 1);
}

Error:

error LNK2028: unresolved token (0A00001E) "extern "C" struct HINSTANCE__ * __stdcall ShellExecuteW(struct HWND__ *,wchar_t const *,wchar_t const *,wchar_t const *,wchar_t const *,int)" (?ShellExecuteW@@$$J224YGPAUHINSTANCE__@@PAUHWND__@@PB_W111H@Z) referenced in function "private: void __clrcall Launcher::Form1::Zaloguj_Click(class System::Object ^,class System::EventArgs ^)" (?Zaloguj_Click@Form1@Launcher@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
0

Use Unicode Character Set

0

Cały czas jest na innych kodowaniach tez nie działa.

user image

0

Pomoże ktoś?

0

Trzeba pogrzebać w opcjach linkera, to linker nie dołącza odpowiedniej biblioteki.

1 użytkowników online, w tym zalogowanych: 0, gości: 1