|
If you embed a password directly into an exe, it will be insecure. You can play with it to make it less obvious (e.g. XOR against some other non-secret value), but nothing you can do will actually make it secure. If the exe has access to the password, so does anyone who has the exe.
|
|
|
|
|
If you absolutely must hard-code a password in the exe file, then I recommend you encrypt it, and then store the encrypted version in the exe. Then whenever you need to compare against it, encrypt the user-entered password and compare the encrypted passwords. I wouldn't do anything with plain-text passwords except encrypt them.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have a SDI application with a splitter (left and right views). Left view is regular view(CView) created by the wizard. Right view is a form view with a pie chart drawed on it. Everytime i try to select File > New, it will give me assertion error. This is because of the pie chart, if i take out the drawing of the pie chart class on the right view then it works fine. However i need the pie chart to stay on there. How can i make this so when i hit File > New, it will try to open a new document on the Left view only and right view will not be reload or affected.
|
|
|
|
|
The trick here is to remember that debug asserts are your friend. Let the assert happen and use the debugger to examine the line that asserts. If it's deep in MFC (probably is) there are probably comments in the source explaining what's being asserted and why it might fail. It's those conditions you need to investigate to deal with the assert.
Rob Manderson
Colin Davies wrote: I'm sure Americans could use more of it, and thus reduce the world supply faster. This of course would be good, because the faster we run out globally, the less chance of pollution there will be. (Talking about the price of petrol) The Soapbox, March 5 2004
|
|
|
|
|
I'm creating a program which uses dialogs
but the problem is how do I attach them to one another ???
Must I make separate classes or do I need to add them to an excisting class??
|
|
|
|
|
What exactly do you mean by "attach them to one another"?
- Aaron
|
|
|
|
|
What I mean by that is that I wanna go from from dialog to another by using buttons as next and previous(sorry it had to be How Do I attacht dialogs to one another)
Can U help me???
|
|
|
|
|
You are thinking of a "wizard", I think.
Look up CPropertyPage / CPropertySheet in MSDN documentation. Or look in the Programmers
Guide section for something like "programming a wizard".
Iain.
|
|
|
|
|
Hi,
I need a help how to draw a waveform in VC++.
The serial data is inputted from the serial port, and the same data should be plotted in VC++.
My question is how to draw a waveform for a specific set of data in VC++.
Please can anyone help me in this regard.
|
|
|
|
|
|
hello,
im trying to make a simple program that has a dialog bar with buttons on it,
now, i would really like to have the button react to different states (mouse over, mouse down etc.), just like internet explorer
image1 and winzip
image2 that will change accordinly
to what version of windows the user is using like this
image3
image4
my buttons dont even have to have a bitmap on them,
just those special states..
thank you.
asher
http://www.backup2000.com
|
|
|
|
|
You could create a new class for you button and catch the message WM_MOUSEMOVE, setting there a boolean value according to the position of the mouse, and modify the drawing according to this boolean value.
You may find useful info in this article: CButtonST v3.9 (MFC Flat buttons)[^]
Dansez sur moi, dansez sur moi,
Le soir de mes funerailles
Que la vie soit feu d'artifice
Et la mort un feu de paille
Claude Nougaro (1929-2004)
|
|
|
|
|
To my understanding, a CD has 0's and 1's (binary) written on it, and a laser reads the binary. Then the computer translates it. Please correct me if I am wrong. I am using MFC, and what I am trying to do is get all the binary data off of a CD, and put it to a char. Is this possible? Any help at all is appreciated.
-Dev578
|
|
|
|
|
a CD has nothing "written" on it!
there are pits and pats (or whatever they are called... dunno).
a change between pit and pat is a 1, if it doesnt change then it is 0.
to read the binary sectors from a CD you will need IOCTLs or even better SCSI.
IOCTL_CDROM_RAW_READ is the IOCTL, but i dont know if you will find it in MSDN, my doc is part of the DDK.
if you want to use SCSI then have a look at CDex src.
Don't try it, just do it!
|
|
|
|
|
Im makin a program that will respond to system restart and shutdown and i want to know how to idnetify shutdown from restart.
on WM_QUERYENDSESSION:
how do i know if the application is shutting down or making a restart?
What is the value of lParam parameter for shutdown and restart?
be glad if anyone would answer.
|
|
|
|
|
you cant get this information from WM_QUERYENDSESSION.
it just tells you, that you app will be closed and if it is just the user logging off.
Don't try it, just do it!
|
|
|
|
|
any idea where can i get that information?
|
|
|
|
|
no, why is this information interesting for you?
Don't try it, just do it!
|
|
|
|
|
im makin a program that should react only on user shutdown.
|
|
|
|
|
and what does this program do?
Don't try it, just do it!
|
|
|
|
|
well its just a simple program. it will just post a messagebox( reminder } on every shutdown and that reminder should not appear during log-off and restart sessions.
got any idea how to do it besides trapping the WM_QUERYENDSESSION message?
|
|
|
|
|
The net result of both a shutdown and a restart is the same (i.e., memory has been flushed, data has been written to disk, programs have been closed). The fact that it came back up with a restart should be irrelevant. However, without more details of what you are after, it's hard to suggest a more elegant solution.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
well i have this program that remains hidden and be shown when shutdown is detected. my problem is that it should not appear when the system restarts or logs off.
well logoff and shutdown can be detected on WM_QUERYENDSESSION and WM_ENDSESSION.
in what way or how does windows commands the system to power up again after shutting down ( restart ).
do you have any idea on how to accomplish it?
|
|
|
|
|
I have a program where I create various objects in mainframe. The objects are data members of class mainframe. I need to access these objects using member functions in dialog and view.cpp. How can I access objects in mainframe from dialog and view? Right now I am using a Extern to do it, but I dont like doing it that way.
Can someone give me a few ideas?
Thanks.
Jerry
|
|
|
|
|
use
CMyMainFrm *pFrm;
pFrm = (CMyMainFrm*)AfxGetMainWnd();
pFrm->{access the member functions or variables}
This space is empty.
|
|
|
|