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?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Mar 30, 2012, 2:27 PM
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?
SenthilkumarPosted Mar 30, 2012, 10:11 AM
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");