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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I access a new DLL in Foxpro 6? 2

Status
Not open for further replies.

lsugirl

Programmer
May 24, 2004
24
US
I am NOT a FoxPro programmer and need some help. I created a new C# dll to handle some web requests for an old FoxPro application. The existing DLL no longer worked and they didn't have the source code. So, now i have this new DLL that I which to intergrate into FoxPro. I need to have 4 parameters passed to the DLL which has a class. Can I pass the parameters? The previous DLL call was:

DECLARE INTEGER WebHTTPRequest IN &lcWebHTTPRequestQuotes

Or do i have to put the parameters in some text file for the dll to read? If I can pass parameters, anyone know the syntax?

Thanks!!!
 
What are the four parameter types that the DLL expects? Depending on the types, you'll need to alter that declaration - right now it doesn't appear to have any parameters required. (Of course not knowing what you normally have in the varible lcWebHTTPRequestQuotes does make this a guess on my part!)

Rick

 
Hi lsugirl

here is an example..

DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, STRING cAction, STRING cFileName, ;
STRING cParams, STRING cDir, INTEGER nShowWin


DECLARE INTEGER WebHTTPRequest IN myDLL.DLL

:)

____________________________________________
ramani - (Subramanian.G) :)
 
Thanks guys. I will try that.

I'm trying to pass:
public string inst_state;
public string inst_zip;
public string inst_city;
public long TotalWeight;

The example I gave before was the OLD dll call but I'm not using that dll anymore.
 
If this are all being passed by value and aren't going to be updated, then this should work:
Code:
DECLARE INTEGER NewWebHTTPRequest IN NewDLL ;
 string inst_state, ;
 string inst_zip, ;
 string inst_city, ;
 long TotalWeight

Note: The entry point name is case sensitive.

Rick
 
I have another question. I'm using a C# dll and I'm getting an error that the entry point can't be found. I have checked the name and made sure it has the correct case. I was told on the C# forum that C# dlls aren't true dlls. "To call it from another language, program, etc., you'd have to use .NET (duh), or COM (tell the IDE to write a COM-callable wrapper)."

Any examples on writing a COM-callable wrapper? Would that even work?

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top