|
Before going to get the passowrd of user in LAN..Let me ask
Do u know any api to get the username of current login user..?
nave
|
|
|
|
|
hai nave,
to get the Current user Logged in we have to use
GetUserName(...) Api, but i dont know the password APi for the User. Is it possible to retrieve the Password Also, please if yes let me know.
uday.
uday kiran
|
|
|
|
|
I think thats not possible...
nave
|
|
|
|
|
You can't get a user's password because a) it would be a huge security hole and b) the system doesn't store the password anyway, only a hash of it.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
kiran janaswamy wrote: I want to access the Password of the User if the Username is know in a WorkStation or LAN.
Guess somebody using this API to get into your system! Guess the havoc!
If such an API was there then what's the use of a Password!
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Nibu thomas wrote: If such an API was there then what's the use of a Password!
Keyword.
Maxwell Chen
|
|
|
|
|
Hi all
I am having a problem here.
I want to create a plug in for already exising application.
Already existing application is for wiping files and other traces, so here I need to give the support for P2P application's traces in the Wiping Application.
For this I want to create a plugin which add an extra tab in the application, for wiping P2P application's traces.
Here Alread exixsting application is a dialog application.
Please guide me to proceed ( I never worked on making Plug in or DLL like project, so plz help accordingly)
Thanks
|
|
|
|
|
I am attempting to write to a special serial device that requires one I/O to be sent for both reads and writes. The device receives a packet of information, like what would be sent on a WriteFile, and then expects to fill in a packet of data and return it like ReadFile.
Neither readfile or writefile will work, since write only sends packets and reads only retrieve them. The device will not operate with two IOs, as in a writefile/readfile sequence.
Does anyone know of an API call I can make to accomplish this? DeviceIOControl allows for both input and output packets, but I cannot find an IOCTL that implies it will do this.
Any help would be appreciated.
Thanks
Bill
Bill
|
|
|
|
|
What you are describing sounds like the device and application would have to access the same memory. I am not sure that makes any sense if you are using a serial port for communications. Did I miss something?
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
I want to give password protection to one of my screens. I am calling this do while loop in the initinstance of that screen the problem is now if i press cancel button then the password dialog box should go but its not going and if its going then it opens my screen.
do
{
if(password.DoModal()==IDOK)
{
if(password.m_strPassword !=File.getKeyValue("PASSWORD","password"))
AfxMessageBox("Invalid Password ");
}
}while(password.m_strPassword !=File.getKeyValue("PASSWORD","password"));
Please Help me out
|
|
|
|
|
Try this
while(1)<br />
{<br />
if(password.DoModal()==IDOK)<br />
{<br />
if(password.m_strPassword !=File.getKeyValue("PASSWORD","password"))<br />
{<br />
AfxMessageBox("Invalid Password ");<br />
}<br />
else<br />
{<br />
break;<br />
}<br />
}<br />
else<br />
{<br />
return FALSE;<br />
}<br />
}
|
|
|
|
|
Even this is not working On preesing the cancel the screen is displayed
|
|
|
|
|
this progream must show me all the possible shuffled randomisation....but it only displays one result...i tried many ways but still doest work..isit anything with my code...check for me...plz let me know if there is any solution for this as soon as possible..thank u..
<code>#include <ctime>
#include <iostream>
#include <string>
#include <algorithm>
#include <fstream>
using namespace std;
time_t tmStart, tmEnd;
void DoStuff()
{
tmStart = time(0);
ifstream fin("data.txt",ios::in);
ofstream File("MyFile.txt",ios::out);
char str[14];
// fin.getline(str,sizeof(str),'\n');
// string line(str);
//cout << str<<endl;
int i=0;
// while(fin.eof() == NULL )
while(true)
{
if(fin.getline(str,sizeof(str),'\n'))
{
string line(str);
random_shuffle(line.begin(), line.end());
File << "Randomised: " << line << endl;
File << " : " << line << endl;
File << " : " << line << endl;
File << " : " << line << endl;
File << " "<< endl;
// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
File << " "<< endl;
++i;
tmEnd = time(0);
cout << tmEnd-tmStart << " seconds " << endl;
}else break;
}
File.close ();
fin.close ();
}
int main(int argc, char* argv[])
{
DoStuff();
return 0;
}
</code>
|
|
|
|
|
There is nothing random about getting all the possible permutations of a sequence: it's a systematic process.
Steve
|
|
|
|
|
i cant get it...explain more detail pls..
|
|
|
|
|
Imaging you have a dice with 100 sides each labeled with a number. If you want to make a list of all the numbers how do you proceed? One way would be keep rolling the dice and if the number you roll is not on your list you add it. This is very inefficient and non-deterministic however. A simper way would be just to inspect every side. This is similar to the problem you’re having. Using a random shuffle in a loop is not a good way to get every permutation of a sequence: although eventually it will product every combination.
Steve
|
|
|
|
|
is there any othe methods to solve the problem...if i cannot use random shuffle what i must use..
|
|
|
|
|
Maxwell is correct, use next_permutation . The first permutation is the sorted one so you should do this first: sort(s.begin(), e.end());
Steve
Steve
|
|
|
|
|
Hi Steve,
Should we provide a working sample code for THIS[^]?
Maxwell Chen
|
|
|
|
|
I just did - I want this thread to end.
Steve
|
|
|
|
|
std::next_permutation(it.begin(), it.end());
Maxwell Chen
|
|
|
|
|
i tried dis b4...but still the same result...i want all the possible integer randomisation..
for example...
my input file contents... 1234
my output must give the result as
4321
2341
2314
4213
1243
..
..
..
and so on...
all the possible randomised shuffling...
icant get it....is there any possible way..
|
|
|
|
|
If you had of tried it it would have worked. Here's a program which demonstrates this technique:
------------
// Console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(int argc, char* argv[])
{
string s("1234");
sort(s.begin(), s.end());
do
{
cout << s << endl;
}
while ( next_permutation(s.begin(), s.end()) );
return 0;
}
Steve
|
|
|
|
|
Hey all im making a game for school on MFC and im having trouble making it so when I press W,A,S, or D it will move my character... I know how to make him move if I press the arrow keys (previous game):
case VK_DOWN: //IF DOWN BUTTON IS PUSHED
{
}
I have already tried VK_A, any help would be appreciated!
Thanks
|
|
|
|
|