-=- James Please rate this message - let me know if I helped or not!<hr></hr>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
Is that the stuff you forgot to free before you lost the pointer?
If I could have voted 6, I would have (there's no bug in the new site to exploit in votiong twice either
I want watch a particular chunk of memory. Specifically, I need to know if a block obtained from AWE extensions is being paged out. I also want to compare overall paging (without AWE extension acquired) with the page I am trying to lock into memory.
Sounds as if you want to do some very very low level tracking, and monitoring at OS Level. Also sounds like heavy stuff, like intercepting at OS Level, and surrepticiously maintaining the Intercept link. Matt Pietreck and 'SoftIce' would be where I would start my research on this.
It also occurs to me that it is one of those things one is not supposed to do, meaning that:-
1: Your Compiler/OS combination has an alternative method to achieve your ultimate goal.
2: If you are successful, and rely on what you develop this way, Whatever resulting code you may arrive at, is NOT guaranteed to work at any configuration other than your own. So, if you ship your code, you have a built in time bomb, because the chances are that at some time in future, on some of your clients machine, things will work out ever so slightly different, and come to grief.
I Strongly suggest that you re-design your code in such a way so that the question you ask does not arrise. DOS ran away with all of us, because it was so easy to modify and extend. Everybody had a go at any aspect they did not like. Win32 is different. It has a larger mission, the OS provides documented services, which allow code to run on diverse platforms, often from Win95 to Vista.
In Short, Tinkering inside the OS Calls is not the way to develop code!
re-design your code in such a way so that the question you ask does not arrise.
This is kind of tough. I'm working to extend Crypto++'s secure allocator. At this point, the Crypto++ allocator zeros memory. But the memory can be paged out. In my minds eye, the next step is a secure heap with no paging. The secure heap is easy enough through AWE extensions.
However, verifying correctness is more difficult. I've begun assembling tools. WinDbg or cdb (SoftICE is no longer around), a raw disk editor, etc.
Bram van Kampen wrote:
... tinkering inside the OS Calls is not the way to develop code!
Pietrek does it all the time to develop an understanding of undocumented behavior
That's Fine, Yo go that way, that's your project! Just do not be surprised if it refuses to run on any other machine other than your own!
I now understand where you come from. You are trying to implement a security system and to match it with the WindowsOS security system. The Bottom Line is: No Chance. Known Criminals in Northern Ireland have escaped prosecution, because the assembled forces of MI5, and GCHQ had to give up after five years of trying to decript MS encripted disks.
Microsoft is unlikely to give up it's market advantage it got in the european market by employing their proprietary encription mechanism.
Microsoft in Europe uses a Swiss encription algoritm, Invented in Switzerland, and which is much stronger than the American version but not subject to American export controls. (It did not Orriginate in the USA).
You appear to be intend on designing some encription taking place at base level. (i.e. Page Saving) Unfortunately, you'll have to write your own Encription/Decription, and it appears that you will have to write your own Device Managers to Implement the code. This is a Very Hard One to do, even at just your own computer! Unless you proceed very very Carefully. e.g. After you install the Encription/Decription handler, Unless it is able to establish which file is stored encripted, you may loose your entire disk!!
Believe me, I've been there. After you make it work at your own computer, you now want to makle it run on your customers'computers. This typically comprises of a mottly crew ranging from ancient Win95 Machines, NT, Win2000, etc, each updated to their service packs,
I am using property page in my project. In Property page class i used pagePAth object of CStringArray class. I store paths in pagePath object. Now I want to retreive paths by using pagePAth object in CMyView class which is derived from CView class. I am unable to acces pahePAth object in CMyView class. Please send me solution if u have.
Does CMyView own (i.e., bring up) the property sheet? If so, make pagePAth a member of CMyView. Then when you construct the property sheet, pass it a pointer to pagePAth.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Hi, I'm trying to start using VC++2005 instead of an VC++6.0.
I'm trying to write a small application where I added some files (.cpp and .h) from VC++ 6.0 applications and reuse them!
When I tried to compile I've got all this errors and warnings about using new functions types (secured ones...).
But conversation of typs is what I cant deal with. E.g.: in my code line
"Column.pszText=bfields[i].label;", 'Column' is LV_COLUMN and 'label' is char*.
At first error about conversion(error C2440: '=' : cannot convert from 'char *' to 'LPWSTR') I added '(LPWSTR)': "Column.pszText=(LPWSTR)bfields[i].label;" it compiled ok but at run time this didn't put label I provided but some squares! Why? When I place brake_point on this line I noticed this is not working right. Instead of placing a text 'Id' it placed several odd looking squares.
I think the conversion is bad, how to fix this?
Your problem arises because VC++6.0 default builds were ANSI while VC++2005 ones are UNICODE. You can fix it either:
(1) Changing the project properties to make an ANSI build (i.e. modifying the character set property). This way you'll obtain a buld close to the old VC++6 one.
(2) Modifying you code to be UNICODE (or, better, generic text mapping) compliant. Maybe a major effort, maybe it is worthy. You must be careful though. For instance you cannot simply cast character arrays, as you've done in the following sample:
josip cagalj wrote:
It is a bad mistake.
You can either dinamically convert ANSI strings to UNICODE ones (see, for instance [^]) or simply replace ANSI data with UNICODE counterpart or, better, generic ones (i.e. TCHAR instead of char, T_("foo") instead of "foo" and so on.. ).
Hope that helps
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
You were right, I set Character set to 'Use Multi-Byte Character Set' at project properties, project defaults.
It compiled fine and everything works ok.
Next thing I tried is to connect to mysql database. With VC++6 all i needed is to add 'libmysql.lib' (under Object\library modules) and specified lib path (under Additional library path). In VC2005 I can find where to place lib path(under 'Additional Library Directories' in project properties in 'Linker->General'), but where to insert 'libmysql.lib'?
I also incude "mysql.h":