|
Can u give me some site address which provide some information related to this ? It is very useful . I found yesterday that it can be done using driver programs.
krishnadk
|
|
|
|
|
to reply to your mail, no, i've got absolutely no idea on the way to proceed to do that, but i'm quite sure it's like this.
google on this...
see you
TOXCCT >>> GEII power
|
|
|
|
|
There are dozens of utilities available that can recover files on FAT16, FAT32, and NTFS file systems. Unfortunately, I know of no source code. That is a realm of Windows that I have not delved into.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have to Find it...
I will publish it in codeproject if i get any idea
Bye friends
krishnadk
|
|
|
|
|
Used to be in the good ole DOS days, Undelete was one option. However, in addition to renaming the first letter back to the original letter, it also did several other things:
First, the directory entry for the file also held the starting cluster number on the HD, as well as the total file size.
Then it calculated the number of clusters needed to contain the file completely (the last partial cluster was upgraded to a whole cluster).
Lastly it went through the FAT, starting with the first cluster, and started linking the required number of clusters into a chain. The odd twist in the whole thing was that the entries were 12-bits wide, so two FAT entries were coded into a three byte field, and had to be decoded accordingly.
This should explain why Undelete worked only part of the time. If you did not run it immediately after deleting a file, chances of recovering the file decreased drastically.
Now, in more modern times, we have several different File Systems, like FAT32 (well, people still use it), NTFS, and maybe HPFS. They all have their own way of tracking the sectors/clusters used by each file. From what I have seen of NTFS, the storage scheme used some sort of an index node mechanism, I was given to understand it may have been a derivative of the Digital's VAX storage architecture. Admittedly, I did not find any documentation on this. No, I did not delve as deeply into this as I did for DOS. In addition, these OSes use temp files that can't be moved physically, and so on. Plus, there are now things such as RAID and so on.
The only reason I can see you would want to muck with such low-level stuff is that you are writing a data recovery program, or you are writing a defragmentation program.
|
|
|
|
|
I would like to allow my MFC program to execute a VB script.
This script would also include command specific to my application.
Can someone point me in the right (probably COM) direction?
Neil
|
|
|
|
|
If you are wanting to execute a .vbs or .wsh file, you can use ShellExecute() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I think, start from Windows Script Interfaces[^] and continue from there.
You'll find Eric Lippert's blog[^] helpful as well. Eric was one of the developers on the VBScript engine.
If you want simpler scripting, consider using the Microsoft Scripting Control, msscript.ocx .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hye,
I think we don't have any article on development of dialogic based cards???
Jigar Mehta
(jigarmehta@gatescorp.com)
Software Developer
Gates Information Systems
|
|
|
|
|
|
Trollslayer wrote:
I don't know what you mean by 'cards' but look at http://www.codeproject.com/dialog/[^]
Dialogic is a make of CTI Telephony hardware. They make cards that plug into PC's. I think this is what the guy was asking about.
Michael
CP Blog [^]
|
|
|
|
|
Jigar Mehta wrote:
I think we don't have any article on development of dialogic based cards???
No their aren't any articles on using Dialogic cards. There are a few general TAPI articles, but non on the api's used by Dialogic and the like.
Michael
CP Blog [^]
|
|
|
|
|
hi everybody
im new to the windows programming
please let me know that how can i know whether my dll is registered or not.
and how can we know that in our system which dlls are registered and which are not.
i'm confident that there are lot of people who would help me out.
thanx a lot in advance.
|
|
|
|
|
Not all DLLs can be registered. Those that can will have exported DllRegisterServer() and DllUnregisterServer() functions.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
HI David
thanx for ur comment
but i want to know the utility which can give us the listing of the dlls which are registered with the system and which are not.
if there is any coding related to this please do let me know .
i know u would have the solution for this problem
thanx a lot
|
|
|
|
|
I have made a deque list of my class/structs
and it's working fine, all is fine exept one problem of me that I can not understnd or can not find....
I need to get a reference to an object inside my deque and keep that reference for doing thinks but when I do sort in deque this reference change.
For example.
(MyListToShow is my Deque)
(SendMe is my class to add)
Now I put it on my list
MyListToShow.push_back(SendMe);
Now I find the pointer to my last element on deque and save it eg to pointer [KeepMyRef]
Now I do sort the deque....
and now [KeepMyRef] is point to a diferent element.
How can I get a pointer to the same class - to the memory it self of my data ?
Thank you in advanced
Vini
|
|
|
|
|
Why are you using a deque?
Anyway your object has been moved into its sort position, so you cannot keep a reference to it. You could use a search algorithm to find it afterwards. But any iterator will be invalidated after another insert/delete/sort/etc.
It may be that a set or map is more suitable for your application. With those the iterator you get when you insert is valid until a further insertion/deletion/whatever.
Paul
|
|
|
|
|
Paul thank you for your replay.
I have also use the vector but is not solving my problem.
About [map] I didn't know it and now just read about.
What else do you suggest insted of deque ?
I use deque lists and vectors all the time to store informations data that I don't know from the begining the size.
I need to be sort them also.
Vini
|
|
|
|
|
vector is good to add/delete on the end, bad for the middle or beginning.
deque is good to add/delete on either end, bad for the middle.
map/set are good to add/delete anywhere (but slower than vector/deque) and maintain their contents already sorted so that you don't have to sort manually.
list is good to insert/delete anywhere but very bad to sort.
etc.
You have to make a decision based on your particular application. You might find looking in a good STL reference helps, I recommend the Josuttis book.
Paul
|
|
|
|
|
Paul thank you for the informations.
Vini
|
|
|
|
|
Hi there,
I've used CDHtmlDialog to show HTML documents on my program ...
Well, there is no problem in displaying HTML docs ...
I just have problem in HTML doc alignment in my dialog ...
Actually I want to put the HTML doc on center of my dialog !
I changed the dialog sizes to fullscreen ... Is there any way to refresh or resize html doc in the dialog ?
Plz help me !
Regards,
Hadi
|
|
|
|
|
I have got the following situation (VC6)
i have got two dll's each exporting functions like this
void fun1 (std::vector<int>& vec);
The calling function passes an empty vector.. it is filled in the dll.. and the dll passes the filled vector back.
One dll works perfectly fine. The other dll has got the following problem:
After leaving the function which called the dll - function (when the passed vector leaves the scope)
there is a runtime bug, which says that a debug assertation failed.. and that the following expression failed:
_CrtIsValidHeapPointer(pUserData)
One the one hand i do understand, why this could be (allocating memory in another process and freeing it in the other)..
but WHY does this technique work happily with one dll, and why not with the other dll ?
Any ideas ?
Thanks in advance,
bernhard
"Just looking for loopholes." W. C. Fields American actor, 1880-1946, explaining why he was reading the Bible on his deathbed.
|
|
|
|
|
link against the Multithreaded DLL Runtime Library.
|
|
|
|
|
I suspect that one DLL is linked against the static version of the C run-time library, but the other, and the program, against the DLL version. The version that works is linked against the DLL; the one that doesn't is linked with a static version.
Each time the C run-time is initialised (at program startup and at DLL initialisation, it creates a new operating system heap with HeapCreate . All allocations through the C run-time's allocation functions (malloc , ::operator new , calloc , realloc , etc) ultimately come from this heap using HeapAlloc /HeapRealloc - and all the deallocation functions pass this heap's handle to HeapFree .
Aside: on NT 4 and older, and on Win9x systems, the CRT manages small blocks of memory from a single OS heap allocation because the OS heap wasn't very efficient with small blocks on those operating systems. This was improved with Windows 2000 and the CRT uses the OS heap directly for all allocations on these systems.
If you're using the Debug version of the C run-time, when you free memory (which the destructor of vector does for you, using the allocator type parameter's deallocate function) the run-time checks that you passed a valid pointer using the _CrtIsValidHeapPointer function. It considers it invalid if HeapValidate returns FALSE , which will happen if the pointer came from a different heap.
Since you're passing an empty vector into the function, an allocation happens within the DLL, from the heap used by that DLL. The DLL version of the CRT will set up a single heap shared by all binaries using the DLL version, but each binary linked to the static CRT will have its own heap. The vector (assuming it's a local variable in the calling function) is destroyed at the end of the calling function, so deallocate gets called, which uses ::operator delete against the heap used by the executable. This is the wrong heap, so you get the assertion.
The fix is simple. All DLLs in the same process must link against the same C run-time DLL (a mixed process of some binaries linked with msvcrt.dll from VC 6 and some linked with msvcr70.dll or msvcr71.dll from VS.NET 2002 or 2003 will have similar problems). The alternative is to ensure that all allocations and deallocations happen within a particular DLL, and that objects never cross the boundaries.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|