Click here to Skip to main content
15,909,897 members
Home / Discussions / C#
   

C#

 
GeneralRe: referencing from C: or D: drive Pin
snorkie31-May-07 8:28
professionalsnorkie31-May-07 8:28 
GeneralRe: referencing from C: or D: drive Pin
Dave Kreskowiak31-May-07 8:41
mveDave Kreskowiak31-May-07 8:41 
GeneralRe: referencing from C: or D: drive Pin
snorkie31-May-07 9:01
professionalsnorkie31-May-07 9:01 
AnswerRe: referencing from C: or D: drive Pin
Not Active31-May-07 5:20
mentorNot Active31-May-07 5:20 
AnswerRe: referencing from C: or D: drive Pin
Dave Kreskowiak31-May-07 5:56
mveDave Kreskowiak31-May-07 5:56 
AnswerRe: referencing from C: or D: drive Pin
Luc Pattyn31-May-07 9:56
sitebuilderLuc Pattyn31-May-07 9:56 
QuestionDrawToolsRedux, but in OpenGl Pin
a_david12331-May-07 2:49
a_david12331-May-07 2:49 
QuestionUsing GetMessage in C# Pin
gapfulgence31-May-07 2:46
gapfulgence31-May-07 2:46 
Hi,

I'm working on inter-process communication between a C++ application and a C# application. I want to transfer string data between them. I'm being blocked by a problem: I don't know how to intercept data (sent from my C++ app) in my C# app. I read I can use GetMessage function, but I dont know how. Here is how I send data from my C++ app to my C# one:

LRESULT copyDataResult;

//CWnd *pOtherWnd = CWnd::FindWindow(NULL, m_otherAppHeader.GetBuffer(m_otherAppHeader.GetLength()));
CWnd *pOtherWnd = CWnd::FindWindow(NULL, "EC");
m_otherAppHeader.ReleaseBuffer();
if (pOtherWnd) {
// Say that we fount ExperienceCreator window
AfxMessageBox("ExperienceCreator is opened.");

COPYDATASTRUCT cpd;
cpd.dwData = 0;
CString txt;
c_TxText.GetWindowText(txt);
cpd.cbData = txt.GetLength() + 1 ;
cpd.lpData = (void*)txt.GetBuffer(txt.GetLength() +1);
copyDataResult = pOtherWnd->SendMessage(WM_COPYDATA,
(WPARAM)AfxGetApp()->m_pMainWnd->GetSafeHwnd(),(LPARAM)&cpd);
txt.ReleaseBuffer();
// copyDataResult has value returned by other app

AfxMessageBox("Info has been sent to ExperienceCreator");

} else {
//AfxMessageBox("Unable to find other application.");
AfxMessageBox("Unable to find EC.");
}

Can you please help me for this problem ?

Thanks.

p.f. Goudjo-Ako

Bringing our energy together !

AnswerRe: Using GetMessage in C# Pin
kubben31-May-07 3:00
kubben31-May-07 3:00 
GeneralRe: Using GetMessage in C# Pin
gapfulgence31-May-07 4:19
gapfulgence31-May-07 4:19 
GeneralRe: Using GetMessage in C# Pin
kubben31-May-07 4:22
kubben31-May-07 4:22 
GeneralRe: Using GetMessage in C# Pin
gapfulgence31-May-07 6:11
gapfulgence31-May-07 6:11 
GeneralRe: Using GetMessage in C# Pin
baranils4-Jan-11 9:00
baranils4-Jan-11 9:00 
GeneralRe: Using GetMessage in C# Pin
kubben4-Jan-11 13:12
kubben4-Jan-11 13:12 
GeneralRe: Using GetMessage in C# Pin
baranils4-Jan-11 19:41
baranils4-Jan-11 19:41 
GeneralRe: Using GetMessage in C# Pin
kubben5-Jan-11 1:56
kubben5-Jan-11 1:56 
GeneralRe: Using GetMessage in C# Pin
baranils5-Jan-11 2:23
baranils5-Jan-11 2:23 
GeneralRe: Using GetMessage in C# Pin
kubben5-Jan-11 2:42
kubben5-Jan-11 2:42 
GeneralRe: Using GetMessage in C# Pin
baranils5-Jan-11 3:44
baranils5-Jan-11 3:44 
Questionautogenerated delete button Pin
tauras8131-May-07 2:32
tauras8131-May-07 2:32 
AnswerRe: autogenerated delete button Pin
kubben31-May-07 3:08
kubben31-May-07 3:08 
AnswerRe: autogenerated delete button Pin
Manoj Kumar Rai31-May-07 4:59
professionalManoj Kumar Rai31-May-07 4:59 
Questionautomated delete button in grid view Pin
tauras8131-May-07 2:31
tauras8131-May-07 2:31 
QuestionSMS log file deleting tool Pin
Software_Specialist31-May-07 2:03
Software_Specialist31-May-07 2:03 
Questionprevent System.Windows.Forms.TabControl.ControlCollection to change SelectedIndex at Remove method Pin
Martin#31-May-07 0:30
Martin#31-May-07 0:30 

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.