Click here to Skip to main content
15,886,137 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Live Redirection Pin
rupert_durans16-Oct-06 22:00
rupert_durans16-Oct-06 22:00 
QuestionDll Loading Visual Studio 6.0 VC++ Pin
ccp99916-Oct-06 14:30
ccp99916-Oct-06 14:30 
AnswerRe: Dll Loading Visual Studio 6.0 VC++ Pin
prasad_som16-Oct-06 19:45
prasad_som16-Oct-06 19:45 
Questioncreating a thread Pin
xJorDyx16-Oct-06 10:21
xJorDyx16-Oct-06 10:21 
AnswerRe: creating a thread Pin
Mark Salsbery16-Oct-06 10:36
Mark Salsbery16-Oct-06 10:36 
GeneralRe: creating a thread Pin
xJorDyx18-Oct-06 11:51
xJorDyx18-Oct-06 11:51 
GeneralRe: creating a thread Pin
Mark Salsbery18-Oct-06 12:03
Mark Salsbery18-Oct-06 12:03 
GeneralRe: creating a thread [modified] Pin
xJorDyx19-Oct-06 9:08
xJorDyx19-Oct-06 9:08 
thank you!
i shall try this as soon as i get home!


-- modified at 16:06 Thursday 19th October, 2006
still getting stupid errors
main code: (some part removed)

// Messenger class!
ref class Messenger : public Form
{
public:
static DWORD WINAPI listener(LPVOID lpParam);//line 26
SOCKET s;
bool conected;
HANDLE Handle_Of_listener;
Messenger()
{
InitForm();
if(ConnectToHost(1234,"127.0.0.1") == true)
{
printf("conected!");
conected = true;
HANDLE Handle_Of_Thread_1 = 0;
Handle_Of_listener = CreateThread( NULL, 0, listener, &s, 0, NULL);//line 38

}

}
static String ^myUsrName;


private:
// Win controls, Icon & Menu
RichTextBox ^ MessengerTxtR;
RichTextBox ^ MessengerTxtS;
array<Button^>^ MessengerButtons;
static String^ s_strZero = String::Format("0{0}0", System::Globalization::NumberFormatInfo::CurrentInfo->NumberDecimalSeparator);

System::Drawing::Icon^ m_pCalcIco;

MainMenu^ m_pMessengerMenu;
MenuItem^ m_pFileMenu;
MenuItem^ m_pAboutMenu;
MenuItem^ m_pExitMenu;
public:

DWORD WINAPI listener(LPVOID lpParam)//line 62
{//line 63
SOCKET s = (SOCKET)lpParam;
return 0;
}

error:
.\main.cpp(26) : warning C4441: calling convention of '__stdcall ' ignored; '__clrcall ' used instead
.\main.cpp(63) : warning C4441: calling convention of '__stdcall ' ignored; '__clrcall ' used instead
.\main.cpp(63) : error C2686: cannot overload static and non-static member functions with the same parameter types
.\main.cpp(26): could be 'DWORD Messenger::listener(LPVOID)'
.\main.cpp(62): or 'DWORD Messenger::listener(LPVOID)'
.\main.cpp(38) : error C2664: 'CreateThread' : cannot convert parameter 3 from 'DWORD (__clrcall *)(LPVOID)' to 'LPTHREAD_START_ROUTINE'
None of the functions with this name in scope match the target type

GeneralRe: creating a thread Pin
xJorDyx24-Oct-06 7:13
xJorDyx24-Oct-06 7:13 
QuestionImage Pin
messages16-Oct-06 8:52
messages16-Oct-06 8:52 
AnswerRe: Image Pin
Mark Salsbery16-Oct-06 9:01
Mark Salsbery16-Oct-06 9:01 
GeneralRe: Image Pin
messages16-Oct-06 9:25
messages16-Oct-06 9:25 
GeneralRe: Image Pin
Mark Salsbery16-Oct-06 9:38
Mark Salsbery16-Oct-06 9:38 
AnswerRe: Image Pin
viliam16-Oct-06 9:03
viliam16-Oct-06 9:03 
GeneralRe: Image Pin
messages16-Oct-06 9:26
messages16-Oct-06 9:26 
GeneralRe: Image Pin
Christian Graus16-Oct-06 10:10
protectorChristian Graus16-Oct-06 10:10 
Questionredirect input Pin
viliam16-Oct-06 8:38
viliam16-Oct-06 8:38 
AnswerRe: redirect input Pin
rupert_durans16-Oct-06 22:56
rupert_durans16-Oct-06 22:56 
AnswerRe: redirect input Pin
David Crow17-Oct-06 5:17
David Crow17-Oct-06 5:17 
QuestionC++ Winsock/Network Programming Help Please Pin
Phoenix10116-Oct-06 8:24
Phoenix10116-Oct-06 8:24 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
Mark Salsbery16-Oct-06 8:39
Mark Salsbery16-Oct-06 8:39 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
Zac Howland16-Oct-06 8:40
Zac Howland16-Oct-06 8:40 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
normanS16-Oct-06 9:49
normanS16-Oct-06 9:49 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
ThatsAlok16-Oct-06 18:48
ThatsAlok16-Oct-06 18:48 
GeneralRe: C++ Winsock/Network Programming Help Please Pin
Hamid_RT16-Oct-06 19:31
Hamid_RT16-Oct-06 19:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.