Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 29th, 2004, 04:49 AM
Registered User
Join Date: Mar 2004
Location: Mumbai, Maharashtra, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing user defined parameters to vb dll

have created XMLParser.dll with two functions in vb
ParserMRXML(Filename as string) as MASTERRECIPE
CreateMRRecipe(Filename as string,MasterDetail as MASTERRECIPE)
Wherein MASTERRECIPE is userdefined nested structure used to hold all tag details.

Now I have opened another vb standard exe project.
Gave the reference of xmlparser.dll

Created same structure MASTERRECIPE in the project
dim MasterRecord as MASTERRECIPE
dim obj as CXmlParser
MasterRecord = obj.ParseMRXML("C:\MasterRecipe.xml")
    This successfully executes and give me the xml file details in MasterRecord.

Now I am calling

obj.CreateMRRecipe("c:\MRCreated.xml",MasterRecord );

I am getting compilation error for MasterRecord as "Byref argument type mismatch"

My conclusion : It works fine when I am returning user defined data type from DLL
But it fails when I am passing user defined parameter as input parameter.

User defined data types should be passed as byref only not Byval .

If the same dll code is copied to standard exe then it works fine... No problem at all.

Please Help!!!! Its Really very urgent.. I am stucked.
Thanking in advance..


Closed Thread

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 03:44 PM
Passing Params to User Controls in ASP 2.0 (VB) gcm_uk ASP.NET 2.0 Basics 8 April 30th, 2007 01:35 PM
passing parameters to user control jbeynon ASP.NET 2.0 Professional 0 August 30th, 2006 06:18 AM
User-defined type not defined (Icecream.mdb) dloren01 BOOK: Beginning Access VBA 0 June 22nd, 2005 10:36 PM
VB.net Database -> user defined object boneill VB How-To 4 May 2nd, 2005 05:23 PM

All times are GMT -4. The time now is 12:37 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.