|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to obtain the new GUIID key on a new build of an ActiveX DLL or an ActiveX OCXI have a couple of VB6 projects, okay a few. If I create a standard executable project and include in them an ActiveX DLL that I created in another project an an ActiveX control that I created in yet another project, I would wind up with a VB6 project file with something that looks as follows: Type=Exe Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\..\..\..\WINDOWS\system32\stdole2.tlb#OLE Automation Reference=*\G{3F4DACA7-160D-11D2-A8E9-00104B365C9F}#5.5#0#..\..\..\..\..\..\..\..\..\..\WINDOWS\system32\vbscript.dll\3#Microsoft VBScript Regular Expressions 5.5 Reference=*\G{BCDB2FC2-EF8C-45C9-BD26-A27EF06001C5}#1.0#0#..\..\MyActiveXDLLMyActiveXDLL.dll#MyActiveXDLL Object={A8E5842E-102B-4289-9D57-3B3F5B5E15D3}#13.0#0; MyActiveXControl.ocx Form=frmMain.frm Class=cWhatever1; cWhatever1.cls Class=cWhatever2; cWhatever2.cls Module=modWhatever1; modWhatever1.bas .... If I rebuild the ActiveX control or the ActiveX dll, VB6 in the standard executable more often than not says that it cannot find the old control/reference or merely deletes the control/reference from the project. I then have to add it back using the Project | References (or Controls) dialogs. My question is if I rebuild the control or the dll, is there a way to find out the new GUIIDs (i.e. {BCDB2FC2-EF8C-45C9-BD26-A27EF06001C5}#1.0#0# on the DLL or {A8E5842E-102B-4289-9D57-3B3F5B5E15D3}#13.0#0 for the control) without adding them into a new / existing project and then manually looking at the resultant project file? Can I find out at the build time programatically somehow after I build the control or reference what the new ID will be, for example by searching for something in the registry? Thanks in advance, Sarah M. Weinberger
Show quote
Hide quote
"Sarah M. Weinberger" <mweinber***@hotmail.com> wrote in message No need to do that. The problem is that you're not setting binary news:%23THwk8D7JHA.3592@TK2MSFTNGP02.phx.gbl... > Hi, > > I have a couple of VB6 projects, okay a few. If I create a standard > executable project and include in them an ActiveX DLL that I created in > another project an an ActiveX control that I created in yet another > project, I would wind up with a VB6 project file with something that looks > as follows: > > Type=Exe > Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\..\..\..\WINDOWS\system32\stdole2.tlb#OLE > Automation > Reference=*\G{3F4DACA7-160D-11D2-A8E9-00104B365C9F}#5.5#0#..\..\..\..\..\..\..\..\..\..\WINDOWS\system32\vbscript.dll\3#Microsoft > VBScript Regular Expressions 5.5 > Reference=*\G{BCDB2FC2-EF8C-45C9-BD26-A27EF06001C5}#1.0#0#..\..\MyActiveXDLLMyActiveXDLL.dll#MyActiveXDLL > Object={A8E5842E-102B-4289-9D57-3B3F5B5E15D3}#13.0#0; MyActiveXControl.ocx > Form=frmMain.frm > Class=cWhatever1; cWhatever1.cls > Class=cWhatever2; cWhatever2.cls > Module=modWhatever1; modWhatever1.bas > ... > > If I rebuild the ActiveX control or the ActiveX dll, VB6 in the standard > executable more often than not says that it cannot find the old > control/reference or merely deletes the control/reference from the > project. I then have to add it back using the Project | References (or > Controls) dialogs. > > My question is if I rebuild the control or the dll, is there a way to find > out the new GUIIDs (i.e. {BCDB2FC2-EF8C-45C9-BD26-A27EF06001C5}#1.0#0# on > the DLL or {A8E5842E-102B-4289-9D57-3B3F5B5E15D3}#13.0#0 for the control) > without adding them into a new / existing project and then manually > looking at the resultant project file? Can I find out at the build time > programatically somehow after I build the control or reference what the > new ID will be, for example by searching for something in the registry? > compatibility for your ActiveX components. See VB's help on this as well as the following: http://www.vbsight.com/BinaryComp.htm -- Mike Hi Mike et al,
The information is quite useful, and I will reread it to fully understand the differences. I already use binary compatibility in order to debug an ActiveX dll or an ActiveX control specifying a DLL in the debug tab of the project properties dialog. I just did not know all the ins and outs. After reading the tab, there are still issues with the binary compatibility mode setting. My goal is to create an automatic script that builds the entire project. Building VB6 from the command line is not a problem, as that interface is supported, but as stated in my first posting, I am having trouble on how to find the new ID (whatever the ID is called that is listed in the project that will utilize the rebuild component). If I know the new ID, it is a simple matter to use a regular expression to replace the old ID with the new one. I just need to know how to find the new one. I am also curious if there is a nice clean way to do that. Is there? Thanks, Sarah "Sarah M. Weinberger" <mweinber***@hotmail.com> wrote in message A "nice clean way"?news:%23mV9i5F7JHA.4864@TK2MSFTNGP03.phx.gbl... > > I just need to know how to find the new one. I am also > curious if there is a nice clean way to do that. Is there? > Simply recompile the client with the new components. The first rule of COM is a "published" interface is permanent, unchanging (*note below). The various compatibility options in VB are to aid a programmer during development. With the binary compatiblity option ultimately aiding a developer to not break faith with any clients that are dependent on (have been compiled against) a previously published interface. If a client (your VB exe in this case) uses several components whose interface DID change then simply recompile against the "rebuild <sic>" components. The fact it is failing means there is something going on that a mere change of ID's is not going to fix. [Or worse that fiddling with GUIDs WOULD WORK! lol] The condition you are describing is called breaking the build. The offenders need to be kept after school until the build is repaired. And if it happens again - hold a summary court-martial and let them explain why they should not be expelled for wasting the company's time and adding to expenses. -ralph "Sarah M. Weinberger" <mweinber***@hotmail.com> wrote in message Just for reference, it's a GUIDnews:%23THwk8D7JHA.3592@TK2MSFTNGP02.phx.gbl... Globally Unique IDentifier not a GUIID Globally Unique I????????? IDentifier
Other interesting topics
Karl, I need to understand your Timer!
RAM Drive can't write to text file in Windows 7 I need a Class 101 on threading in VB6 Off Topic But ... Related Ghost Form Displaying forms Run-Time Error 5 - 'Invalid procedure call or argument' error msg Overcoming a MsgBox's shyness Passing Structure (Type) |
|||||||||||||||||||||||