[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Exposing User Defined Types

Posted on 1998-09-22
3
Medium Priority
?
149 Views
Last Modified: 2011-09-20
I am accessing the NT System Registry to obtain information and have put this function inside of a Class Module that I plan to access from several different programs I have written. I originally converted all of the information to string type, concatenated into one string, and returned that string from the Class Module. When instantiated, the Class Module returns the info as one long string. This works okay but is not real clean since the calling programs need to unpack the string back to the original parameters.

I thought that I would instead define a user type in the Class Module that would encapsulate all of the System Registry parameters that I needed and pass that user type to other calling programs.

Here is the problem. I can't seem to define a Class Module function return as a type "User Type" and at the same time make it Public so that external programs can get access to it.

Any ideas ?

Mike.
0
Comment
Question by:msturgeo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
DennisH earned 400 total points
ID: 1436050
One simple solution would be to make it a class instead of a UDT.  Then just instantiate the class and set the properties and hand the newly created object off.
0
 

Expert Comment

by:sjrl
ID: 1436051
Define it the UDT as public in a standard module.
0
 

Author Comment

by:msturgeo
ID: 1436052
This solution is simple and it does work. The only change I made was not to make the four System Registry parameters that my class module reads Private then if the registry read is succesful exposing those with four separate "Get" functions, three string returns and one Boolean to match the four parameter types.

Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question