469,289 Members | 2,125 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

NET 2003 and DllImport

I mentioned earlier I'm trying to use DllImport to pull in functions from a dll.
I'm using the InteropServices and ComponentModel.
The issue is the compiler complaining about the "[" around the comand.
Example
[DllImport("declspec.dll")
public static extern int da4300_CountCards();

The error is on the "["operator?
I am following the examples I've seen in MSDN and textbooks.
I don't understand.
Thanks
Mike
May 2 '06 #1
2 1335
Banfa
9,064 Expert Mod 8TB
You could post the actual error (and the actual code if that isn't it).

Should there not also be a ]

Have you just tried removing the [
May 2 '06 #2
Yes, I tried removing "[" and "]" and it just faults on the following statement for the function.
May 2 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Adam Hartshorne | last post: by
4 posts views Thread by sreenubkaimal | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.