473,406 Members | 2,369 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,406 software developers and data experts.

FarPROC

I'm integrating a third party API to my c# app.

I have a funciont like this:

int FAR PASCAL funcSetUpCallBack(unsigned long dwEvent,FARPROC
funcImageCallBack)

How do I have to import it so i can subscribe to an especific event
and trigger a C# mthod in that moment?
David Moreno
Nov 16 '05 #1
2 2748
David Moreno wrote:

I'm integrating a third party API to my c# app.

I have a funciont like this:

int FAR PASCAL funcSetUpCallBack(unsigned long dwEvent,FARPROC
funcImageCallBack)

How do I have to import it so i can subscribe to an especific event
and trigger a C# mthod in that moment?

David Moreno


Unless the is a way that I'm not aware of, you will have to wrap it w/ a
managed C++ wrapper to handle the callback, and translate that to an event.
Nov 16 '05 #2
"David Moreno" <dm******@gmail.com> wrote in
news:7e**************************@posting.google.c om...
I'm integrating a third party API to my c# app.

I have a funciont like this:

int FAR PASCAL funcSetUpCallBack(unsigned long dwEvent,FARPROC
funcImageCallBack)

How do I have to import it so i can subscribe to an especific event
and trigger a C# mthod in that moment?
David Moreno


AFAIK you can pass a delegate to such a function. See

http://msdn.microsoft.com/library/de...kfunctions.asp

for more information.

Niki
Nov 16 '05 #3

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

Similar topics

2
by: Geoff Turner | last post by:
Hi all, I am trying to write a simple DLL that calls back to the VB app that called it in the first place. Below is the code in the DLL // start of code FARPROC addr1 = NULL; FARPROC addr2 =...
6
by: purity | last post by:
This is what I'm trying to do (written totally different but you'll get the point) HINSTANCE user32 = NULL; FARPROC mbox = NULL; user32=LoadLibrary("User32.dll"); //user32 now is i.e...
2
by: sathiyamurthy | last post by:
HI all, i have created a dll using Labwindows ..... can anyone suggest me how to use that dll in vc++ ? with regards sathya
5
by: k.sahici | last post by:
I have a DLL written in C++ which has a function shown below. /********************************** //MYDLL.cpp __declspec(dllexport) void Pos(MyStruc &r) { r.var = true; }
1
by: Chris Sharrard | last post by:
Hello All, I have been trying to fix the following problem; this bit of code works fine when it is compiled as part of a Windows application but when I move it out to a DLL I get the debug error -...
5
by: Firecore | last post by:
Does anyone know how to call DLL functions using C? eg. PlaySound MessageBox
4
by: ahagley | last post by:
The problem: 1) I'm not a programmer, most of the time I'm a physicist, but I do numerical simulation. 2) I have a DLL that I want to use functions from. I have the .h file associated with the...
6
by: سعرَ | last post by:
Hi all! I have a Dll like this: #include <windows.h> #include <stdio.h> #include <stdlib.h> __declspec (dllexport) int Add (int n) { int x;
11
Airslash
by: Airslash | last post by:
Hi, I'm sorry if this is not the correct forum, but since I'm programming in C++ this looked like the best place. I'm trying to make a nice DLL file for the company where we place all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...

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.