Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with dllimport
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Web Services
Title:
Problem with dllimport
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows XP
Miscellaneous
Thread ID:
01072690
Message ID:
01072690
Views:
60
I am creating an ASP.NET webservice wrapper for a VFP 7 DLL using the dllimport function. I am having problems getting the webservice to work, however.

I'm fairly new to the ASP web service arena, so I'm hoping there is something simple wrong here. The code bombs when I test the web service locally using ie 6. The line that stops is l_returnstring = getprogdir().


Here's the ASP code in service.asmx:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Runtime.InteropServices;
using dllserver;

[WebService(Namespace = "http://test.com",
    Description="Test Submission Web Service")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
    public Service () {

    }
    [DllImport("dllserver.dll")]
    public static extern string getprogdir();

	[WebMethod(Description = "Method to return import directory")]
	public string getimportdir()
	{
		string l_returnstring;
		l_returnstring = getprogdir();


		return l_returnstring;
		
	}
Any help is greatly appreciated!
Steve Howie, owner
DaSH Technology
Denver, CO
Reply
Map
View

Click here to load this message in the networking platform