473,498 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can a COM ReturnFunction call .NET code?

Hello all!
To communicate with a (closed source) application this
application offers COM objects for interaction. In
JavaScript this works like this (just for understanding
of my question):
############## JAVASCRIPT ##################
function connSetup(msg,path)
{
oBERT.OnConnectionSetup(msg,pa*th)

}
// Reserve COM connection variable
var oBERT
var oNHS
// Open COM connection
oBERT = new ActiveXObject("NetHawk.BERT")
oNHS = new ActiveXObject("NetHawk.RNCIub"*)

var sOptional=""
function Startup()
{
oNHS.NHSAPISetSignal(connSetup*, "/rrc/generic_conn_setup",
sOptional);

}
############## END OF JAVASCRIPT ##################

The first paramter of this NHSAPISetSignal function is a
Returnfunction to this connSetup function.
I have to achive this within a .NET assembly. In VB.NET I have
tried to use a Delegate as a paramter for this Return function like:
############## VB.NET ##################
Public Delegate Sub ConnSetupDelegate(ByVal Msg As Object, ByVal Path
As Object)
Public Sub ConnSetup(ByVal Msg As Object, ByVal Path As Object)
Debug.WriteLine("ConnSetup was called! with Parameters: " & Msg
& ", "
& Path & vbCrLf)
oBERT.OnConnectionSetup(msg,pa*th)
End Sub
Public Sub Start()
Dim conn As ConnSetupDelegate
conn = AddressOf ConnSetup
Dim sOptional as String = ""
oBert = CreateObject("NetHawk.BERT")
oNHS = CreateObject("NetHawk.RNCIub")
oNHS.NHSAPISetSignal(conn, "/rrc/generic_conn_setup",
sOptional)
End Sub
############## END OF VB.NET ##################
But this does not work!! (ConnSetup was never called.)
So my question: How can I achieve this Eventhandler in VB.NET or
what is necessary that this COM Object (oNHS) gets this
ReturnFunction???
Any hint is welcome + Thanks in advance!
Markus

Nov 22 '05 #1
0 814

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
46949
by: ¤ Alias | last post by:
I have a function named getID3info (lvwDiscInfo.SelectedItem). What is the difference between getID3info (lvwDiscInfo.SelectedItem) and Call getID3info(lvwDiscInfo.SelectedItem) ?
0
240
by: boss | last post by:
Hello all! To communicate with a (closed source) application this application offers COM objects for interaction. In JavaScript this works like this (just for understanding of my question): ...
8
3815
by: ThomasR | last post by:
I understand that virtual methods on inherited objects are slower than non-virtual methods because of the indirection required to support the call. However, when looking at IL code produced by...
20
3941
by: Cybertof | last post by:
Hello, Is there a good way to call a big time-consumming function from an ActiveX DLL (interoped) through a thread without blocking the main UI ? Here are the details : I have a class...
13
9770
by: jac | last post by:
Hae, I have a windows form with a ComboBox an other things. On that combobox I have an eventhandler on de selectedindexchanged. But somewhere in my code want to do excecute the same code that...
13
4097
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
5
6503
by: Kurt Van Campenhout | last post by:
Hi, I am trying to get/set Terminal server information in the active directory on a windows 2000 domain. Since the ADSI calls for TS don't work until W2K3, I need to do it myself. I'm fairly...
5
3761
by: Amaryllis | last post by:
I'm trying to call a CL which is located on our AS400 from a Windows application. I've tried to code it in different ways, but I seem to get the same error every time. Does anyone have any clue...
6
5880
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
1
3086
by: George2 | last post by:
Hello everyone, Such code segment is used to check whether function call or exception- handling mechanism runs out of memory first (written by Bjarne), void perverted() { try{
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.