|
Thanks, I've installed that low level keyboard hook and it works .
I don't know what you mean with that gina.dll , but I now searching that question (this could take a while because of the high-tech internet connection in my school (2,2 kb/s)).
Thanks again
-widi
P.S. Today, computers in school are working great again ... I've signed in and what do I see in the Your Name Edit ? Anonymous ?? - s**t f*****g school-computer.
Sorry , but this time I had to say someting...
|
|
|
|
|
The gina.dll is a special dll that controls the autentification of users and Ctrl Alt Del (and other stuff also).
It's a security matter:
Microsoft couldn't allow anybody to write down a simple program that could capture the paswwords or info related to one user in the logon screen. And in order to avoid that they use a GINA.DLL that has all related to the logon (including the CtrlAltDel).
the only way to make it work properly is to make a GINA DLL (or to get someone that is already made) and substitute the one in the system.
This means that in order to do so you must have permission of the administrator of that computer to do that...
hope this helps...
|
|
|
|
|
I guess I have now enough input to get it to work.
Thanks
widi
|
|
|
|
|
dear all,
i've an sdk application with a window.
on the WM_QUERYENDSESSION message, a message box pops up.
i 've 2 problems
1) if i make my window hidden (SW_HIDE), all the message boxes are also hidden( fired on WM_QUERYENDSESSION)
so how do i ensure that the message box is visible even if window is hidden.
2) how do i kill the message box say after 5 seconds
thanx and regards
rishabhs
|
|
|
|
|
Dear all
How to convert float to double?
Thanks
|
|
|
|
|
Is this not working ?
float f=1.5f;
double d;
d=(double)f;
~RaGE();
|
|
|
|
|
if u are using c++
double_var=static_cast<double>(float_var)
|
|
|
|
|
d=(double)f;
d=static_cast<double>(f);
Interesting. This always works for me:
<br />
d = f;<br />
|
|
|
|
|
you can do the following
float f = some_value;
.
.
.
double d = static_cast<double>(f);
think it should work!
And you will know my name is the Lord when I lay my vengeance upon thee.
|
|
|
|
|
Please anyone can help me how to set the default font for CRichEditCtrl.
Thanks
The Phantom
|
|
|
|
|
Is it possible to Hook the DDI funcion calls? How?
Vikrams
|
|
|
|
|
Can I place a web browser control into the main window of a non Doc/View or non Dialog based application?
-- Steve
|
|
|
|
|
|
i've been working on this program (cryptology based) and just realized that the only way that it would be up to standards; would be to have a user defined lenght of the array of characters (captured by getchar() ). I am only in the 3rd month of my programming class, so we have not yet covered dynamic allocation (I don't know if we even will). I know that this is C++ but the people in C# said I should come here, you all are probably smarter anyway.
Long story-short. I need to capture an array of characters where, as the user types, the reallocation would be made; so no prompting of #'s just typing. here is how I tryed to do it but recived errors in execution, it does compile(What am I doing wrong??). I'm having a lot of trouble with this one. thanks bunches for your help .
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int char_to_num(char input);
void main (void){
char egrab,*cin;
int i,j,num,str_size;//, *t;
scanf("%c", &egrab); /*egrab grabs the enter from the previous
module this is a small part of my thing*/
printf("\nPlease enter the characters))>: ");
num = 0;
str_size=10;
cin= (char *)calloc(str_size, sizeof(char));
for(i=0; i<(i+1); i++,cin+=10)
{
for(j=0; j<10;j++,cin++){
*cin = getchar();
if (*cin =='\n')break;
num += 1;
}
if (*cin =='\n')break;
cin = (char *)realloc(cin, (sizeof(char)*10));
}
cin[i+j] = 0; /*close as to be printed as a string later*/
/*fill the array to be encrypted ( t[] ) with integer conversion*/
for(i=0; i<num;i++,t++,cin++){
*t="char_to_num(*cin);}
/*print" out="" the="" results="" as="" a="" check*=""
="" printf("\nnum="%d\n"," num);
="" for(i="0;" i<num;i++){
="" printf("%c",="" cin[i]);}
="" printf("\n");
="" i<num;i++,t++){
="" printf("%d="" ",="" *t);}
}="" *end*=""
="" ******************************************************************************************="" *this="" will="" convert="" character="" into="" number="" (67="" total="" possibilites)*=""
int="" char_to_num(char="" input){
="" int="" output;
="" if="" (="" (input="=" 'a')="" ||="" ){
="" output="1;}
" else="" if(="" 'b')="" 'c')="" 'd')="" 'e')="" 'f')="" 'g')="" 'h')="" 'i')="" 'j')="" 'k')="" 'l')="" 'm')="" 'n')="" 'o')="" 'p')="" 'q')="" 'r')="" 's')="" 't')="" 'u')="" 'v')="" 'w')="" 'x')="" 'y')="" 'z')="" input="=" '!'="" '@'="" '#'="" '$'="" '?'="" '^'="" '&'="" '*'="" '('="" ')'="" '-'="" '_'="" '=" ){
output = 39;}
else if( input == " +'="" '\\'="" '|'="" '`'="" '~'="" '.'="" ','="" '0'="" '1'="" '2'="" '3'="" '4'="" '5'="" '6'="" '7'="" '8'="" '9'="" '<'="">' ){
output = 59;}
else if( input == '[' ){
output = 60;}
else if( input == ']' ){
output = 61;}
else if( input == '{' ){
output = 62;}
else if( input == '}' ){
output = 63;}
else if( input == '/' ){
output = 64;}
else if( input == ';' ){
output = 65;}
else if( input == ':' ){
output = 66;}
else if( input == '%' ){
output = 0;}
else {
output = -1;}
return(output);
}
THANKS AGAIN.
|
|
|
|
|
/quick look
the problem is probably in your call to realloc() - the parameter specifies the new number of bytes the buffer should be, not the number of extra bytes you want.
you should also not use the variable name cin - it has special meaning in C++
and ditch the long if-else statement at the end! look at isalpha(), ispunct() and toupper(). A-Z are contiguous in ASCII so toupper(ch) - 'A' will map the letter in ch to a value between 0 and 25.
You should save yourself and your company years of grief by shooting yourself through the head immediately. Believe me, in the long run it'll turn out better for everyone. - Tyto (at arstechnica)
Awasu 1.0[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Thanks.I changed the 'cin' to 'ci' and adjusted the realloc to the following yet I cannot change the long if else statement because of my main program (long story involving multiplicative inverses of modular functions), so the realloc is now...
ci = (char *)realloc(ci, (/**/ sizeof(char) * (20+(10*i)) /**/) );
which should do what I want (realloc 10 char every loop if 10 or more are typed), yet I still recieve this:
"Expression: _CrtIsValidHeapPointer(pUserData) assertion failure"
, what on earth does that mean? I have a feeling that I have much more than just one problem. I must addmit though that this has become quite fun, so far in class i've picked up everything with ease, seeing how complicated C can get is really cool to me(even though i think that i have no idea how complicated C can get). anyway if you have ANY other ideas that would be great!
|
|
|
|
|
This error means that you've passed a pointer in to the system that wasn't given to you by the system.
You should save yourself and your company years of grief by shooting yourself through the head immediately. Believe me, in the long run it'll turn out better for everyone. - Tyto (at arstechnica)
Awasu 1.0[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Thanks for your help i've fixed the problem, i made a really dumb mistake. now comes the next point; so now how should i go about dynamicly declaring a n-dimentional array (i mean a nxn matrix, if my language was wrong)???
|
|
|
|
|
If you're not using the STL, the easiest way is to define a 1-D array and manually convert the 2-D co-ordinates to 1-D:
<br />
int width=10 ;<br />
int height=20 ;<br />
char* pArray = new char[ width * height ] ; <br />
<br />
int x=5 ;<br />
int y=2 <br />
char ch = pArray[ width*x + y ] ; <br />
You should save yourself and your company years of grief by shooting yourself through the head immediately. Believe me, in the long run it'll turn out better for everyone. - Tyto (at arstechnica)
Awasu 1.0[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Anyone know where to change the default file name extension for documents in VC7. It was part of the project setup in VC6, but I did not see it when I set up a new project in VC7. TIA.
Matt (Padawan Learner)
|
|
|
|
|
|
Hi,
I am using an encrypted password in an INI file using the CryptoAPI (cryptography.cpp and .h) which is read from the INI file and converted back into text for checking by my program. However, certain symbols generated by the encryption cannot be read using GetPrivateProfileString() in Win95/98/Me. To get around this, I built an error-checker into my password encryption generator that writes the encrypted password to a test INI file and then tries to read it and decrypt it back again - if it fails, then it tells the user to pick another password. However, this is obviously flawed - because if the password generator is run on a Windows XP or 2000 system, it will never fail - but then when the program is run on Win95/98/Me, the decryption will fail.
So what I need to do is have my password generator check that the encrypted password will work on a Win95/98/Me system even if the generator is being run on an XP/2000 system. I hope I am explaining this okay. Essentially, what I want to do is force the program to act like it is running on a Win95/98/Me system even if it is being run on Windows XP or 2000. Is this possible by doing something like #define _WIN32?
Many thanks,
Keith
|
|
|
|
|
Why don't you convert the encrypted password to something printable before you write it to the INI file e.g. the hex values of each byte and decode it before decrypting. Then you won't have any problems at all.
From someone who uses INI files a lot
You should save yourself and your company years of grief by shooting yourself through the head immediately. Believe me, in the long run it'll turn out better for everyone. - Tyto (at arstechnica)
Awasu 1.0[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Hi, thanks for the reply. Sorry, but I'm not a very experienced programmer, I don't have a clue how to go about this. If you have any suggestions, I'd be very grateful.
Many thanks,
Keith
|
|
|
|
|
To encode, something like this:
unsigned char* pEncryptedBuf = ...
size_t encryptedBufLen = ...
for ( size_t i=0 ; i < encryptedBufLen , ++i )
printf( "%02X" , (int)pEncryptedBuf[i] ) ;
You probably won't want to print the string to the console but this is the basic idea i.e. the string you store in the INI file is guaranteed to contain only nice characters and won't be a problem on any OS.
Decoding is left as an exercise for the reader...
You should save yourself and your company years of grief by shooting yourself through the head immediately. Believe me, in the long run it'll turn out better for everyone. - Tyto (at arstechnica)
Awasu 1.0[^]: A free RSS reader with support for Code Project.
|
|
|
|