dlldata.c PROXY_FILE order 
Author Message
 dlldata.c PROXY_FILE order

ok,

I have 5 EXE components that all implement a unique interface and one called
IServerSetup, all 5 have a proxy/stub dll that i create and register

the 5 interfaces are defined in their own INameofInterface.idl file and
IServerSetup is in IServerSetup.idl

3 of the unique interfaces begin with things that make them come before
IServerSetup alphabeticaly, the last 2 do not.

this is the problem, for the last 2 EXTERN_PROXY_FILE and
REFERENCE_PROXY_FILE (in dlldata.c, generated by the midl compiler) list
IServerSetup first.  when the proxy/stub dll for the last 2 components is
registered it registers the UUID for IServerSetup under
HKCR\CLSID\{UUIDSTRING-for-ISERVERSETUP}this is causing some sort of
conflict when both components are used at the same time(in different or the
same program(s)) the second program to load throws an exception because
queryinterface returns interface not supported.

to get the second program to work, i have to shut down everything, recompile
and reregister both the exe and the proxy dll, then i can run the second
program, the one that was first previously then throws an exception.

the basic question is how can I make the MIDL compiler compile the second
IDL file first so the macros are in the correct order.

I used regmon.exe to track this down otherwise i would never have found it
myself.

marc britten



Mon, 27 Oct 2003 03:11:49 GMT  
 dlldata.c PROXY_FILE order
Ok, it has something to do w/ defining
PROXY_CLSID=7A7DAD06-81F9-4A87-BA58-CB5FC6B9D89B (and the other guid for the
second one) but i can't seem to get it to work right


Quote:
> ok,

> I have 5 EXE components that all implement a unique interface and one
called
> IServerSetup, all 5 have a proxy/stub dll that i create and register

> the 5 interfaces are defined in their own INameofInterface.idl file and
> IServerSetup is in IServerSetup.idl

> 3 of the unique interfaces begin with things that make them come before
> IServerSetup alphabeticaly, the last 2 do not.

> this is the problem, for the last 2 EXTERN_PROXY_FILE and
> REFERENCE_PROXY_FILE (in dlldata.c, generated by the midl compiler) list
> IServerSetup first.  when the proxy/stub dll for the last 2 components is
> registered it registers the UUID for IServerSetup under
> HKCR\CLSID\{UUIDSTRING-for-ISERVERSETUP}this is causing some sort of
> conflict when both components are used at the same time(in different or
the
> same program(s)) the second program to load throws an exception because
> queryinterface returns interface not supported.

> to get the second program to work, i have to shut down everything,
recompile
> and reregister both the exe and the proxy dll, then i can run the second
> program, the one that was first previously then throws an exception.

> the basic question is how can I make the MIDL compiler compile the second
> IDL file first so the macros are in the correct order.

> I used regmon.exe to track this down otherwise i would never have found it
> myself.

> marc britten



Mon, 27 Oct 2003 20:35:02 GMT  
 dlldata.c PROXY_FILE order
It seems you have some problems with who is marshaling what.
Each interface must be marshaled by exactly one proxy/stub DLL.
Then there will be no conflicts. Also, check that you have unique
IIDs everywhere.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> ok,

> I have 5 EXE components that all implement a unique interface and one
called
> IServerSetup, all 5 have a proxy/stub dll that i create and register

> the 5 interfaces are defined in their own INameofInterface.idl file and
> IServerSetup is in IServerSetup.idl

> 3 of the unique interfaces begin with things that make them come before
> IServerSetup alphabeticaly, the last 2 do not.

> this is the problem, for the last 2 EXTERN_PROXY_FILE and
> REFERENCE_PROXY_FILE (in dlldata.c, generated by the midl compiler) list
> IServerSetup first.  when the proxy/stub dll for the last 2 components is
> registered it registers the UUID for IServerSetup under
> HKCR\CLSID\{UUIDSTRING-for-ISERVERSETUP}this is causing some sort of
> conflict when both components are used at the same time(in different or
the
> same program(s)) the second program to load throws an exception because
> queryinterface returns interface not supported.

> to get the second program to work, i have to shut down everything,
recompile
> and reregister both the exe and the proxy dll, then i can run the second
> program, the one that was first previously then throws an exception.

> the basic question is how can I make the MIDL compiler compile the second
> IDL file first so the macros are in the correct order.

> I used regmon.exe to track this down otherwise i would never have found it
> myself.

> marc britten



Tue, 28 Oct 2003 01:57:56 GMT  
 dlldata.c PROXY_FILE order
you need to set PROXY_CLSID=IID_IWhatever on dlldata.c not on the _i.c's
like the examples i found showed after that(and deleting the old registry
data by unregisistering) it works fine


Quote:
> It seems you have some problems with who is marshaling what.
> Each interface must be marshaled by exactly one proxy/stub DLL.
> Then there will be no conflicts. Also, check that you have unique
> IIDs everywhere.

> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================



> > ok,

> > I have 5 EXE components that all implement a unique interface and one
> called
> > IServerSetup, all 5 have a proxy/stub dll that i create and register

> > the 5 interfaces are defined in their own INameofInterface.idl file and
> > IServerSetup is in IServerSetup.idl

> > 3 of the unique interfaces begin with things that make them come before
> > IServerSetup alphabeticaly, the last 2 do not.

> > this is the problem, for the last 2 EXTERN_PROXY_FILE and
> > REFERENCE_PROXY_FILE (in dlldata.c, generated by the midl compiler) list
> > IServerSetup first.  when the proxy/stub dll for the last 2 components
is
> > registered it registers the UUID for IServerSetup under
> > HKCR\CLSID\{UUIDSTRING-for-ISERVERSETUP}this is causing some sort of
> > conflict when both components are used at the same time(in different or
> the
> > same program(s)) the second program to load throws an exception because
> > queryinterface returns interface not supported.

> > to get the second program to work, i have to shut down everything,
> recompile
> > and reregister both the exe and the proxy dll, then i can run the second
> > program, the one that was first previously then throws an exception.

> > the basic question is how can I make the MIDL compiler compile the
second
> > IDL file first so the macros are in the correct order.

> > I used regmon.exe to track this down otherwise i would never have found
it
> > myself.

> > marc britten



Tue, 28 Oct 2003 04:06:50 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. MIDL won't generate dlldata.c

2. import idl file causing link error in dlldata.c

3. MIDL - _p.c and dlldata.c

4. dlldata.c missing

5. Warning C4047 building dlldata.c

6. Generating dlldata.c

7. STLPort and dlldata.c

8. byte order and bit order

9. Load order and DLL entry order of implicitly linked DLLs, Environment variables

10. High order/low order problem

11. Writting low-order or high-order bytes

12. Socket Program(Host Order/Network Order)

 

 
Powered by phpBB® Forum Software