TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Main TiVo Forums > TiVo Home Media Features & TiVoToGo
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 08-08-2007, 03:24 AM   #31
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
I don't know how C# works, but in C++ you have the option of compiling the entire project as either multi-byte or unicode. Do you have such an option? If so try turning it over to multi-byte mode and see what happens.

Other then that I'm stumped. I tested it in the MS ActiveX test container and it properly grabs the XML string, so something is happening when you're pulling it into your C# project.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-08-2007, 12:26 PM   #32
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Dan,

Any chance you could do a version of your .ocx that returns UniCode strings? I've searched a lot and can't find anything to help here.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-08-2007, 05:33 PM   #33
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
Crap I know what's wrong! It has nothing to do with unicode/multi-byte. I have my MAK hard coded into the ocx. Your MAK obviously doesn't match, so you're getting a trashed response. I'm fixing it now and will post a new version in a few minutes.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-08-2007, 06:15 PM   #34
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
OK I uploaded a new version. This one now takes two arguments for each function. The file path and the MAK.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-08-2007, 07:55 PM   #35
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Hmmm... I wiped the first .ocx from my system (unregistered it) and removed it from my C# project, then put in the new version making sure it was the only .ocx of that name. Registered it and hooked to my program -- all went as before.

Only problem is the functions still only take one argument (??). This shows in the prototypes that automatically show up as "hints" and they will only compile if I just pass one string argument.

I downloaded from the same link you gave before. Also did a binary file comparison of the two .ocx versions and they are different.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-09-2007, 02:46 AM   #36
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
There may be something in your C# project. In C++ when you import an ActiveX control it creates a header file with prototype functions for what's in the control. From then on if you make any changes to the ActiveX control you have to remove all references to it and delete the header file before it will recreate it with the new prototype functions.

Alternative you can simply find the prototype functions and update them manually. The structure of the functions are exactly the same except they now take one more string argument.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-09-2007, 12:51 PM   #37
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Quote:
Originally Posted by Dan203
There may be something in your C# project. In C++ when you import an ActiveX control it creates a header file with prototype functions for what's in the control. From then on if you make any changes to the ActiveX control you have to remove all references to it and delete the header file before it will recreate it with the new prototype functions.

Alternative you can simply find the prototype functions and update them manually. The structure of the functions are exactly the same except they now take one more string argument.

Dan
You are correct -- I created a new test C# project on another computer and hooked in your control -- and the prototypes are correct now. So there is something from the old .ocx still stuck in my project even though I hunted down everything I could think of and removed it.

I removed the control from the new test project and I notice there are still two .dll files with "TivoMetaDecode" as part of their names and a file named "<project name>.csproj.ResolveComReference.cache" in the bin\debug directory. I assume C# created these automatically because I know they didn't come from your download and I know I didn't create them. I suspect these must be deleted before hooking in the new .ocx version. No suspicious header files are to be found but I think C# just stores the info a different way.

It will be a few hours before I can apply this knowledge to the TVAP project since I'm at a different location at the moment.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-09-2007, 10:28 PM   #38
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
DVR-MS metadata coming soon!

Dan, your TivoMetaData component works great! I have all the pieces demonstrated now to get metadata from TiVo files and put it in DVR-MS files.

I'm planning on the items discussed in the VRD help for the panel on "MCE/DVR-MS Output". If you or anyone else has any suggestions on what other items should be included, just let me know.

I'll also need to have the program ask for the MAK upon initial startup then save it in its XML configuration file. (I don't see the MAK in the registry anywhere -- if anyone knows where to get it let me know.)

Thanks!
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-10-2007, 12:55 AM   #39
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
The MAK in the registry is encrypted, so you'll need to collect it yourself.

I'm glad it's working out. I look forward to trying it out once you get it working.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-15-2007, 12:24 AM   #40
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Tvap 0.36

Two major enhancements:

1. Reads metadata from TiVo files. (Title, Subtitle, Description, Genre and Recording Time/Date for now.) You can see it by right-clicking on a file name and it is automatically inserted into DVR-MS output files.

2. Comes in a Windows installer package now.

Thanks to Dan203 for the ActiveX component (TivoMetaDecode.ocx) that reads the metadata from the TiVo files.

Note: The metadata is read when the tivo file is initially detected by TVAP and is stored in its XML file. This means the XML format changed and your previous XML files will be invalid so TVAP will force a cold startup where you have to set your default options and destination directories. It will also ask you to enter your MAK since that is needed to read the TiVo metadata. (See readme for more details.)
The MAK is also stored in the XML file which is another reason your current XML file is invalid and a cold start is needed (sorry!)

ftp://upload:upload@videoredo.net/VR...AutoProcessor/
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-15-2007, 01:55 AM   #41
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
FYI if you will be using this on Windows Vista and you have UAC enabled then you will need to run TVAP as an administrator or output as DVR-MS will fail.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-15-2007, 03:04 AM   #42
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
I just committed a new module to tivodecode CVS called tivocom, which so far just provides access to file metadata, and also to get and set the MAK in the registry that Tivo Desktop uses. It is not based on Dan203's code at all, it is written in ATL instead of MFC, and has what I hope is a powerful, fairly well thought out interface which does not hide any available data from the consumer of the interfaces.

Please let me know what you think of it. You will need to check out both tivodecode and tivocom, and open the .sln in Visual Studio 2005 (express will not work for ATL, but then it would not have worked for MFC either).

CVS instructions are available at the following URL in case you are not familiar with it:
http://sourceforge.net/cvs/?group_id=183716

I could also put a binary up somewhere if you would prefer.
FrooBrar is offline   Reply With Quote
Old 08-15-2007, 12:51 PM   #43
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Vista ?

Quote:
Originally Posted by Dan203
FYI if you will be using this on Windows Vista and you have UAC enabled then you will need to run TVAP as an administrator or output as DVR-MS will fail.

Dan
So Dan, do I correctly infer from this that it does run on Vista, at least for you?

(That would be good news to me. As I state in the readme, I don't run Vista, so can't test on that OS.)
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-15-2007, 01:42 PM   #44
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Quote:
Originally Posted by FrooBrar
I just committed a new module to tivodecode CVS called tivocom, which so far just provides access to file metadata, and also to get and set the MAK in the registry that Tivo Desktop uses. It is not based on Dan203's code at all, it is written in ATL instead of MFC, and has what I hope is a powerful, fairly well thought out interface which does not hide any available data from the consumer of the interfaces.

Please let me know what you think of it. You will need to check out both tivodecode and tivocom, and open the .sln in Visual Studio 2005 (express will not work for ATL, but then it would not have worked for MFC either).

CVS instructions are available at the following URL in case you are not familiar with it:
http://sourceforge.net/cvs/?group_id=183716

I could also put a binary up somewhere if you would prefer.
First, thanks for your TiVoDecode efforts!

This is very interesting -- I will look at it. I have built the TiVoDecode 0.2Pre3 .sln in VS2005 and actually fixed a small bug that was preventing it from reading the MAK file (a '\' vs. '/' problem in the file path).

It would be nice to improve 3 aspects in TVAP over what is involved in using the Dan203 ActiveX control:

1. I have to parse the xml string (not really a big deal).
2. I have to deploy and install 2.6MB of VS2005 C++ CRT as part of my installation package.
3. User has to enter MAK.

I'm wondering about the deployment dependencies of your module. From the VS2005 help it appears there are options that vary from no dependency on the CRT runtime to complete dependency.

You might want to update the link to the CRT redistributable in your TivoDecode web page to point to the VS2005 SP1 version. The .ocx from Dan203 will not register with the older version you link to (which has exactly the same file name just to keep things confusing). This kind of hassle is another reason for wanting to eliminate that dependency.

It would be interesting to see if a binary of your module can be linked into my C# program in the normal (very easy) way that COM objects are handled.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-15-2007, 04:11 PM   #45
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
Quote:
Originally Posted by dlfl
So Dan, do I correctly infer from this that it does run on Vista, at least for you?

(That would be good news to me. As I state in the readme, I don't run Vista, so can't test on that OS.)
Yeah it seems to work fine on Vista, except that VRD has to be run in admin mode for DVR-MS output to work. And since you're using COM, that means VRD inherits the permissions of your program, which means you have to run TVAP in admin mode for the DVR-MS output mode to work through that.

One small complaint... The minimize button in the dialog doesn't work. You shoulw reenable it, catch the event it produces and use that to invoke your minimize to tray function. That is common design for an app that minimizes to the tray.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-15-2007, 04:16 PM   #46
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
Quote:
Originally Posted by FrooBrar
I just committed a new module to tivodecode CVS called tivocom, which so far just provides access to file metadata, and also to get and set the MAK in the registry that Tivo Desktop uses. It is not based on Dan203's code at all, it is written in ATL instead of MFC, and has what I hope is a powerful, fairly well thought out interface which does not hide any available data from the consumer of the interfaces.

Please let me know what you think of it. You will need to check out both tivodecode and tivocom, and open the .sln in Visual Studio 2005 (express will not work for ATL, but then it would not have worked for MFC either).

CVS instructions are available at the following URL in case you are not familiar with it:
http://sourceforge.net/cvs/?group_id=183716

I could also put a binary up somewhere if you would prefer.
Very cool! My control was very quickly hacked together based on some MFC source I used to test the XML output capabilities of tivodecode a few months back. I didn't have a lot of time to put into it, so I just threw something together. This will be a nice addition to the project as it will allow better expansion when future additions are made to tivodecode. (like the ability to save modified XML back to the file )

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-15-2007, 08:00 PM   #47
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Quote:
Originally Posted by Dan203
Yeah it seems to work fine on Vista, except that VRD has to be run in admin mode for DVR-MS output to work. And since you're using COM, that means VRD inherits the permissions of your program, which means you have to run TVAP in admin mode for the DVR-MS output mode to work through that.

One small complaint... The minimize button in the dialog doesn't work. You shoulw reenable it, catch the event it produces and use that to invoke your minimize to tray function. That is common design for an app that minimizes to the tray.

Dan
Maybe I could have TVAP detect whether it's in admin mode and disable the DVR_MS output choice with a message to the user. (?)

Your "small complaint" refers to the MAK dialog staying up if the program is minimized, correct? (Never thought to test that.) BTW that "dialog" is actually a custom designed form -- I could find no ready-made dialog for text entry in C#, which amazes me since Borland Builder C++ had such things long ago!

Thanks,
Dave
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-15-2007, 09:24 PM   #48
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
No. I'm talking about the main dialog. At least in Vista the minimize button does not work at all. It doesn't even highlight. It's like it's disabled.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-16-2007, 01:44 AM   #49
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
This is very interesting -- I will look at it. I have built the TiVoDecode 0.2Pre3 .sln in VS2005 and actually fixed a small bug that was preventing it from reading the MAK file (a '\' vs. '/' problem in the file path).
Please let me know what exactly you needed to change so I can fix it for the next version.

Quote:
Originally Posted by dlfl
It would be nice to improve 3 aspects in TVAP over what is involved in using the Dan203 ActiveX control:

1. I have to parse the xml string (not really a big deal).
I have no plans to do anything about this. I consider it beyond the scope of the tivodecode project

Quote:
Originally Posted by dlfl
2. I have to deploy and install 2.6MB of VS2005 C++ CRT as part of my installation package.
I have removed this requirement in current CVS.

Quote:
Originally Posted by dlfl
3. User has to enter MAK.
The COM interface I have made allows both getting and setting the MAK that TiVo Desktop uses in the registry (it's in HKEY_CURRENT_USER, so per-user).

Use the mak property on the TivoDecode object to get and set this MAK.

You can call the OpenTivoFile method on the TivoDecode object to get an object which implements ITivoFile, which has a mak property you can set to override the TiVo Desktop mak if you want to use a different mak, or if one is not set in the registry. Make sure to set this BEFORE getting the chunks property from the ITivoFile interface.

Quote:
Originally Posted by dlfl
I'm wondering about the deployment dependencies of your module. From the VS2005 help it appears there are options that vary from no dependency on the CRT runtime to complete dependency.
I have switched the projects in CVS to use static linking of CRT, so there should be no more dependency beyond standard Windows DLLs. The tivocom project is also statically linked both with CRT and ATL, so no additional dependencies there.

Quote:
Originally Posted by dlfl
You might want to update the link to the CRT redistributable in your TivoDecode web page to point to the VS2005 SP1 version.
Done.

Quote:
Originally Posted by dlfl
The .ocx from Dan203 will not register with the older version you link to (which has exactly the same file name just to keep things confusing). This kind of hassle is another reason for wanting to eliminate that dependency.
Got to love Microsoft...

Quote:
Originally Posted by dlfl
It would be interesting to see if a binary of your module can be linked into my C# program in the normal (very easy) way that COM objects are handled.
I don't see why it would not.

I put a binary up temporarily at http://tivodecode.sourceforge.net/tivocom/tivocom.zip for you to try. I also included the .PDB file in case you have any crashes, you can get a helpful stack trace from the debugger for me at least
FrooBrar is offline   Reply With Quote
Old 08-17-2007, 05:33 AM   #50
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
@FrooBrar

I've been experimenting with your binary with mostly good results. No problem importing it into C# with an automatically produced Interop wrapper DLL. The first thing I did was create a TivoDecodeClass object and attempt to get the MAK. This threw an "Invalid Data" exception and the MAK was null. However I found I could set the MAK with that object and after that all was OK. After setting it once:

1. I could get it.
2. I could get the chunks.
3. I could unregister then reregister tivocom.dll and it was still OK. (I could get the MAK without setting it first.)
4. I could shut down the program and restart and it still could get the MAK.

I found exactly the same behavior on another computer that doesn't have the VS2005 on it. I haven't looked at your code yet but I wonder how it's getting the MAK after setting it once whereas it couldn't get it the first time? I've looked at everything with "tivocom" in it in the registry and find nothing resembling a MAK, either plain text or encoded.

Could it be that something in the encryption stuff gets properly initialized when I set the MAK so that it then works OK after that?


On the MAK file thing, the change I made was near the top of tivodecode.c:

Code:
static const char MAK_DOTFILE_NAME[] = "\\tivodecode_mak";
The two backslashes replace '/.' . I determined this by tracing.

Sure would love to have it get the MAK so the user wouldn't have to enter it in TVAP! Any ideas?
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-17-2007, 11:58 AM   #51
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
The first thing I did was create a TivoDecodeClass object and attempt to get the MAK. This threw an "Invalid Data" exception and the MAK was null. However I found I could set the MAK with that object and after that all was OK. I haven't looked at your code yet but I wonder how it's getting the MAK after setting it once whereas it couldn't get it the first time? I've looked at everything with "tivocom" in it in the registry and find nothing resembling a MAK, either plain text or encoded.
The MAK is stored in the same place/way as TiVo Desktop does it. The specific registry location is HKEY_CURRENT_USER\Software\TiVo\SharingKeys, and the value which it reads should be type REG_BINARY named "TiVoToGo Media". I have only tested this against TiVo Desktop version 2.2 (yes, I know, old), please check what this key looks like when you get the Invalid data exception and let me know. If I had to bet, TiVo changed how they stored the MAK in the registry, or at least the value type, as the ATL registry access wrappers will throw an invalid data error (or something like that) if the reg value does not match what I asked for.

Quote:
Originally Posted by dlfl
On the MAK file thing, the change I made was near the top of tivodecode.c:

Code:
static const char MAK_DOTFILE_NAME[] = "\\tivodecode_mak";
The two backslashes replace '/.' . I determined this by tracing.
I will look into this. This will not work as-is as it will break *NIX.

Last edited by FrooBrar : 08-17-2007 at 12:00 PM. Reason: forgot to get tivo desktop version tested against
FrooBrar is offline   Reply With Quote
Old 08-17-2007, 01:08 PM   #52
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Quote:
Originally Posted by FrooBrar
The MAK is stored in the same place/way as TiVo Desktop does it. The specific registry location is HKEY_CURRENT_USER\Software\TiVo\SharingKeys, and the value which it reads should be type REG_BINARY named "TiVoToGo Media". I have only tested this against TiVo Desktop version 2.2 (yes, I know, old), please check what this key looks like when you get the Invalid data exception and let me know. If I had to bet, TiVo changed how they stored the MAK in the registry, or at least the value type, as the ATL registry access wrappers will throw an invalid data error (or something like that) if the reg value does not match what I asked for.
.............
I'll take a closer look at this (don't have access to the computers at the moment).
I've found the binary keys where you say they are -- can't swear to the exact registry key name. However I've done things like use your object to set the MAK to an invalid value and have seen the registry values change and WMP would then no longer play the .tivo files (until I used your object to set the MAK back correctly). I note there are TWO seemingly identical binary keys in that part of the registry (can't remember their exact names without looking but I think one has "media" in the name and the other has "tivoToGo"). I wonder if that is a difference from 2.2 ?

One possible hitch in further testing is that once I set the MAK correctly via your object, the problem cannot be duplicated on that computer (even if you unregister/reregister tivocom.dll and/or restart my program). It suggests that tivocom is storing this number some other non-volatile place, e.g., in the registry, that survives through unregistration (?).

Another thought is the MAK encryption has changed for the later versions of Desktop (I'm using 2.3 BTW) but they are still backwards compatible with the older encryptions (?). (Thus when the MAK is set via your object the binary value actually changes but can still be decoded by the TiVo software.) A way to test this would be to re-enter the MAK in desktop then see if the "get" problem reappears for tivocom.

All in all I'm encouraged that this seems to be the only hitch in using your binary!
I haven't tested it for dependency on the VS80CRT runtime but from what you say there shouldn't be any.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-17-2007, 06:36 PM   #53
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,949
The MAK is still stored under HKEY_CURRENT_USER\Software\TiVo\SharingKeys. Perhaps just the key name has changed? In 2.5 they are labeled...

TiVoToGo Media
TiVoToGo Metadata

If that's not it then it's possible TiVo changed how the key is stored. I know somewhere around here someone mentioned that they were encrypted and required some sort of built in Windows encryption service to be running to properly store and retrieve the key. This change may have come about when TiVo moved away from the password system.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 08-17-2007, 07:51 PM   #54
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
@FrooBrar, Dan203

Quote:
Originally Posted by Dan203
The MAK is still stored under HKEY_CURRENT_USER\Software\TiVo\SharingKeys. Perhaps just the key name has changed? In 2.5 they are labeled...

TiVoToGo Media
TiVoToGo Metadata

.........
Dan
The key names are the same in Ver. 2.3 . I pm'ed you guys with some interesting info about this behavior, including registry dumps of the keys, and my MAK. The binary keys are different depending on whether set in DeskTop or by the TiVoCom dll.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-18-2007, 01:08 AM   #55
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by Dan203
The MAK is still stored under HKEY_CURRENT_USER\Software\TiVo\SharingKeys. Perhaps just the key name has changed? In 2.5 they are labeled...

TiVoToGo Media
TiVoToGo Metadata

If that's not it then it's possible TiVo changed how the key is stored.
I bet they changed the entropy parameter to the CryptProtectData function

Quote:
I know somewhere around here someone mentioned that they were encrypted and required some sort of built in Windows encryption service to be running to properly store and retrieve the key.
Yep, CryptProtectData and CryptUnprotectData. See MSDN for details on these functions.

Quote:
Originally Posted by Dan203
This change may have come about when TiVo moved away from the password system.
Nope, the version of the TiVo Desktop I have doesn't have the password.

I guess it is time to download 2.5 and step through the setting of the MAK again...
FrooBrar is offline   Reply With Quote
Old 08-18-2007, 03:47 AM   #56
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by FrooBrar
I bet they changed the entropy parameter to the CryptProtectData function

I guess it is time to download 2.5 and step through the setting of the MAK again...
I downloaded 2.5 and set a breakpoint on CryptProtectData, and that's exactly what they did. They changed the entropy for the Media key to match the Metadata key. I am guessing that when they had a password, they used that as the entropy. When they first removed the password dialog, they just hacked it out and set the entropy to the empty string (ie, empty password). Then, they noticed that and decided that wasn't such a good idea, when they already had a seperate entropy value they were using for the Metadata key, so they started using that instead, falling back to the old format when reading in case someone upgraded from an older version of TiVo Desktop without resetting their MAK.

I just uploaded a new version of the DLL (same url as before) which tries to read the new format first, then falls back to the old format on the INVALID_DATA error. The setting of the MAK still uses the old format, as both old and new TiVo Desktop versions support this format, while only new versions would support the new format.

Please try it out and let me know how it works for you.
FrooBrar is offline   Reply With Quote
Old 08-18-2007, 11:50 AM   #57
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Quote:
Originally Posted by FrooBrar
........
I just uploaded a new version of the DLL (same url as before) which tries to read the new format first, then falls back to the old format on the INVALID_DATA error. The setting of the MAK still uses the old format, as both old and new TiVo Desktop versions support this format, while only new versions would support the new format.

Please try it out and let me know how it works for you.
Thanks, this seems to work perfectly. Can get or set MAK as desired.

I discovered the encrypted MAK in the registry varies each time you set it via DeskTop. A (random) time value must be used as part of the encryption key (?).
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-18-2007, 12:02 PM   #58
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Quote:
Originally Posted by Dan203
Yeah it seems to work fine on Vista, except that VRD has to be run in admin mode for DVR-MS output to work. And since you're using COM, that means VRD inherits the permissions of your program, which means you have to run TVAP in admin mode for the DVR-MS output mode to work through that.

One small complaint... The minimize button in the dialog doesn't work. You shoulw reenable it, catch the event it produces and use that to invoke your minimize to tray function. That is common design for an app that minimizes to the tray.

Dan
The minimize button will be fixed in the next version.

Regarding Vista permissions, it looks like it's possible to detect the user access level and also to prompt the user to "elevate" TVAP and its child processes to Admin on Vista. (Apparently Vista by default doesn't assign admin privileges to the program even when launched by an admin user, correct?)

The "elevation prompt" feature requires embedding a manifest in the program but that doesn't look too difficult. In either case DVR-MS functions will have to be turned off if the admin privileges aren't present or obtained via elevation.

Comments? Suggestions?
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by dlfl : 08-18-2007 at 12:11 PM.
dlfl is offline   Reply With Quote
Old 08-18-2007, 10:27 PM   #59
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,090
Need a Vista test please!

Can someone running Vista with admin privileges and with UAC enabled (the default I believe) run the attached test program and let me know what happens?

What should happen is a Windows prompt should appear saying an unknown program wants to run and the choices are "allow" or "cancel". If you allow it to run a little window should say "Running with admin privileges". If you cancel I assume it just doesn't run the program.

If the program does run but doesn't acquire admin privileges the window will say "No admin privileges !"

Also, if someone has a PC running XP and can run this from an account that doesn't have admin privileges I would appreciate knowing what that does too.

Thanks!
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by dlfl : 11-16-2010 at 08:29 AM.
dlfl is offline   Reply With Quote
Old 08-18-2007, 10:41 PM   #60
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
Can someone running Vista with admin privileges and with UAC enabled (the default I believe) run the attached test program and let me know what happens?
The attached images... If you cancel the UAC prompt, then the program does not run.
Attached Images
File Type: png testuac_admin.png (4.8 KB, 13 views)
File Type: png testuac_prompt.png (32.6 KB, 14 views)
FrooBrar is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 06:48 PM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |