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

importing an old c library

Hey how do I import an old C library that doesn't expose COM or anything
like that? Would I do it like an API declaration?

I have a function in a tbl.dll file such that...

tbl_get() no params.
Thanks,
CJ
Nov 20 '05 #1
3 796
I need to use P/Invoke don't i?
"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10************@corp.supernews.com...
Hey how do I import an old C library that doesn't expose COM or anything
like that? Would I do it like an API declaration?

I have a function in a tbl.dll file such that...

tbl_get() no params.
Thanks,
CJ

Nov 20 '05 #2
Yes.

Declare Sub tbl_get lib "libname.dll" ( )

Actually, if it's returning something (which, by the name, seems to be the
case), you'll have to use Declare Function instead, and specify the return
type. After declaring the external function, you should be able to call it
anywhere in your program.

-Rob

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
I need to use P/Invoke don't i?
"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10************@corp.supernews.com...
Hey how do I import an old C library that doesn't expose COM or anything
like that? Would I do it like an API declaration?

I have a function in a tbl.dll file such that...

tbl_get() no params.
Thanks,
CJ


Nov 20 '05 #3
* "CJ Taylor" <no****@blowgoats.com> scripsit:
Hey how do I import an old C library that doesn't expose COM or anything
like that? Would I do it like an API declaration?

I have a function in a tbl.dll file such that...

tbl_get() no params.


Which convention is used to export the functions?

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

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

Similar topics

2
by: plb | last post by:
All: I am struggling with an import problem... In my package, myapp, I have a module, logging.py. That module, naturally, imports the library module logging with an 'import logging'...
11
by: Skc | last post by:
I have a .txt which has been exported as a .csv from an external source. What i need to do is to import this into SQL2000 (into a table) but I need to do special things on the data: 1. I need to...
3
by: Mark | last post by:
All, As you can see below, I have had problems with inquisitive souls looking at data they shouldn't be. I though disabling the ability to create new databases using my workgroup would stop this...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
3
by: martin | last post by:
Hi, is there a dotnet function (other than the old isnumeric from VB) to check whether an object is numeric or not. also I notice that all the old vb functions such as split / isnumeric /...
29
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
1
by: Phil | last post by:
I want to add a button to a form to import a text delimited file. The File is delimited by "^" and so I have created a specification file by manually impoting the text file, using the advanced...
1
by: mypetslug | last post by:
Hi, I'm sorry if this has been asked before, but I can't seem to find an answer to this anywhere and so far, trial and error hasn't gotten me far either. Using python 2.4, I've created a...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.