Several bugs, spanning several products (VS.Net, OfficeXP) 
Author Message
 Several bugs, spanning several products (VS.Net, OfficeXP)

Well, today I decided to see what it takes to write a COM
Add-In for Office 2k/XP in VC.Net.

It's been disappointing.  Not because it's really that
hard, but because all the tools required are a little
shoddy.

After working through common typelibrary import issues (a
testement to the issues of abusing the preprocessor by
breaking the ALL_UPPERCASE_YOU_NIMROD convention, and
defining things such as CopyFile as macros)

There seems to be a performance issue with the on-the-fly
parser, it chokes on the 3meg file output from importing
the Excel type-library (hate to see what'll happen if you
import the Word type-library).  It beats pud for about ten
seconds, relaxes for a moment, and then beats some more
pud.  I stopped counting the third time, and came here to
start {*filter*}ing about it.  I realize 3megs is a god-awful
lot of source, but you'll have to take that issue up with
Office team.

So it takes 45seconds to compile, and then I'm greeted
with this error message from the linker (after the IDE
beats pud for another 75 seconds, I can actually look at
output):
VC71 fatal error LNK1179: invalid or corrupt file:
duplicate COMDAT '_IID_DiagramNode'

and this warning from the compiler:
c:\Projects\MSVC\COM Add-In\VC71\Debug\Excel.tli(65537) :
warning C4049: compiler limit : terminating line number
emission
        Compiler limit for line number is 65535

The linking problem is that the same identifier was used
twice, in two different namespaces, but declared
extern "C" both times.  Shouldn't this be a duplicate
defintion compiler error?

More pointedly, why is the same identifier exported from
both Excel.exe and MSO.dll? (importing Excel.exe requires
importing MSO.dll first, among other type-libraries)

The issue is avoided if named_guids is NOT used on the
imports.

As for the warning, you guys have no shame, do you? :)
Shouldn't that have bothered the guy typing it in?
Why are we using unsigned shorts to hold line counts in
this day&age?

I know, I know, I hear ya, "Who in thier right mind would
*ever* have more than 65,535 lines in a single source
file.  Well, Microsoft would, that's who :P



And it didn't blow-up or stop compiling (at least I think
everything was compiled), so that's good too.

The warning can be generated by importing the Excel XP
type-library, as follows (assuming you have OfficeXP
installed):

#import "C:\Program Files\Microsoft Office\Office10
\Excel.exe" rename("RGB", "xlRGB"), rename
("DialogBox", "xlDialogBox"), rename
("CopyFile", "xlCopyFile"), rename
("ReplaceText", "xlReplaceText"), include
("IFont", "IPicture")

You need to import MSO.dll & VBE6EXT.OLB (look in Program
Files\Common Files) prior to importing Excel



Wed, 09 Feb 2005 07:50:57 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. how to display data source in several pages in ado.net like i do in ado

2. Project VC.NET (MFC) in several languages.

3. Project VC.NET (MFC) in several languages.

4. BUG: VS.NET template pointer-to-member bug

5. VS.NET Enterprise Vs VS.NET Professional

6. RAW INPUT: Accessing several mice independently

7. Storing several obj in binary in a single file

8. How to break source file into several files?

9. Several questions on varying topics

10. Several questions on 1/2

11. Algorithm for splitting a tree into several components

12. #define with several #defines inside???

 

 
Powered by phpBB® Forum Software