u can use SendInput() function. But to send characters to a specific edit window its probably best to use WM_CHAR with PostMessage().
CodeBeetle
Posts
-
how to send WM_ to other Apps -
loop speedmaybe use the Sleep(1); function. That will make the thread sleep for 1ms so that other threads can execute.
-
Get user from process (windows NT/XP) -
packet snifferYou could use GetTcpTableEx()/GetUdpTableEx() to get a list of the TCP/UDP connections and their processes. Assuming your app is to run on minimum OS of XP, of course. Alternativly ud need to develop a low level driver to do that.
-
Capture AudiowaveInOpen waveOutOpen etc... GOOGLE/MSDN :D
-
CommunicationI HAVE A LITTLE WORM. HIS NAME IS ALBERT, HE LIVES IN MY GARDEN, I CAN SEND U SOME PICS IF U WANT :D
-
Find out if user logged in?if u use OpenInputDesktop() and it returns NULL then the interactive desktop is not available. ie: no-one is currently logged on or "using" the computer.
-
Sharing Events created within a ServiceCreate a named event. then any process can open that event and signal or detect it.
-
Using WinPCapwhy dont u use windows raw sockets for packet capturing. Tutorial Here
-
Run exe file problem !!!use createprocess() waitforsingleobject() and terminateprocess() example class: http://codebeetle.com/page.php?id=31[^]
-
redirection of command.comi created a class to do just that: http://codebeetle.com/page.php?id=33[^]
-
convert int to char??char szNum[30]; int i = 1234; itoa(i,szNum,10); // szNum now = "1234"
-
help regarding dllHere's an example. This is in your header file. You will need to change the obvious defines etc to suit your own app. #ifdef MYCLASS_EXPORTS #define MYCLASSDDLL __declspec(dllexport) #else #define MYCLASSDDLL __declspec(dllimport) #ifdef _DEBUG //linkage #pragma comment (lib, "myclass_db.lib") #else #pragma comment (lib, "myclass.lib") #endif #endif // // class definition // class MYCLASSDLL CMyClass { }
-
can u terminate the dos window?when u use createprocess to run command.exe are u using the process handle in the return PROCESS_INFORMATION structure to TerminateProcess() ? also sort.exe is another app which is spawned by command.exe, so TerminateProcess() doesnt hav the process handle of sort.exe it only has command.exe. maybe try using createprocess to run sort.exe instead?
-
sending broadcast packetsto listen for a udp broadcast packet, just create a udp socket on the client machine, binding it to a certain port. eg: 22222. Then broadcasting socket should broadcast on that port.
-
Registry Notifier into a deskband?yes thats exactly wot i mean. but don't create it in DllMain. create it in the function in your dll that is called. goto msdn.com and familiarise urself with creating thread, cos thats one of the things c++ does best, and is always useful.
-
UDP socket problemif you're testing client and server apps on the same machine then you will get problems, cos u cant create 2 udp sockets on the same port.
-
Registry Notifier into a deskband?try putting that bit of code in a seperate thread, using the CreateThread function. Call create thread from the entry point.
-
EXE to ServiceI wrote a program called GenSvc which will do that... http://codebeetle.com/page.php?id=2[^] The source code is also available.
-
Global Scope in CTry this:- int b; int afunction() { extern int b = 0; ... }