[DUG] D2007 / cant save .tlb file - COM issue

Robert martin rob at wildsoft.co.nz
Wed Aug 1 10:56:58 NZST 2007


Let me get this straight. 

You cant use the auto-registration as it accesses the registry
You cant use RegSvr32 as it doesn't register exes.

How exactly is one supposed to register an exe that provides COM 
support?  Btw  The only machine in this equation that is Vista is my 
machine.  The other machines are all Win XP running in admin mode.

We have found an older copy of our software, that I assume has 
auto-registration turned on, as it does create the entries when run. 

I really want someone at Code gear to yell at !!!  This is my third day 
on this one issue,  I have work up the ying yang that I cant get done 
and I seem to find a new bug in D2007 every time I blink.

Angry Rob

(feels somewhat better now after venting !).




Rob Martin
Software Engineer

phone +64 03 377 0495
fax   +64 03 377 0496
web www.chreos.com

Wild Software Ltd



Myles Penlington wrote:
> The biggest issue with auto registration, is that it attempts to write
> to the registry, which a normal user esp. in Vista cannot do, this
> should be left to the installer really.
> Myles.
>
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
> On Behalf Of Robert martin
> Sent: Wednesday, 1 August 2007 09:40
> To: NZ Borland Developers Group - Delphi List
> Subject: Re: [DUG] D2007 / cant save .tlb file - COM issue
>
> Hi Myles (and others)
>
> I have had a break through this morning. 
> First, In answer to your questions Myles,
>
> The initialization of TAutoObjectFactory triggers fine.
> Could not find any reference to QueryInterface
>
> However We have foudn the root cause of the issue.
>
> On a machine where it works the registry entries for the GUI ID exist.  
> On others they don't.  On the machien that works if I run the app from a
>
> different Dir it still works.  If then rename the app in the dir 
> specified in the registry it stops working.
>
> This leads me to believe the following
>
> 1.  The app is no longer self registering / updating the registry
> 2.  When we manually add the registry entries it works correctly.
> 3.  Our Dlls probably work because they don't need the registry to ID 
> where the application is.
>
> Now to the fix
>
> I found an option in 'Project | Options | Linker' called 'Auto register 
> type library'  This was un-checked !  Checking it however gets me the 
> following error  when I compile...
>
> 'The Ole control does not support self-registration'.  I think If I can 
> get this going 'normal service' will resume :) 
>
> A web search on 'Auto register type library' returned to QC entries for 
> D 2006 (I believe, d10) where this was 'fixed'. 
>
> I think I am now dealing with a (obscure) Delphi bug, I will post a QC 
> entry.  Does anybody have any other suggestions?
>
> Thanks for all your help so far.
>
>
>
> Rob Martin
> Software Engineer
>
> phone +64 03 377 0495
> fax   +64 03 377 0496
> web www.chreos.com
>
> Wild Software Ltd
>
>
>
> Myles Penlington wrote:
>   
>> This is the crucial call, as this establishes the class factory that
>>     
> COM
>   
>> uses to create objects.
>>
>> You should prob also put a break point on your object constructor, and
>> on QueryInterface to see what Interface is being requested by COM.
>>
>> If you object is being created (i.e breakpoint hit in constructor),
>>     
> then
>   
>> half(most?) of the battle has been won, it then becomes a question of
>> what interface GUID is being requested.
>>
>> Myles.
>>
>> -----Original Message-----
>> From: delphi-bounces at delphi.org.nz
>>     
> [mailto:delphi-bounces at delphi.org.nz]
>   
>> On Behalf Of Robert martin
>> Sent: Tuesday, 31 July 2007 04:12
>> To: NZ Borland Developers Group - Delphi List
>> Subject: Re: [DUG] D2007 / cant save .tlb file
>>
>> Yup TLB says ChreosClient.
>>
>> Will try break point in morning.  Been dragged away :)
>>
>> Rob Martin
>> Software Engineer
>>
>> phone +64 03 377 0495
>> fax   +64 03 377 0496
>> web www.chreos.com
>>
>> Wild Software Ltd
>>
>>
>>
>> Myles Penlington wrote:
>>   
>>     
>>> That looks okay so far.
>>> Bring up the TLB editor, and the name at the top level needs to be
>>> "ChreosClient", so then to access it from Com it becomes something
>>>     
>>>       
>> like
>>   
>>     
>>> CreateActiveXObject( 'ChreosClient.Objectname');
>>>
>>> You should perhaps put a breakpoint on the TAutoObjectFactory.Create
>>>     
>>>       
>> for
>>   
>>     
>>> your classes to ensure this code is being executed and compiled. 
>>> e.g. should look something like this (for each com object).
>>>
>>> initialization
>>>   TAutoObjectFactory.Create(ComServer, TDBManager, Class_DBManager,
>>> ciMultiInstance, tmBoth);
>>>
>>>
>>> Myles.
>>>
>>> -----Original Message-----
>>> From: delphi-bounces at delphi.org.nz
>>>     
>>>       
>> [mailto:delphi-bounces at delphi.org.nz]
>>   
>>     
>>> On Behalf Of Robert martin
>>> Sent: Tuesday, 31 July 2007 03:10
>>> To: NZ Borland Developers Group - Delphi List
>>> Subject: Re: [DUG] D2007 / cant save .tlb file
>>>
>>> Yes, that sounds likely...  (this brings hope !)
>>>
>>> App name = ChreosClient
>>> Exe name = ChreosClient.exe
>>> Tlb = ChreosClient.tlb
>>>
>>>
>>> Where do i find internal name of tlb and progID  ???
>>>
>>> Thanks :)
>>>
>>>
>>>
>>> Rob Martin
>>> Software Engineer
>>>
>>> phone +64 03 377 0495
>>> fax   +64 03 377 0496
>>> web www.chreos.com
>>>
>>> Wild Software Ltd
>>>
>>>
>>>
>>> Myles Penlington wrote:
>>>   
>>>     
>>>       
>>>> It could be the issue though.
>>>>
>>>> What is the name of your tlb vs your project/exe name? 
>>>> Under D2007 they have to be the same (unlike D6/D7) - due to how the
>>>>     
>>>>       
>>>>         
>>> IDE
>>>   
>>>     
>>>       
>>>> now manages the files etc.
>>>> And the internal name of the tlb must also remain the same as the
>>>>       
>>>>         
>> exe,
>>   
>>     
>>>> and hence also the ProgID used to identify the com object may also
>>>>     
>>>>       
>>>>         
>>> have
>>>   
>>>     
>>>       
>>>> changed, which could explain the issues.
>>>>
>>>> Myles.
>>>>
>>>> -----Original Message-----
>>>> From: delphi-bounces at delphi.org.nz
>>>>     
>>>>       
>>>>         
>>> [mailto:delphi-bounces at delphi.org.nz]
>>>   
>>>     
>>>       
>>>> On Behalf Of Robert martin
>>>> Sent: Tuesday, 31 July 2007 02:46
>>>> To: NZ Borland Developers Group - Delphi List
>>>> Subject: Re: [DUG] D2007 / cant save .tlb file
>>>>
>>>> Thanks
>>>>
>>>> Thats not the same issue I have. Oh well.
>>>>
>>>> Rob Martin
>>>> Software Engineer
>>>>
>>>> phone +64 03 377 0495
>>>> fax   +64 03 377 0496
>>>> web www.chreos.com
>>>>
>>>> Wild Software Ltd
>>>>
>>>>
>>>>
>>>> Jeremy North wrote:
>>>>   
>>>>     
>>>>       
>>>>         
>>>>>> Anyway I was searching for help and found a web site that had a
>>>>>>           
>>>>>>             
>> link
>>   
>>     
>>>>>>       
>>>>>>         
>>>>>>           
>>>>>>             
>>>> to QC
>>>>   
>>>>     
>>>>       
>>>>         
>>>>>> 42627
>>>>>>
>>>>>> ActiveX->IDE->Implementation file management
>>>>>>
>>>>>> TLB is not renamed if project that contains a TLB is renamed using
>>>>>>       
>>>>>>         
>>>>>>           
>>>>>>             
>>>> save as.
>>>>   
>>>>     
>>>>       
>>>>         
>>>>>>     
>>>>>>       
>>>>>>         
>>>>>>           
>>>>>>             
>>>>> It may have crashed because the report _was_ private and you didn't
>>>>> have access to it. I've made the report public, so you should be
>>>>>         
>>>>>           
>> able
>>   
>>     
>>>>> to see it now.
>>>>>
>>>>> Report No: 42627 (RAID: 248075)          Status: Open
>>>>> TLB is not renamed if project that contains a TLB is renamed using
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> save as.
>>>>   
>>>>     
>>>>       
>>>>         
>>>>> http://qc.codegear.com/wc/qcmain.aspx?d=42627
>>>>>
>>>>> Let me know if you can't.
>>>>> _______________________________________________
>>>>> NZ Borland Developers Group - Delphi mailing list
>>>>> Post: delphi at delphi.org.nz
>>>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>>>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> Subject: unsubscribe
>>>>   
>>>>     
>>>>       
>>>>         
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> _______________________________________________
>>>> NZ Borland Developers Group - Delphi mailing list
>>>> Post: delphi at delphi.org.nz
>>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>>>>     
>>>>       
>>>>         
>>> Subject:
>>>   
>>>     
>>>       
>>>> unsubscribe
>>>>
>>>> Attention:
>>>> This communication is confidential and may be legally privileged.
>>>>         
> If
>   
>>>>     
>>>>       
>>>>         
>>> you are not the intended recipient, please do not use, disclose, copy
>>>     
>>>       
>> or
>>   
>>     
>>> distribute it, other than to return it to us with your confirmation
>>>     
>>>       
>> that
>>   
>>     
>>> it has been deleted from your system.
>>>
>>>   
>>>     
>>>       
>>>> _______________________________________________
>>>> NZ Borland Developers Group - Delphi mailing list
>>>> Post: delphi at delphi.org.nz
>>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>>>>     
>>>>       
>>>>         
>>> Subject: unsubscribe
>>>   
>>>     
>>>       
>>>>   
>>>>     
>>>>       
>>>>         
>>> _______________________________________________
>>> NZ Borland Developers Group - Delphi mailing list
>>> Post: delphi at delphi.org.nz
>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>>>     
>>>       
>> Subject:
>>   
>>     
>>> unsubscribe
>>>
>>> Attention:
>>> This communication is confidential and may be legally privileged.  If
>>>     
>>>       
>> you are not the intended recipient, please do not use, disclose, copy
>>     
> or
>   
>> distribute it, other than to return it to us with your confirmation
>>     
> that
>   
>> it has been deleted from your system.
>>
>>   
>>     
>>> _______________________________________________
>>> NZ Borland Developers Group - Delphi mailing list
>>> Post: delphi at delphi.org.nz
>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>>>     
>>>       
>> Subject: unsubscribe
>>   
>>     
>>>   
>>>     
>>>       
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at delphi.org.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>>     
> Subject:
>   
>> unsubscribe
>>
>> Attention:
>> This communication is confidential and may be legally privileged.  If
>>     
> you are not the intended recipient, please do not use, disclose, copy or
> distribute it, other than to return it to us with your confirmation that
> it has been deleted from your system.
>
>   
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at delphi.org.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>>     
> Subject: unsubscribe
>   
>>   
>>     
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
> Attention:
> This communication is confidential and may be legally privileged.  If you are not the intended recipient, please do not use, disclose, copy or distribute it, other than to return it to us with your confirmation that it has been deleted from your system.
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>   


More information about the Delphi mailing list