F
frederick.the.fool
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?
+/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?