Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a dll and reference question

Status
Not open for further replies.

vincentw56

IS-IT--Management
Oct 10, 2002
47
0
0
US
I am trying to call a dll but the function call does not make since to me. Here is my code:

Code:
		struct VanConnRecord
		{
			public string crName;
			public string crPassword;
			public string crHost;
			public string crPort;
		}

		[DllImport("vanapi32.dll")]
		public static extern long VanOpenConnection(long version, struct VanConnRecord);

The function syntax is this:

long VanOpenConnection(long version, struct VanConnRecord)

My problem is with the struct part. What do I put in my code for the strut part. I tried changing it to string, but it does not work. Thanks.

Vincent Wright
Web Developer
NSI Software, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top