|
Is there a method to export registry settings just like the one i used in regedit.exe? If yes, how to export programmatically?
Thanks all
|
|
|
|
|
visit http://zmanagers.chat.ru
you can find there Registry.cpp in sources.
I wrote there a function which makes this task.
Mike.
|
|
|
|
|
How can I create a virtual disk at RAM, and the disk should write all the contents to the physical disk file.
Any help are appreciate.
|
|
|
|
|
Hello all,
I recently wrote a security program with MFC that configured registry policies. The problem is that a script kiddie using a disassembler went right past my security measures by simply skipping to the place in the code that was past my password protected section. Is there a good way to protect against disassembers?
--Tale
|
|
|
|
|
If your security check is in code like this:
if ( !ShoudILetTheProgramRun() )
{ // show messages saying the app won't run
// and then exit
}
Then it's trivial to bypass. Don't make the security check that painfully obvious.
--Mike--
http://home.inreach.com/mdunn/
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Could you be a little more descriptive in your solution. I'm not familiar with disassemblers, so I really don't know what the weakness in my program is.
The way I'm checking for proper users is by reading an encrypted password from the registry and comparing it with what they supplied. If they are equal, I call the method to let them into the protected area. What are you suggesting I change?
--Tale
|
|
|
|
|
You'll have problems if you save password in the registry when OS needs to be reloaded. The password should be OS independent.
I collect 3 numbers from the environment:
1- Bios date
2- HD serial no
3- Program folder creation min+sec+milisec
They make up *almost* uniqe password.
Disassemblying is a different subject!
|
|
|
|
|
Could somebody give me a legitmate answer? The two posts here so far have been pretty useless to me. Sorry guys, but it's true. I felt that I explained it pretty well in my last post, so if you could answer it I would appreciate it. Here is what I wrote:
Could you be a little more descriptive in your solution. I'm not familiar with disassemblers, so I really don't know what the weakness in my program is.
The way I'm checking for proper users is by reading an encrypted password from the registry and comparing it with what they supplied. If they are equal, I call the method to let them into the protected area. What are you suggesting I change to make my program less suspectable to disassemblers?
--Tale
|
|
|
|
|
Look, there's almost nothing you can do about this. When it boils down to it. If the computer can read your assembly, so can a cracker. If the cracker can't, then neither can the computer.
All you can do is make it more difficult to find. put lots of code in there that does nothing and leads the cracker on false paths. Hide the code inside some other function, make it rely on a side-effect of the function, and don't just check the value of a memory location and exit. Go do a bunch of other stuff for no particular reason and exit somewhere unexpected.
That's all you can do.
|
|
|
|
|
This is probably a stupid question:
Is there a Windows SDK function that I can use to get a list of the contents of a directory? Oddly enough I haven't been able to find a method to do this....
Please Help,
Thanks
jon-k2001@home.com
|
|
|
|
|
FindFirstFile() and FindNextFile() will do it.
--Mike--
http://home.inreach.com/mdunn/
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
|
OK, here's my problem. I'm trying to get the width of the toolbars in pixels. So, supposedly, I write code in this fashion to get their rects:
CRect rectTB1;
CRect rectTB2;
m_tool1.GetWindowRect(&rectTB1);
m_tool2.GetWindowRect(&rectTB2);
int m_iTBTopWidth = rectTB1.Width() + rectTB2.Width();
So, I should have it made to compute the sum of both toolbar width. Unfortunately, both Width() came out to be 472, even though one of the toolbars is about 1/5 the size of the other. What am I doing wrong here?
Frank
|
|
|
|
|
I write a SDI application which based on CListView
and a worker thread.
The problem I have,when the thread returns the values to Listview, I can't update the ListView.
Please advise,
Sue
|
|
|
|
|
I have a single line CTabCtrl, and I am custom drawing everything. I need a way to find out if the user has scrolled the tabs to the left or the right (if there are enough), and which tab is the first shown in this case, so I can start drawing from the correct tab.
How can I do this? I was unable to find an example on this site or Codeguru, or anywhere else.
Yours,
David Wulff
|
|
|
|
|
TCN_SELCHANGING notification message any use?
of CTabCtrl::GetCurSel()
Just ideas
Stephen Kellett
|
|
|
|
|
I tried using GetCurSel() but it returns the selection from zero, rather than from the first visible tab. I don't see how handling TCN_SELCHANGING will aloow me to do anything different.
Thanks for the suggestions,
David Wulff
|
|
|
|
|
Hi ALL !!
please help me,
when i create CScrollView without CDocument in my ActiveX control
i had error and debug crash !!!
"Invalid Address specified to RtlValidateHeap"
m_clsGridView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
m_clsClientRect, this, AFX_IDW_PANE_FIRST + 1, NULL);
What not so ?
|
|
|
|
|
Looks like you've got heap corruption - something has
overwritten the start or end of an allocation block.
A trivial example is:-
char *ptr;
ptr = (char *)malloc(strlen(origString));
if (ptr != NULL)
strcpy(ptr, origString);
// at this point you've overwritten the first byte
// after the end of the allocated block at 'ptr'
// this is because strcpy writes a zero byte at the
// end of the string.
Now this probably isn't the problem (the strcpy thing above)
but can give you an idea of what is wrong.
Alternatively a bad heap handle could have been passed
to HeapValidate (which will call RtlValidateHeap).
Stephen Kellett
|
|
|
|
|
Hi all,
I'd like to disable the scrollbars of a CTreeCtrl object, and I thought I must use a class derived from CTreeCtrl. But I can't do. Can you help me?
Thanks in advance
Ngo Khai Hoa
|
|
|
|
|
Hi !!!
CtreeCtrl derived from CWnd.
CWnd has Class Members functions for using scroll
I think if you write
CMyTree.GetScrollBarCtrl(...);
you got all what you want.
Best regards
VitSoft
|
|
|
|
|
You need not derive any class from CTreeCtrl. You just have to set the style TVS_NOSCROLL using ModifyStyle function of the CWnd Class ( CTreeview is derived from CWnd hence inherits that function). Later you will not have the both vertical and horizontal scroll bar for the tree control.
Example
CTreeCtrl *x = (CTreeCtrl *)GetDlgItem(IDC_TREE1);
x->ModifyStyle(0,TVS_NOSCROLL);
HTH.
Sundaravalli Shriram
Tektronix Engineering Development India Ltd,
Bangalore - 560001,
India.
|
|
|
|
|
Hi,
How do we get the buffer of text when we drag a text from a edit control?
Sincerely.
Ngo Khai Hoa
|
|
|
|
|
I am wondering if anyone knows how to alter ALL explorer Save As dialog boxes so that my custom box
comes up anytime the SaveAs box is called. I know it can be done. Ontrack software has a program
called "PowerDesk" which optionally allows the common Save As dialog box to include an extra control that
permits the user to choose from a list of folders that were recently saved in. I am interested in
implementing something similar in one of my applications I am writing.
Details on the controls themselves are not necessary, I just want to know how to change the dialog itself,
having windows use my own "version" of the SaveAs dialog box instead of the normal one.
|
|
|
|
|
I downloaded Microsoft platfoem SDK and installed in my machine according to the instruction. But it
seems the SDK can not be used in Microsoft Visual C++ 5.0 (Microsoft developer studio 97). My problem
is I have to use Visual C++ 5.0 since all the previous projects are developed under Visual C++ 5.0. Can
someone tell me how to fix this problem? Thanks
|
|
|
|