LockProfile of IStreamBufferSink

I am working timeshift function in Windows vista.

I have to use IStreamBufferSink::LockProfile function.

But it is failed in Windows Vista.

In DirectX C++ MSDN, it is written thatThis topic applies to Windows XP Service Pack 1 only.

How can I do for use LockProfile in Windows Vista?

Pls, help me.

[438 byte] By [jiwon] at [2007-12-24]
# 1

Wherever it says "This topic applies to [some version of Windows]" in the DirectShow documentation, it should really say "... or later." (We're trying to fix all of these instances in the docs.) If something is removed for Vista, it will be clearly marked as such.

Regarding LockProfile, as far as I know this function has not been removed or deprecated, and should still work.

-
Mike Wasson, DirectShow SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2006 Microsoft Corporation. All rights reserved.

MikeWasson-MSFT at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 2

Hi,

I met the same problem on Vista! The IStreamBufferSink::LockProfile() returns 0x80004005, which means "An unspecified failure has occured.". Could anyone kindly explain this issue? I use the latest Vista for test, somehow it just cannot work fine.

But I notice that MCE's time-shift function works well on Vista. why? why? why? Nothing is highlighted on DShow SDK, I totally follow what SDK says, and still cannot get it work.

Verna at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 3

Have you tried running the same code on xp?

LGS at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 4

Yes, the code runs successfully on XP.

But in vista, LockProfile function will fail....

Verna at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 5

Then it sounds like a vista issue. You should probably file a bug.

LGS at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 6
Had the same problem. It seems to be a permissions problem.
I ran the compiled app as administrator and it worked fine.
BionicDonkey at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 7

Thanks~

I've tried to run my ap as administrator and it works, just like you said.

Verna at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 8

I still say you should file a vista bug. Requiring people to be an admin to use SBE doesn't seem like a good plan. Especially given that vista doesn't want people running as admin in the first place.

LGS at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 9

You're right, it shouldn't be so. But I don't know how to file a vista bug...:P

And I think there should be some API to code our ap as admin ?

Verna at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 10

Anyone from MS to help on this issue I have the same problem?

Even if it's possible to force an app to run in admin mode this does not seem right.

maklouf at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 11

To my knowledge, no one from MS monitors this forum.

LGS at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 12
try SetNamespace(NULL); of IStreamBufferConfigure3 (new in vista)
worked for me...
Erkl?rb?r at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 13

Yeah, it looks like SetNamespace(NULL) is what you want. Apparently the "Global" namespace requires admin credentials in Vista (by design). I'll add this information to the docs.

-
Mike Wasson, DirectShow SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2007 Microsoft Corporation. All rights reserved.

MikeWasson-MSFT at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 14

soga...

but my project is old vc6 project, and there will be a lot of errors if I build with new sdk (for new sbe.h).........

so I think to just use "run as admin" will be fine....:~

Verna at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...

Software Development for Windows Vista

Site Classified