case WM_CHAR:
file2.open("type.txt",ios::app);
file2.put(wParam);
I used this code in SDK wndProc.It executes successfully but when I execute exe of this sdk code through c# it wont write data into file.Can you please help me?
Run SDK exe through c#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

SenthilkumarRank #387 · 6.5K reputationPosted Mar 30, 2012, 6:11 AM EDT
If you write some content into the file then, (include System.IO namespace)
If you want to open the same file after this content written into file then
System.Diagnostics.Process.Start(@"c:\Test.txt");
Sam HobbsRank #107 · 20.5K reputationPosted Mar 30, 2012, 10:27 AM EDT
That code is opening a file each time a key is pressed. That seems innefficient. Since this is only a small part of the program, I probably misunderstand but based on what I see the file should not be opened at that time.
I do not understand "execute exe of this sdk code through c#". Do you mean that you are executing the unmanaged C++ program from C# but the C++ program is not working? How are you executing the C++ program?