|
Then how did you created the image list?
nave
|
|
|
|
|
Hi!
I am storing the username and password in registry.I dont know whether its good practices or not or I have to store it somewhere else ?
I am taking the string value for both, for faster access .
but when the entry completed its show me automatic change in the binary value.
and when I am double clicking on it. it gives me the following values.
I have enter username:user
and password:password
This is for username
0000 75 73 65 72 00 user
This is for password
0000 70 61 73 73 77 6f 72 64 00 password
0008 00
I have passed const char * in the function.
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
amitmistry_petlad wrote: I dont know whether its good practices or not
The location where you store this information matters less than how you store it.
Under no circumstances should a password be stored in plain text. At the very least, you should use a one-way encryption algorithm (or at least an MD5 or similar checksum) to convert the password string to something that's not obviously recognizable.
/ravi
|
|
|
|
|
when I break my program and see the stack info, I get something like this:
USER32! 77d48734()
USER32! 77d4d05b()
USER32! 77d4b4c0()
USER32! 77d4fd29()
I guest it's a name for some function, but what's the name? is it a Win API?
|
|
|
|
|
That means you are inside of user32.dll (a part of Windows operating system) which does not ship with debug info and therefore it can't show you anything more meaningful.
|
|
|
|
|
May i know which functions (other than CalcDynamicLayout())
are called (by framework) when i resize the the docking toolbar?
Thanks
|
|
|
|
|
Do i need to rephrase the question?
|
|
|
|
|
The source code has the answer.
I took a quick glance....I don't see any other (virtual) methods called but I didn't study every
line.
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Hi! I have done a mini project on rekeying. I run a server and client program and communicate between the server and client. I want to design a GUI for the client side program to get input from the user. Please tell me how to do it.. It is really urgent!!
Eas
|
|
|
|
|
cool_kid_cool wrote: a GUI for the client side program to get input from the user.
That's a pretty generic description. Could you be more specific?
cool_kid_cool wrote: It is really urgent!!
It usually is.
/ravi
|
|
|
|
|
Client gets as input an integer and delivers it to the server. Server sends 4 messages to the client in response to the message from the client.
Example:
Client Side
____________
Enter Duration of Stay: 23
Server sends the following to the client in response to receiving the duration
_______________________________________________________________________________
Group Key: 1234556
Sub-Group Key: 12312312
Individual Key: 23423444
ID: 10001011
I want to design a text box to get the duration as input in the client side.. Upon clicking a button it should get sent to the server. And the keys received should be displayed in a label field.. Is it possible ?
|
|
|
|
|
This is the client side code
#include<stdio.h>
#include<sys socket.h="">
#include<iostream>
#include<netinet in.h="">
#include<stdlib.h>
#include<unistd.h>
#include<string.h>
#include<netdb.h>
#include<arpa inet.h="">
#include<sys types.h="">
#include<errno.h>
#include<time.h>
# define MAX 100
# define len 81
using namespace std;
int cwork(int);
int decrypt_rev(int);
int adding_digits(int);
int main(int argc,char **argv)
{
int sockfd,n,gk,sgk,refid;
struct sockaddr_in serv;
char str[100],str1[10],idusr[10];
if(argc != 3)
{
cout << " Error message! /n";
exit(0);
}
if((sockfd = socket(AF_INET,SOCK_STREAM,0))<0)
{
cout <<"Socket Not Created ";
exit(0);
}
bzero(&serv,sizeof(serv));
serv.sin_family = AF_INET;
serv.sin_port=htons(atoi(argv[2]));
if(inet_pton(AF_INET,argv[1],&serv.sin_addr) <= 0)
{
cout << "Conversion Error " ;
exit(0);
}
if(connect(sockfd,(struct sockaddr *) &serv,sizeof(serv)) < 0 )
{
cout << "Connect Fail";
exit(0);
}
cout << "Connected To The Server ";
int type = 0;
write(sockfd, &type, sizeof(type));
while(strcmp(str,"bye")!=0)
{
int swit;
cout << "\n\n(1)Join (2)Leave : ";// SHOULD BE A RADIO BUTTON
cin >> str1;
if(strcmp(str1,"1")==0)
{
cout << "\nEnter Duration of Stay: ";//SHOULD BE GOT IN TEXT BOX
cin >> str;
printf("\nRequest Delivered!");
write(sockfd,str1,sizeof(str1));//SENDS 1 OR 2 to SERVER
write(sockfd,str,sizeof(str));//SENDS DURATION TO SERVER
}
else
{
cout << "\nEnter ID: ";//SHOULD BE GOT IN TEXT BOX
cin >> idusr;
printf("\nRequest Delivered!");
write(sockfd,str1,sizeof(str1)); //SENDS 1 OR 2 to SERVER
write(sockfd,idusr,sizeof(idusr));//SENDS ID TO SERVER
}
int srv_msg, srv_msg1, srv_msg2,srv_msg3,xyz,xyz1,xyz2,xyzz,xyz11,xyz22;
n=read(sockfd,(char*)(&srv_msg),sizeof(srv_msg));
cout << "\nYour Individual Key: " << srv_msg << endl;//TO BE DISPLAYED ON CLIENT SIDE
gk=read(sockfd,(char*)(&srv_msg1),sizeof(srv_msg1));
xyz=adding_digits(srv_msg);
xyz1=srv_msg1+xyz;
xyz2=decrypt_rev(xyz1);
cout << "\nYour Group Key: " << xyz2 << endl; //TO BE DISPLAYED ON CLIENT SIDE
sgk=read(sockfd,(char*)(&srv_msg2),sizeof(srv_msg2));
xyzz=adding_digits(srv_msg);
xyz11=srv_msg2+xyzz;
xyz22=decrypt_rev(xyz11);
cout << "\nYour Sub Group Key: " << xyz22 << endl; //TO BE DISPLAYED ON CLIENT SIDE
read(sockfd,(char*)(&srv_msg3),sizeof(srv_msg3));
cout<<"\nYour ID: "<
|
|
|
|
|
How did you create your existing project? From the IDE, select New from the File menu. On the Projects tab, select MFC Appwizard (exe) or Win32 Application.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I created my existing code in linux.. and i dont know anything about visual studio...
|
|
|
|
|
Hi,
I have got DLL which contains an exported function of a class, and that function contains CStringArray reference as an argument, when i call that method through an application , then i get corrupted heap message. I debugged the code and found that in destructor of cstringarray on the execution of statemnet delete[] (BYTE*)m_pData; , m_pData was not pointing to a valid memory location, does any one know why it is happening.
Warm Regards,
Mushq
|
|
|
|
|
If you statically link CRT to your modules (exe and dll files), you can't delete memory that was allocated in another module.
|
|
|
|
|
Thanks for quick and useful reply, as i was using MFC as statically linked, and when i used the MFC as shared then it worked fine, but any reason for that behaviour?
|
|
|
|
|
HI
How to change background color and text color of VS2005 IDE editor.
-RisKhan-
|
|
|
|
|
Goto Tools > Options
In Options Dialog, Collapse 'Environment' u find fonts and colors.
|
|
|
|
|
Very Very thanks
-RisKhan-
|
|
|
|
|
Didja try tools->options?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Hi all,
I've declared an object of type CTestLogger in my main function. Now I want that object to be accessed in one of the global function, which is defined in a header file. Please find the code snippet and Suggest me a solution if i'm wrong.!!
NB: I cant modify the parameters of the global function: Display_Printf()
=============================================================================
#include "Debug_Print.h"
void main()
{
CTestLogger bac;
Initialize_Logger(&bac);
Display_Printf();
DeInitialize_Logger();
bac.SetMessage("Message From Main");
Initialize_Logger(&bac);
Display_Printf();
Display_Printf("Custom Message From Main");
DeInitialize_Logger();
}
=============================================================================
#include <iostream.h>
#include <string.h>
class CTestLogger
{
char pTestMessage[1024];
public:
CTestLogger()
{
strcpy(pTestMessage, "Default Message");
cout << "Constructor" << endl;
}
void SetMessage(char *pMessage)
{
strcpy(pTestMessage, pMessage);
}
~CTestLogger()
{
cout << "Destructor" << endl;
}
void DisplayMessage()
{
cout << "Display Message :: " << pTestMessage << endl;
}
};
=============================================================================
#include <iostream.h>
#include "Custom_Header.h"
CTestLogger *g_pTestLogger = NULL;
// MUST BE CALLED before invking both the Display_Printf()
void Initialize_Logger(CTestLogger *pTestLogger)
{
g_pTestLogger = pTestLogger;
}
void Display_Printf()
{
if (g_pTestLogger)
g_pTestLogger->DisplayMessage();
else
cout << "Invalid CTestLogger Pointer" << endl;
}
void Display_Printf(char *pMessage)
{
if (g_pTestLogger)
{
g_pTestLogger->SetMessage(pMessage);
g_pTestLogger->DisplayMessage();
}
else
cout << "Invalid CTestLogger Pointer" << endl;
}
// MUST DEINITIALIZE IF Initialze_Logger is called.!!!!!!
void DeInitialize_Logger()
{
g_pTestLogger = NULL;
}
============================================================================
thanks in advance
Rajesh
|
|
|
|
|
Rajesh_Parameswaran wrote: I've declared an object of type CTestLogger in my main function. Now I want that object to be accessed in one of the global function...
No can do. bac is only accessible by main() .
Why did you supply such a large code (irrelavant) snippet?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
im making web browser with dialog box n im using threading too...but i can't call 2 threads simultaneously as thread functuin does not support UpdateData() like function ...so how can i do this ...
basically i want this thing that as i click on ON button then content of that web site come on my screen but i m not able to use noe tht dialog box to write anything in it as it working synchronously...i thought tht i can do it with trad but still im in samr position...plzzzzz help me
|
|
|
|
|
By keeping your post title precise.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|