Regsvr32 strange behaviour = > Regsvr32 does not give any success or failure message
Asked Answered
T

4

8

I have an directShow filter: MyFilter.ax

When I try to register MyFilter.ax with Regsvr32 utility it gives NO error or any message(success or failure). But the filter is not registered.

Regsvr32 utility works fine for my other filters.

Why Regsvr32 deoes not give any sucess or failure message? How can I debug my Regsvr32 failure-sucess? Any alternative utility for registering directshow filter which may give meaningfull message?

Best Wishes

Update:

I install clean win7 OS on a virtual machine. Then try to register.Fail again without no message-response from regsvr32.

But then install again a clean win7 OS on virtual machine. Then make all updates. And after i make updates regsvr32 worked and install my filter....I do not know what cause regsvr32 fail and what kind of update fix it. Or is it really an update issue...

Tinatinamou answered 10/8, 2011 at 20:31 Comment(0)
P
3

What can take place and exhibit the mentioned behavior is that somewhere in your filter you are in a dead loop, or infinite wait, so DLL's DllRegisterServer never returns. In this case, you will be able to see that each time you try regsvr32 Task Manager shows you one more regsvr32.exe running process, with or without CPU consumption.

If this is what you are having, you will want to attach with debugger and see where exactly you have dead loop there...

Pelagian answered 7/9, 2011 at 18:6 Comment(1)
I solve it. It seems that activex can not able to find a 3rd dll...But instead of saying gracefully, regsvr32 enter invalid state.. Debug does not give a valuable infoTinatinamou
E
2

Check that you don't invoke regsvr32 with /s option

Enchase answered 11/8, 2011 at 7:11 Comment(1)
no ... i do not invoke regsvr32 with silent mode /s. just use regsvr32 MyFilter.ax.Tinatinamou
U
1

You can implement an application like regsvr32 yourself, you just need to load your target dll and call the function DllRegisterServer. You could implement it in C# for example using the following p/invoke declaration:

[DllImport("yourdll.ax")]
private static extern int DllRegisterServer();

You might be able to narrow down the issue this way.

Update:

I would try installing Windows 7 Platform SDK and compiling your DirectShow filter against that. I have seen compatibility issues before with older versions of DirectX in Windows 7 (even missing dlls), although I did not keep the reference (if someone reading this has a reference please post it).

Unfold answered 11/8, 2011 at 17:28 Comment(4)
Well, i narrow down the issue. Debug regsvr32 with Dependency Walker. But gives no meaninfull log...It just get generic Acess Violation Error... My active x dll somehow does enter invalid state on some machines. But not all machines . I test it on Windows 7.Tinatinamou
Maybe you are trying to register a 32 bit dll in a 64 bit OS? If that is the case then you need to use c:\windows\syswow64\regsvr32.exe instead of c:\windows\system32\regsvr32.exeUnfold
Or you could be missing a dependency library, like vc-redist. Did you create this .ax file?Unfold
I create this filter file. There seems to be no missing library.If so regsvr32 will tell it.And No i use it on 32 bit OS. But i found other strange thing. I set up a clean win7 OS on virtual machine. Then try to register. It failes also without any mesage from regsvr32. But when i re-install OS again then make all updates then it worked...What kind of mising updates(if so) causes regsvr32 and my filter fail?Tinatinamou
C
1

I had this problem too and here is what I did to figure out what was wrong :

Set you dll as the startup project.
Go to configuration properties -> Debugging : Set Command to c:\windows\syswow64\regsvr32.exe(or the 32 bit version if you're on a 32 bits system in c:\windows\system32\regsvr32.exe)
Set the Command Arguments to the full path of your dll
Run in debug mode, you should see the popup that your dll is correctly registered, then the execution will hang.
Click to pause execution
Check in the Threads debug window and check what threads are currently active. Check their call stacks since most of the threads (in my case) are hung in ntdll.dll

Collettecolletti answered 7/12, 2012 at 19:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.