Re: Using same interfaces for in-proc vs. out-proc

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Igor Tandetnik" <itandetnik@xxxxxxxx> wrote in message
news:OOY9ENvZKHA.2184@xxxxxxxxxxxxxxxxxxxxxxx
Drew wrote:
I've set up a minimal example, minus the static LIB for the EXE. IOW,
source
for the COM part is in the same project as the rest of the EXE code. The
DLL
points to the same source as the EXE project for the COM portion of the
project. I can compile and link both projects but I'm unable to register
the
DLL. When I run it through Dependency Walker and profile it with regsvr32
I
get Error 0x80070716 "The specified resource name cannot be found in the
image file".

Find CAtlComModule::RegisterServer call (in a DLL project it's in
DllRegisterServer; in EXE, I don't remember off the top of my head). Pass
FALSE for the first parameter (the wizard-generated code passes TRUE). Since
you no longer bind a TLB as a resource, you can't register it this way.

The EXE registers fine and I'm able to use it from a VB
project.

Apparently, you still bind the TLB (which is now supposed to be standalone)
as a resource to your EXE. Check your .rc file.

Yes, that's true. I've removed the TYPELIB statement from both EXE and DLL
projects and registered the TLB using regtlib. I also removed the REGISTRY
statements from the RC files. Should I have? Anyway, I still have the same
problem. This works:

Dim myapp As COMServerALib.Application

Set myapp = New COMServerALib.Application

Dim name As String
name = myapp.name

This doesn't:

Dim myapp As COMServerALib.ApplicationX

Set myapp = New COMServerALib.ApplicationX ' ActiveX component can't
create object

Dim name As String
name = myapp.name

Any ideas?

Thanks again,
Drew


.



Relevant Pages

  • Re: Editors
    ... some strip them on exe files by default. ... "preferred base address" and, yup, relocations are completely ... DLL files, though, aren't loaded into their own address space but are ... EXE's "entry-point", though, is not "special" in that it's just an ...
    (alt.lang.asm)
  • Re: Accessing a DLL without registering it
    ... Why don't you just have your .EXE file register the as needed. ... I've written a custom DLL that I'm using within several new EXE's. ... to a DLL in an EXE that will first try to find the necessary DLL in the ...
    (microsoft.public.vb.general.discussion)
  • Re: DLL Vs. EXE?
    ... If it's an ActiveX EXE you still need to register, ... regsvr32 as you would with a dll. ... code with Shell and you would need to know it's path or ask user to find it ...
    (microsoft.public.excel.programming)
  • Re: DLL pass vector by value crash
    ... The prototype for testfunc is a by-value copy, so it has to make a copy of the value. ... Are you using static linking for either the .exe (if so, it probably won't work correctly, ... clearly using the shared CRT DLL for the DLL you are constructing. ... no crash occurs in either config. ...
    (microsoft.public.vc.mfc)
  • Re: DLL pass vector by value crash
    ... stack of the exe and may allocate default member element on the exe heap. ... If this is a dangerous situation, the simple app I set up calling testFunc() ... in a dll did not crash. ... msvcr90.dll!free and access the source code of free.c. ...
    (microsoft.public.vc.mfc)