HighTechTalks DotNet Forums  

passing pointer to a vbs function to C# code

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss passing pointer to a vbs function to C# code in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
bjdodo
 
Posts: n/a

Default passing pointer to a vbs function to C# code - 06-13-2009 , 09:07 PM






Hello All,

I have an app that can be controlled by vbscript. Due to a new requirement I
would like to be able to register a vbs function that my C# app could invoke
from a different thread. I have used a small dll that did the same in C++
but I do not have the code for that C++ dll anymore and I am kind of stuck.

I know that in the vbs file I need to use the GetRef() function that gets
the pointer to the function. I can also pass in this object to the C# code
as object, but I do not know what I should do with it.

One guess is that this object might be an IDispatch object and if I could
invoke its default function than that function would be what I am looking
for, but I am not sure, it is only a guess. Also I have no idea how I could
invoke the default function from C# because I could not find an IDispatch
wrapper in the System.Runtime.InteropServices.ComTypes namespace; I guess
there is a reason for that and IDispatch might not be used from the .NET
framework?

I'd appreciate any help!

Thank you,
Jozsef

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.