I have always presumed that it's possible to set things up so that strong-named .NET
assemblies signed by any entity in a list of "trusted entities" can be installed
(possibly into the GAC), even by users who do not have "administrator" rights. After
all, one idea behind strong-naming is that y
Pete
>If I do NOT use ClrCreateManagedInstance(), I would have to register the
Assembly, correct?
>And if I support custom or dual interfaces, I MUST use REGASM. Correct?
if you use cominterop, correct.
>But if I use ClrCreateManagedInstance(), this effectively replaces
You would have to place you
Beats me, Pete -- I'm just an idea man. Try it out, and let us know how
you fare...
But if you're worried about its undocumented nature, go ahead and write the
eextra few lines of code to call CorBindToRuntimeEx,
AppDomain.CreateInstance, etc. Same thing, pretty much -- no COM registry
lookups.
Shawn and Allan,
Re IDispatch and REGASM, you are probably right.
Let me see if I understand this.
If I do NOT use ClrCreateManagedInstance(), I would have to register the
Assembly, correct? How else could CoCreateInstance() create an instance of
the class?
And if I support custom or dual inter
Hi Pete,
>Keep in mind that the whole point of this exercise is to eliminate the
requirement to have Admin privileges
ok, I didn't follow the thread from the beginning I just jumped in on the
CCMI function, my mistake.
First a quick clarification on my useless sample: the
ClrCreateManagedInstance
Pete, what does supporting IDispatch have to do with RegAsm? You lost me on
that one.
I think Allan was showing off IDispatch specifically to support your
cant-create-any-regkeys requirement. If you asked for a custom interface,
it might need to be registered under HKCR/Interfaces, in order to s
Allan,
Thanks for the reply.
Keep in mind that the whole point of this exercise is to eliminate the
requirement to have Admin privileges for an installation (see original
post). If I understand your response, it seems to violate this requirement
on 2 accounts:
1) If I place an assembly in the GAC
Hi,
>>I can't use ClrCreateManagedInstance() since that would be used to
create COM objects in a managed DLL, and that is what > pDisp;
HRESULT hr = S_OK;
hr = ClrCreateManagedInstance(L"Namespace.SomeClass,Namespace,
Version=1.5.0.1, Culture=neutral,
PublicKeyToken=f09ae53443459c4e",IID_IDispatc
Shawn,
Thanks for the response.
Here is a quick update on what I've learned (very little). I was hoping to
avoid explicitly loading the CLR using CorBindToRuntimeEx() since the CLR
was implicitly loaded in the simple case. However, given that the code
blows up while trying to load all the .NET CL
I don't know what your immediate problem might be -- even trivial MC++
build problems make my head swim -- but have you considered skipping the
middleman (COM Interop) and simply hosting the CLR in your MFC app,
yourself? It's far, far easier than it sounds. Like, less than a dozen
lines of code.
I have to access some C# GUI code from a legacy (VC6.0) MFC GUI app. My
1st approach was to bridge the unmanaged/managed world with a COM-Callable
Wrapper (CCW) object. That worked great. Now management says we don't want
to require Admin privilges to install the code (the CCW requires REGASM to
cr
11 matches
Mail list logo