473,322 Members | 1,401 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,322 software developers and data experts.

Calling functions written in C from VB .Net

Hi, all
What is the best way to use functions written in C in VB .Net without compromsing much of the speed of computation

I am desiging a new user interface in VB .Net, but the original source code was written in C. I am not sure about how to integrate the new interface with the application in an efficient way

Thanks a lot for any help and hint
Alison
Nov 20 '05 #1
2 1128
* =?Utf-8?B?QWxpc29u?= <an*******@discussions.microsoft.com> scripsit:
What is the best way to use functions written in C in VB .Net without compromsing much of the speed of computation?
The only way is to use 'Declare' or the 'DllImportAttribute' if it's a
native DLL that exports functions.
I am desiging a new user interface in VB .Net, but the original source
code was written in C. I am not sure about how to integrate the new
interface with the application in an efficient way.


Is it a native C(++) DLL or a C++ (COM) class library? If it's a COM
component, just try to reference it. VS.NET will create the wrappers
that are required for using the DLL automatically.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Herfried

Thanks a lot for the reply

If you happen to know any, could you let me know where I can find some code samples for how to do this? I have not had much experience in doing this kind of integration myself.

Thanks again for the hel
Aliso

----- Herfried K. Wagner [MVP] wrote: ----

* =?Utf-8?B?QWxpc29u?= <an*******@discussions.microsoft.com> scripsit
What is the best way to use functions written in C in VB .Net without compromsing much of the speed of computation
The only way is to use 'Declare' or the 'DllImportAttribute' if it's
native DLL that exports functions
I am desiging a new user interface in VB .Net, but the original sourc
code was written in C. I am not sure about how to integrate the ne
interface with the application in an efficient way


Is it a native C(++) DLL or a C++ (COM) class library? If it's a CO
component, just try to reference it. VS.NET will create the wrapper
that are required for using the DLL automatically

--
Herfried K. Wagner [MVP
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

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

Similar topics

7
by: JCO | last post by:
I have several JavaScripts in a web page. Each script is in an individual file with extension .js. I want to know if it is possible to put all functions in one single page. If so, how do I call...
8
by: Muthu | last post by:
I've read calling conventions to be the order(reverse or forward) in which the parameters are being read & understood by compilers. For ex. the following function. int Add(int p1, int p2, int...
19
by: Ross A. Finlayson | last post by:
Hi, I hope you can help me understand the varargs facility. Say I am programming in ISO C including stdarg.h and I declare a function as so: void log_printf(const char* logfilename, const...
9
by: Angel | last post by:
Hi again, I'm trying to call functions from a proprietary DLL but it's turned out to be more difficult than I thought. I have this W32.DLL which was written in C by USPS. They don't provide the...
1
by: Jesse McGrew | last post by:
Hi all, I'm trying to make a plugin DLL for a third-party application, using VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of the application, and my actual plugin code...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
7
by: Kenneth Brody | last post by:
The recent thread on "query about main()" got me thinking... As I recall, calling a function with the wrong parameters causes undefined behavior. (These all assume that no prototype of foo()...
7
by: teju | last post by:
hi, i have a code written in c now merged with c++ code i mean i am calling c functions in c++ using extern "C" but now i want to use some objects declared and defined in c++ to be available in...
4
by: r_ahimsa_m | last post by:
Hello, I am learning WWW technologies in Linux. I created index.html file which I can browse with Firefox/Konqueror using URL localhost/~robert/rozgloszenia/index.html. The page looks fine but...
10
by: sulekhasweety | last post by:
Hi, the following is the definition for calling convention ,which I have seen in a text book, can anyone give a more detailed explanation in terms of ANSI - C "the requirements that a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.