PDA

Click to See Complete Forum and Search --> : Is this possible?


King_Tweaker
Jan 18th, 2003, 03:12 PM
What I want to do may be very advanced, maybe too advanced for me but I want to know if any of you guys think it is possible at all.

What I want to do is to know when windows is going to open a certain file when I know where that file is and its name. I want windows to open my file instead of the original file..

I imagine it could be done by replacing the path to the file in memory, or maybe something with pointers.

Is it possible before I go explaining what i want to do with it??

SteveCRM
Jan 18th, 2003, 03:46 PM
i know what you mean, yeah thats perfectly possible...Im not sure how to do it in C++, but I know in VB its pretty short code. I'd say do a search of the VB forums for...uh...something like File extensions, or making file extensions or something of the sort

:)

if I find anything I'll let you know

King_Tweaker
Jan 18th, 2003, 04:11 PM
Thanks but what I want is more than setting the file extensions.

Lets say I have a program whatever it may be. I want my program to know somehow that windows or the program, is reading the file c:\abc.def for example.

Instead of having windows or that program read that file, I want it to read my file instead say c:\mypersonal_abc.def.

I am not sure how it could be done. Is there a way to know when the windows file system is going to read a file, and to intercept it somehow. Or let windows or the program read the file, and change the file in memory to the contents of my file.

I really hope this is possible.

SteveCRM
Jan 18th, 2003, 06:24 PM
do you mean kind of what acrobat does? like when IE opens a pdf how acrobat kind of takes over in the reading? :confused:

King_Tweaker
Jan 18th, 2003, 08:41 PM
Not really.

Here is exactly what I am trying to do.

You probably know that most DVD discs have a set region on them, and things like macrovision. Each one being like only one byte inside in one file on the DVD Disc.

I know what exact files, and at what exact positions these informations are stored and I know how to change them so that DVDs from anywhere in the world can be played. There are already programs out there that do this but it has always amazed me how they do it.

On a DVD Disc, the D:\VIDEO_TS\VIDEO_TS.ifo file contains the region information. One byte in total.

So when a program goes to play the DVD it looks at this file to see. Now you can understand what I am trying to do. It is only with the help of experts like yourself, that I can do it.

parksie
Jan 19th, 2003, 01:41 PM
Originally posted by SteveCRM
do you mean kind of what acrobat does? like when IE opens a pdf how acrobat kind of takes over in the reading? :confused: No. IE loads part of the name, looks at the MIME type, and decides that Acrobat is the best program to use, so it asks Acrobat to load and display the file.

SteveCRM
Jan 19th, 2003, 02:01 PM
ah...cool :cool:

King_Tweaker
Jan 19th, 2003, 04:56 PM
Any ideas on how it could be done guys?

CornedBee
Jan 20th, 2003, 03:43 AM
Can't be done. Windows doesn't notify you of opening files. If you're wondering how region-code independent players work search for "DeCSS" on google.

King_Tweaker
Jan 20th, 2003, 04:26 AM
Well there are at least two programs that do it already.

One of them seems to have some sort of mechanism set up that even with itself closed totally, when a certain dvd program opens, they will start. I think they do something like create a virtual dvd drive of some sort.

CornedBee
Jan 20th, 2003, 08:05 AM
They might monitor a program startup, but they can't monitor file access.

Arawn
Jan 20th, 2003, 08:10 AM
Couldn't they do it if they wrote virtual device driver? I used to use a program that would monitor registry and file access, and I know at least the registry monitoring was done that way..

King_Tweaker
Jan 20th, 2003, 12:24 PM
Thanks guys.

Yes I think it does something like that.

Here is some text from inside one of the program (one that can do this) dlls.

{
DVDShell.DVDIdleShell.1 = s 'DVDIdleShell Class'
{
CLSID = s '{93994DE8-8239-4655-B1D1-5F4E91300429}'
}
DVDShell.DVDIdleShell = s 'DVDIdleShell Class'
{
CLSID = s '{93994DE8-8239-4655-B1D1-5F4E91300429}'
CurVer = s 'DVDShell.DVDIdleShell.1'
}
NoRemove CLSID
{
ForceRemove {93994DE8-8239-4655-B1D1-5F4E91300429} = s 'DVDIdleShell Class'
{
ProgID = s 'DVDShell.DVDIdleShell.1'
VersionIndependentProgID = s 'DVDShell.DVDIdleShell'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
'TypeLib' = s '{90406970-83F1-48F2-9226-3B09DE3F0E6A}'
}
}
}

HKLM
{
Software
{
Microsoft
{
Windows
{
CurrentVersion
{
Explorer
{
ShellExecuteHooks
{
ForceRemove val {93994DE8-8239-4655-B1D1-5F4E91300429} = s ''
}
}
}
}
}
}
}

That along with alot of garbage.

Not sure what that all means but thats directly from the dll viewed in notepad.

King_Tweaker
Jan 21st, 2003, 04:46 PM
So does anyone know how to create a Virtual Device Driver. I wonder would it allow me to do this?

CornedBee
Jan 22nd, 2003, 04:45 AM
Alll I know is that you must download the DDK from Microsoft.