Click here to Skip to main content
15,908,115 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionManaged c++ Newbie Question on linking Unmanged C++ to c# Pin
Tom Thorp28-Jun-07 13:49
Tom Thorp28-Jun-07 13:49 
AnswerRe: Managed c++ Newbie Question on linking Unmanged C++ to c# Pin
Christian Graus28-Jun-07 14:16
protectorChristian Graus28-Jun-07 14:16 
GeneralRe: Managed c++ Newbie Question on linking Unmanged C++ to c# Pin
Tom Thorp28-Jun-07 14:40
Tom Thorp28-Jun-07 14:40 
GeneralRe: Managed c++ Newbie Question on linking Unmanged C++ to c# Pin
Christian Graus28-Jun-07 15:23
protectorChristian Graus28-Jun-07 15:23 
QuestionDataGridView Pin
mikobi28-Jun-07 6:38
mikobi28-Jun-07 6:38 
AnswerRe: DataGridView Pin
Sivakumar R29-Jun-07 5:22
Sivakumar R29-Jun-07 5:22 
GeneralRe: DataGridView Pin
mikobi3-Jul-07 5:04
mikobi3-Jul-07 5:04 
QuestionPostMessage to a remote thread ?! Pin
bend0r!28-Jun-07 6:24
bend0r!28-Jun-07 6:24 
Hi Wink | ;-)

I injected a DLL into another process. So far, it works fine.
Now I'd like to send messages to the DLL ... I'tried PostMessage but it always returns ERROR_INVALID_THREAD_ID

The code looks like this:

<br />
CreateRemoteThread(hProc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, &ThreadId);   <br />
   <br />
while(!PostThreadMessage(ThreadId, WM_MYMSG, NULL, NULL))<br />
{<br />
	  if(GetLastError() == ERROR_INVALID_THREAD_ID)<br />
		    break;<br />
	  else Sleep(500);<br />
}<br />


and the DLL loops until a message is received (so it loops infinitivly atm Wink | ;-) )

<br />
while(1)<br />
{<br />
	  if(GetMessage(&msg, NULL, 0, 0))<br />
		    break;<br />
}<br />


thanks in advance !
AnswerRe: PostMessage to a remote thread ?! Pin
Perspx2-Jul-07 11:27
Perspx2-Jul-07 11:27 
QuestionWindows Search Utility Pin
SD102128-Jun-07 5:57
SD102128-Jun-07 5:57 
AnswerRe: Windows Search Utility Pin
SD102128-Jun-07 5:58
SD102128-Jun-07 5:58 
QuestionNeed Help: ActiveX Control Method is taking a Variant as Parameter (.Net 1.1) Pin
Oliver Sch.28-Jun-07 0:55
Oliver Sch.28-Jun-07 0:55 
QuestionParsing and Invoking functions problem Pin
Arris7427-Jun-07 11:24
Arris7427-Jun-07 11:24 
Questionvery simple question : Pin
Ylno27-Jun-07 11:10
Ylno27-Jun-07 11:10 
AnswerRe: very simple question : Pin
Christian Graus27-Jun-07 11:27
protectorChristian Graus27-Jun-07 11:27 
AnswerRe: very simple question : Pin
Mark Salsbery27-Jun-07 11:41
Mark Salsbery27-Jun-07 11:41 
GeneralRe: very simple question : Pin
Christian Graus27-Jun-07 11:56
protectorChristian Graus27-Jun-07 11:56 
GeneralRe: very simple question : Pin
Mark Salsbery27-Jun-07 12:13
Mark Salsbery27-Jun-07 12:13 
QuestionSTL Pin
tom groezer27-Jun-07 7:48
tom groezer27-Jun-07 7:48 
AnswerRe: STL Pin
Christian Graus27-Jun-07 11:32
protectorChristian Graus27-Jun-07 11:32 
QuestionTextbox Difficult Pin
mikobi27-Jun-07 3:54
mikobi27-Jun-07 3:54 
AnswerRe: Textbox Difficult Pin
Christian Graus27-Jun-07 12:20
protectorChristian Graus27-Jun-07 12:20 
GeneralRe: Textbox Difficult Pin
mikobi27-Jun-07 21:04
mikobi27-Jun-07 21:04 
GeneralRe: Textbox Difficult Pin
mikobi28-Jun-07 22:02
mikobi28-Jun-07 22:02 
GeneralRe: Textbox Difficult Pin
mikobi3-Jul-07 6:42
mikobi3-Jul-07 6:42 

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.