Passing a UDT as an argument 
Author Message
 Passing a UDT as an argument

I'd like to pass a UDT to a function in my DLL and have it fill in some of
the elements.  (The function itself returns a code indicating success or
error status.)

But when I go to compile my project group (contains both the .exe and the
.dll), I get
    ByRef Argument Type Mismatch

The UDT in the function call is highlighted.

What could I be doing wrong?
    - Turtle



Tue, 14 Sep 2004 19:43:44 GMT  
 Passing a UDT as an argument

Quote:

> I'd like to pass a UDT to a function in my DLL and have it fill in some of
> the elements.  (The function itself returns a code indicating success or
> error status.)

> But when I go to compile my project group (contains both the .exe and the
> .dll), I get
>     ByRef Argument Type Mismatch

> The UDT in the function call is highlighted.

Where and how exactly is the UDT defined?  Is it a Public Type
defined within a public class within the DLL?

--
Joe Foster <mailto:jlfoster%40znet.com>   Space Cooties! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Wed, 15 Sep 2004 00:18:02 GMT  
 Passing a UDT as an argument
Thanks, Joe!

    Actually, I found my problem.  Somehow I thought I had to redefine the
UDT in the exe that calls the function.
Once I figured out that I can DIM the UDT as MyDDL.MyUDT, life got a whole
lot better in a hurry.

    - Turtle




Quote:

> > I'd like to pass a UDT to a function in my DLL and have it fill in some
of
> > the elements.  (The function itself returns a code indicating success or
> > error status.)

> > But when I go to compile my project group (contains both the .exe and
the
> > .dll), I get
> >     ByRef Argument Type Mismatch

> > The UDT in the function call is highlighted.

> Where and how exactly is the UDT defined?  Is it a Public Type
> defined within a public class within the DLL?

> --
> Joe Foster <mailto:jlfoster%40znet.com>   Space Cooties!

<http://www.xenu.net/>

- Show quoted text -

Quote:
> WARNING: I cannot be held responsible for the above        They're
coming  to
> because  my cats have  apparently  learned to type.        take me away,
ha ha!



Wed, 15 Sep 2004 03:07:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing a UDT as an optional argument

2. Arguments : Passing Arguments containing <">

3. UDT as argument to class method

4. Arguments pass short 8.3 filename, how pass LFN?

5. Passing Arguments / Passing an Array

6. passing UDT as parameter of a method for MTS Component

7. problem: passing UDT as parameter of a method for MTS Component

8. Passing UDT into WebMethods

9. How to pass array of UDT into DLL?

10. Passing UDT's between Control & Client

11. Passing UDT to a collection

12. Passing UDT to Class function

 

 
Powered by phpBB® Forum Software