p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 2008 > Visual Basic 2008 Essentials
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual Basic 2008 Essentials If you are new to Visual Basic programming with version 2008, this is the place to start your questions.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Essentials section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 1st, 2008, 11:07 AM
Registered User
 
Join Date: Feb 2008
Location: Chicago, IL, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default .dll interaction with an application

Now that I seem to be going okay with LINQ (at the moment), I've gotten myself into another interesting situation. I'm currently experimenting with a couple of sets of code in VB.NET (Express Edition, at the moment, but eventually to go to Pro), in which I'm collecting directory information in a VB form, then passing that to a VB .dll to query the XMLs in those directories and pass the results back to the form, meanwhile keeping information loaded in the .dll's memory for future use.

All fine and good, except that when I call the .dll's function name, I get an error message indicating that it can't find the entry point. I've checked the .dll under the Object Browser, and the functions seem to be quite visible, so I'm not sure what the problem is. I've added the .dll to my Resources and declared the functions, so VB knows everything is there.

Any ideas?

David M. Stowell
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old March 3rd, 2008, 03:59 PM
Friend of Wrox
Points: 5,269, Level: 30
Points: 5,269, Level: 30 Points: 5,269, Level: 30 Points: 5,269, Level: 30
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
Default

Could you post the problematic line of code?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old March 3rd, 2008, 04:33 PM
Registered User
 
Join Date: Feb 2008
Location: Chicago, IL, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, I've gotten around the problem, though we'll see what happens in the long term. I was trying to declare the .dll using the DECLARE statement, then simply using the function name later on, like this:

Declare Add Lib "MathLib.dll" (ByVal op1 As Decimal, ByVal op2 As Decimal) As Decimal

Dim lnSum As Decimal

lnSum = Add(3, 5)

It would blow up on the call to Add. Now I'm instantiating an object based on the .dll and that works. I'm just hoping that that works in the final environment - eventually the real .dll is going to be used in a Visual Foxpro application, which isn't .NET-aware. - it's COM. I know I can use CREATEOBJECT() in that code, but I hope that the two environments don't clash.

David
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with windows application and DLL naikpalak722 General .NET 0 October 2nd, 2007 04:08 PM
Using .NET DLL from inside VB6 application Dmitriy General .NET 1 January 30th, 2006 04:45 PM
Using .NET Dll from VB6 application Dmitriy Pro VB 6 5 January 30th, 2006 04:43 PM
Reference lib or .dll in application? MMahaney@wcinfo.com C# 1 February 11th, 2005 02:25 PM
Unable to use the DLL in C# in Web application. rsaluja C# 0 September 28th, 2003 12:56 AM



All times are GMT -4. The time now is 04:27 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc