468,104 Members | 1,322 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,104 developers. It's quick & easy.

Error is Object doesn't support this property or method

Subject: Error is Object doesn't support this property or method

I am trying to pass a C# string under Vs2005 (Net2) to an Vb6 ActiveX
Control.

I get the following runtime error--
"Object doesn't support this property or method"

Yet the Intellisense shows the following--
axMainViewJ1Obj1.AddFileJ1(ref string str);

Also the project compiles without error.

The Vb6 method is--
Public Function AddFileJ1(FileName As String) As Boolean

Calling it from a test Vb6 Exe program works fine.

The actual code snippet in C# is--
string str=@"G:\Program FilesJ1\Iris\Data\Data\Example 1 - identified and
well separated.rst";
axMainViewJ1Obj1.AddFileJ1(ref str);

Any suggestions would be appreciated.

--John Olbert
ja******@snet.net
The full error information at runtime is--
System.NotSupportedException was unhandled
Message="Object doesn't support this property or method"
Source="MainViewJ1"
StackTrace:
at MainViewJ1._MainViewJ1Obj.AddFileJ1(String& FileName)
at AxMainViewJ1.AxMainViewJ1Obj.AddFileJ1(String& fileName)
at Ce1.Form1.test1aToolStripMenuItem_Click(Object sender, EventArgs
e) in G:\Vx8\Vcs8J1\Interop\MainView\Ce1\Form1.cs:line 41
at System.Windows.Forms.ToolStripItem.RaiseEvent(Obje ct key,
EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(Eve ntArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(Eve ntArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(M ouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs
e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(Event Args e,
ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEven tArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(M ouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Mes sage& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Ce1.Program.Main() in
G:\Vx8\Vcs8J1\Interop\MainView\Ce1\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Sep 20 '06 #1
0 1863

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Cylix | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.