Re: Problem with Registering filter on windows mobile
- From: "raj" <raja_t_123@xxxxxxxxxxxxx>
- Date: 1 Mar 2007 05:54:16 -0800
Dear Gary Daniels,
Thank you so much for looking at this issue. My problem has been
resolved. The fix is to modify C/C++ preprocessor definitions in the
visual studio project settings. i.e remove "_debug" & "debug" line
from preprocessor definition.
Regards,
On Mar 1, 5:21 am, "Gary Daniels [MS]" <gary...@xxxxxxxxxxxxxxxxxxxx>
wrote:
I was able to get this to work, here is what I found:
- same version of Visual Studio as you
- installed the WM5 PPC SDK from the microsoft web site, strmbase.lib,
mmtimer.lib, strmiids.lib are there
- used the WM5 emulator (note, it tried to default to the WM2003 emulator, i
had to select WM5, this won't work with WM2003)
- Added strmiids.lib, mmtimer.lib, strmbase.lib to the linker "additional
dependencies"
- Had to define the CLSID_NullRend guid (all 0's isn't valid)
- used retail settings. For debug "CBaseFilter::NonDelegatingRelease" is an
unresolved external because it's only defined in debug builds, but the SDK
doesn't come with the debug libraries. I'm not sure how you built as debug.
- Had to go into the project settings->C/C++->Lanugage-> turn off "Treat
wchar_t as Built-in Type". Without this were were 4 other unresolved
externals.
- modified the command line to do a regsvr on the dll
- i had some getprocaddress failures. I found that if i added a new .def to
the project using the visual studio wizard it worked, dragging and dropping
the .def file didn't seem to compile it into the project. I suspect this
isn't your problem since you're getting further than that.
- dll registration succeeded.
How did you work around the linker problems with strmbase.lib? Did you run
into the same problems when building debug? Other than the exception, is
there any other ways your experience different than my experience building
this?
BTW, the experience was much more difficult than I had expected, I'll get
the bugs filed so this becomes easier in the next release. I didn't expect
to have to turn off obscure langage settings and track down why it couldn't
link when debug. Also, I was unaware that the visual studio compiler has no
distinction between sourcelibs and target libs. In the Windows CE build
environment used in general embedded you must mark strmbase.lib as a source
lib, but that's not an issue in Visual Studio. I'm sorry if I confused you
by referring to sourcelibs, that was my own inexperience developing apps
under Visual Studio.
Gary Daniels
Windows CE Multimedia and Graphics
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
"raj" <raja_t_...@xxxxxxxxxxxxx> wrote in message
news:1172566907.880598.64180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have sent you the detail mail to your email id.
Using the following setup/tools to built DS filter for windows mobile
5.0.
- Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200)
- Windows Mobile 5.0 Pocket PC SDK:
- Strmbase.lib strmiids.lib are available in this.
- Default emulator - WM 5.0 which comes with Visual Studio.
- Using debug settings to build the project
Procedure to debug:
a) copy regsvrce.exe & NullRender.dll into `MyDevice` folder of
emulator
b) Right click the project and select property pages. it will open
up
the dialog.
c) Select "Debugging" and set Remote executable as "regsvrce" and
command argument is "NullRender.dll".
d) Keep the break point in DllRegisterServer function then press F5.
e) You will get a crash in Addref() function due to access
violations.
If possible can you please share your output dll for NULL Render. I
will try to register on my emulator and see whether it works fine for
me. You can send your dll to my email id which is mentioned in my
profile.
Thanks & Regards,
On Feb 27, 7:14 am, "Gary Daniels [MS]" <gary...@xxxxxxxxxxxxxxxxxxxx>
wrote:
I'm working on reproducing this problem, I haven't ever seen this problem
and have no guesses on the cause. I've contacted a few other people in
the
Multimedia team and they also aren't aware of any problems.
I'm assuming you're using visual studio with the PPC SDK. Is there
anything
you can tell me about the versions, QFE's, etc. of the tools you have
installed?
Thanks,
Gary Daniels
Windows CE Multimedia and Graphics
This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.
<jnanat...@xxxxxxxxx> wrote in message
news:1172486001.222387.117760@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear Gary,
I am also facing exactly the same issue as Suresh. Please help us
resolve this issue. I am explaining the issue again:
I tried to build your sample ( from the link:
http://groups.google.com/group/microsoft.public.smartphone.developer/...
) by creating a "Smart Device Win32 Dll application" (Windows Mobile
5.0 PPC). I created an empty project and added a .cpp and a .def file
and added the code you have given. When I try to register it (using
regsvrce), it fails at DECLARE_IUNKNOWN insided CNullRend Class
definition. When I replaced the DECLARE_IUNKNOWN macro with the
expansion:
STDMETHODIMP QueryInterface(REFIID riid, void **ppv) {
return GetOwner()->QueryInterface(riid,ppv);
};
STDMETHODIMP_(ULONG) AddRef() {
return GetOwner()->AddRef();
};
STDMETHODIMP_(ULONG) Release() {
return GetOwner()->Release();
};
I found that it fails at return GetOwner()->AddRef(); with the error:
"Unhandled exception at 0x013c12e0 in regsvrce.exe: 0xC0000005: Access
violation reading location 0x00000001."
The same is the case with any directshow filter I try to register on
WM5.0.
Please help! I am stuck with this problem for over a month :-(
Thank you- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
.
- References:
- Re: Problem with Registering filter on windows mobile
- From: Gary Daniels [MS]
- Re: Problem with Registering filter on windows mobile
- Prev by Date: Re: Problem with Registering filter on windows mobile
- Next by Date: Re: Simple custom filter crash (AddRef()) on Windows Mobile 5.0
- Previous by thread: Re: Problem with Registering filter on windows mobile
- Index(es):
Relevant Pages
|