Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Mon, 5 Mar 2007 00:31:30 -0800,    group: microsoft.public.vstudio.extensibility        back       


problems in VSTA integration   
our application is integrated with VBA. and VBA runs correctly.

I am trying to integrate VSTA to our VBA enabled application. 

I did most of tasks in VSTA integration manual and basic features runs.

but when trying to invoke some method ( call our object model method) in 
proxy, error occurs.

========== error msg ==========

System.Reflection.TargetException, mscorlib

System.Reflection.TargetException: Error in the application.

Server stack trace: 
   at 
Microsoft.VisualStudio.Tools.Applications.ComTypeAdapter.InvokeMember(String 
name, BindingFlags bindingFlags, IRemoteObjectContract target, 
IRemoteArgumentArrayContract remoteArgs, Boolean[] remoteArgModifiers, Int32 
lcid)
   at 
Microsoft.VisualStudio.Tools.Applications.ComMethodInfoAdapter.Invoke(IRemoteObjectContract 
target, BindingFlags bindingFlags, IRemoteArgumentArrayContract parameters, 
Int32 lcid)
   at 
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr 
md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, 
Object[]& outArgs)
   at 
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle 
md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, 
Object[]& outArgs)
   at 
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]: 
   at 
Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method 
TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)
   at 
Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container 
BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, 
Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, 
Boolean ReportErrors, ResolutionFailure& Failure)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object 
Instance, Type Type, String MemberName, Object[] Arguments, String[] 
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
   at Multipad1.ThisApplication.ThisApplication_Startup(Object sender, 
EventArgs e) in C:\Documents and Settings\mhkim\My 
Documents\MultiPad\Projects\Multipad1\Multipad1\ThisApplication.vb:line 27
   at Multipad1.ThisApplication.FinishInitialization() in C:\Documents and 
Settings\mhkim\My 
Documents\MultiPad\Projects\Multipad1\Multipad1\ThisApplication.designer.vb:line 52
   at 
MULTIPADLIB.Application.Microsoft.VisualStudio.Tools.Applications.Contract.IEntryPointContract.FinishInitialization()
   at 
Microsoft.VisualStudio.Tools.Applications.EntryPointAdapter.Microsoft.VisualStudio.Tools.Applications.Contract.IEntryPointContract.FinishInitialization()

============================================

test code is :

        doc = Application.ActiveDocument
        entity = doc.CreateEntity("CRDBody", "Body1")
        entity.Test("Test") // error occurs here

entity is a our object model (CRDBody) which implements IDispatch.

it derive IDispatchImpl and implement Invoke and GetIDsOfNames because of 
some complicate reason.

test code runs correctly in VBA. 

I can't find exact reason of the error because I can't see Proxy code 
(ComTypeAdapter).



and I tried other way in DOWNLOAD board. ( sample that use 
CreateExcelInstance()  ).

in that case ( use our object model without proxy ) , no problem. but in 
that case, we have to

modify all proxy code manually. in current situaion it is not good method 
for us.

I hope you can give me some advise about above error.



and some questions.

1. when will official version of VSTA be released? or can you tell me VSTA 
release schedule?

2. Can I generate proxy code that access object model directly ( like sample 
that use CreateExcelInstance()  )?

    It is very difficult for me to modify all proxy code because we have so 
many object models.



Any help is greatly appreciated.  sorry for my bad english >_<
date: Mon, 5 Mar 2007 00:31:30 -0800   author:   hyun

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us