|
|
I want to write the code for put the data to edit control of another program.Such as the log in windows.
I want to random put the charactor for search the right password.
How to do this?
|
|
|
|
|
Max++ wrote: How to do this?
Which part specifically?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How to inject the character to edit control of the target windows.
|
|
|
|
|
What's wrong with SetWindowText() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But how to know ID. of that edit control.
|
|
|
|
|
Max++ wrote: But how to know ID. of that edit control.
Why would you need to know that?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
SetWindowText() use for change caption of target windows.
|
|
|
|
|
Max++ wrote: SetWindowText() use for change caption of target windows.
Yes, that's what that function does. SetWindowText() uses a window handle.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You can find an article on codepoject it gets ID and Class of another programs
|
|
|
|
|
Well, at least the thread topic is spot-on!
Mark
|
|
|
|
|
Max++ wrote: Such as the log in windows.
That's not gonna happen.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The short answer is to do the following:
1: Have your application get access to the WinLogon desktop
2: Enumerate the windows to determine the handle of the password edit control (HWNDs are unique across the system, IIRC).
3: Inject keypresses (SendEvent(...) ) to enter keystrokes for the characters you want to try
4: See if the actve desktop switches from the WinLogon desktop to another one (if so, you likely successfuly logged in)
5: If not, simulate a keypress to dismiss the "login failure" window and go back to step 2 (because the login window may have closed) and try again
Now, if you expect to be handed code to do this, I do not think so. Most of the people that contribute to this site are not going to help you do something that is illegal. I only mention the steps because I am fairly sure that you will not be able to do this on your own. :P Step #1 is hard enough believe me, and I am not going to tell you the way I use to detect desktop switches to/from the WinLogon desktop.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
i am wondering where root_p->data come from? no initialzation in root_p->data. anyone can help me?
here is code:
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
<br />
struct tree_node{<br />
int data;<br />
struct tree_node *left_p, *right_p;<br />
};<br />
<br />
<br />
struct tree_node *<br />
t_search(struct tree_node *root, int v){<br />
<br />
while(root){<br />
printf("looking for %d, looking at %d\n",<br />
v, root->data);<br />
if(root->data == v)<br />
return(root);<br />
if(root->data > v)<br />
root = root->left_p;<br />
else<br />
root = root->right_p;<br />
}<br />
<br />
return(0);<br />
}<br />
<br />
int<br />
t_insert(struct tree_node **root, int v){<br />
<br />
while(*root){<br />
if((*root)->data == v)<br />
return(1);<br />
if((*root)->data > v)<br />
root = &((*root)->left_p);<br />
else<br />
root = &((*root)->right_p);<br />
}<br />
<br />
if((*root = (struct tree_node *)<br />
malloc(sizeof (struct tree_node)))<br />
== 0)<br />
return(2);<br />
(*root)->&data = v;<br />
(*root)->&left_p = 0;<br />
(*root)->&right_p = 0;<br />
return(0);<br />
}<br />
<br />
main(){<br />
<br />
struct tree_node *tp, *root_p = 0;<br />
int i;<br />
<br />
<br />
t_insert(&root_p, 4);<br />
t_insert(&root_p, 2);<br />
t_insert(&root_p, 6);<br />
t_insert(&root_p, 1);<br />
t_insert(&root_p, 3);<br />
t_insert(&root_p, 5);<br />
t_insert(&root_p, 7);<br />
<br />
<br />
for(i = 1; i < 9; i++){<br />
tp = t_search(root_p, i);<br />
if(tp)<br />
printf("%d found\n", i);<br />
else<br />
printf("%d not found\n", i);<br />
}<br />
exit(EXIT_SUCCESS);<br />
}<br />
~~~@@@###EZRA###@@@~~~
|
|
|
|
|
EzraYap wrote: /* value not found, no tree left */
if((*root = (struct tree_node *)
malloc(sizeof (struct tree_node)))
== 0)
return(2);
(*root)->&data = v;
(*root)->&left_p = 0;
(*root)->&right_p = 0;
When you do the insert, it creates it.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I create a SDI program using Visual C++ 6.0(without any service pack installed),without adding any source code by myself ,i start the program in debug mode,then press F12,so the crash happens.But if i run the program not in debug mode and press F12,nothing will happen.
Can anybody tell me why this would happened and how can i to resolve it?
Thanks a lot.
|
|
|
|
|
Is your application supposed to respond to the F12 key?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Back in the dark ages, F12 was the "break into the debugger" key. I didn't think that was the case anymore, but it sounds like that's what you're seeing.
|
|
|
|
|
Is there a good freeware program that could be recommended for displaying which function calls another from a series of .cpp files? Something that allows the selection of a group of source code files and outputs a chart displaying the function relations. Thanks. -jbj
|
|
|
|
|
There's one built into Visual Studio. It's not a "flow chart" per se, but it does show how functions are called.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Where is it located? A dummy project was set up in vc6 and files imported, but I haven't located the option you describe. Thanks.
|
|
|
|
|
jon_fallon wrote: Where is it located?
Tools --> Source Browser
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In VS2005 it is View-->Object Browser and they put the call/caller graphs back in! They were missing and a glaring hole in previous .NET C++ environments. C# Still does not have them
led mike
|
|
|
|
|
Dear all,
i built the strmbasd.lib in platform sdk command prompt(using nmake command).
I try to built the dll in vc++6 ,using this lib file(strmbasd.lib).
The following error was occured
waiting for the valued suggest from you all..
Output Window
Compiling...
YuvGray.cpp
Linking...
Creating library Debug/YuvGray.lib and object Debug/YuvGray.exp
LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library
strmbasd.lib(strmiids.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Error executing link.exe.
Results
YuvGray.dll - 1 error(s), 1 warning(s)
Manjunath S
GESL
Bangalore
|
|
|
|
|
Having built with the PSDK, you've got a lib that was created by a newer compiler than VC6, that's probably your problem.
Why are you using VC6 ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|