By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,876 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,876 IT Pros & Developers. It's quick & easy.

Using Microsoft.Office.Interop.Visio in C++/CLI

P: n/a
I'm writing a project that does Visio automation. I'm writing it in C+
+/CLI because it needs to reference a good amount of native C++ code.

One way to call the Visio API, of course, is to use the COM interface
provided in Visio SDK. However, a colleague of mine has been using
Microsoft.Office.Interop.Visio in his VB.NET project, which is far
more convenient than COM.

I thought I could do the same in C++/CLI, but it didn't work. Since,
the Microsoft.Office.Interop.Visio PIA resides in C:/WINDOWS/assembly
folder on my computer, I added that path in the "Resolve #using
References" property in VS2005. However, despite that, the compiler
still couldn't find the assembly
"Microsoft.Office.Interop.Visio.dll".

Then I tried the full path declaration: #using "C:/WINDOWS/
assemblyMicrosoft.Office.Interop.Visio.dll". But compiler still
complained that it couldn't find the assembly. Next I tried adding the
reference of the PIA to the project, but the damn thing just won't
add!

I was expecting that since C++/CLI is just another .NET language like
VB.NET, the Interop should work there too, but it didn't. So what I
want to know is, is there something I'm doing wrong here? How can I
succeed in using the Visio Interop in my C++/CLI code, if it can be
done at all? Or, if it is not possible, then what would be an
alternative more convenient than the Visio COM Interface?

Sep 11 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.