Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 29th, 2004, 04:49 AM
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing user defined parameters to vb dll

Hi,
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..

Regards
Smita.



Smita





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





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