Thanks, I've darkened the doors of several newsgroups on this one lately
with only slightly better understanding. To be clear on this thread, I'll
tell the whole story again for future generations.
There's a hidden/system/inROM dll on my new HP WM5 device. I have an
existing unmanaged C++ evc4.0 app that has always been able to use it on
earlier versions, though before it wasn't hidden/system. I wrote a very
simple 1-line unmanaged C++ app and small dll in evc4.0 to reproduce the
problem.
If my test.exe makes an instance of a class from my test dll I have that
exports a class (using CTest x = new CTest( ); ), it all runs fine on the
PDA, no warning messages. If instead I make it use the class I really want
from the now-hidden dll (CTarget x = new CTarget( ); ), I get this message:
"Test.exe cannot be opened. Either it is not signed with a trusted
certificate, or one of its components cannot be found."
It turns out there's a lot of postings about this exact message, but mostly
having to do with using Exchange Server on the PDA or more likely on
SmartPhone, or using PocketIE and SSL websites. In my case it's about
running a 1-line C++ app!
This tells me it's one of those 2 things (footnote to MS - why not just tell
me which it is!). To test the "not found" part, I made my test dll be
hidden/system (though I can't make it reside in ROM of course), but my test
app still works. So my feeling was, it's not the "not found" part of the
message. Else how could my little app load my hidden/system dll ok, but not
load a hidden/system/INROM dll? It's right there, it has a non-zero size,
etc as seen in Resco's file explorer.
Then I turned to the "not trusted" part, which is how this thread started.
It started dawning on me that if this was the culprit, it wasn't so much
that my app wasn't signed with the same cert as the target dll (and now I
think I've learned that's just not how certs work anyway, there's no
"matching" certs to let an exe be allowed to use a particular dll); it was
more that my app wasn't trusted at all, ie not signed with ANY trusted cert.
When I use signtool verify on the target dll, it in fact says it isn't
signed/trusted either, fwiw. So why would the OS suddenly require my app to
be trusted when loading the ROM dll, but not when loading my dll, and only
now on WM5 and not on earlier PocketPC versions?
Nonetheless, I tried to make my simple test app signed to run my test. What
I discovered was that you not only have to use makecert and signtool to sign
your app with a test cert (on the desktop), you also have to install both
your cert and the "Root Agency" cert which "issues" the test cert. That's
on the desktop, and I finally managed to get it to work such that afterward
a "signtool verify" operation says, yes my test app really is finally
authenticoded (there's 2 days I'll never get back). So far so good.
But that didn't ultimately help on the PDA - if I just copy the "signed"
test.exe app and run it, same error. I understand now that's because I need
to sign it with a cert issued by some issuer the PDA already knows about
(like Verisign or GTE); or, I have to do the equivalent of an install cert
of my test-issuer (Root Agency) which is not normally an issuer the PDA
knows about. I still don't know how to do that part at the moment. And I'm
really not interested in spending any money for a real cert that works (is
recognized) by the PDA. There's also talk on the newsgropus of a
"de-certifier app" for the PDA to basically turn off certification checks -
but there's not one for WM5, only for PPC2003. Or maybe the OEM is
controlling this and they won't let their users change this feature. So I'm
blocked at every turn for about a week now...
BUT - it could very well be that even if I have a legitimate signed test app
I might still get the message. Right now I'm looking around for a free cert
from an issuer recognized by WM5 on a PDA. But basically, I don't
understand which of the 2 options in the error message is the real cause,
and I've been trying to track it down systematically. And nobody can tell
me what could be causing it.
Note, I don't WANT to have to sign my actual production app. But it appears
I might have to just to access this ROM dll. Which I don't get.
Unlesss of course it's really the "not found" part after all.
Which I also don't get.
--
Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625