473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 813

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

Similar topics

3
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
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
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
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
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
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
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
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
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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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,...
0
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...

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.