Solved

Mapping a function name

Posted on 1998-12-08
3
136 Views
Last Modified: 2010-05-03
In VB there is a function VarPtr which will return the  address of a structure. I want to map this function to
another function with the name get_pointer().
So when I call get_pointer(ptr as any) it should call  VarPtr and return the correct address.Here ptr is the name of a structure. The problem I'm facing here is that a function defined in the VB can't take "any" data type as an argument. Do we have simple solution like using macro as in C.
Does anybody have an answer?
0
Comment
Question by:kamalhusain
[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 2

Accepted Solution

by:
JiaH earned 20 total points
ID: 1448752
How about use the variant type?
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1448753
If you specify a variant argument, there will be a conversion from actual arguments to formal ones, thus passing the values by value, and not by reference, disabling the ability to what Kamalhusain wants. ¿Am I very wrong?
0
 

Author Comment

by:kamalhusain
ID: 1448754
Vikiing has made a vaild point. This is the probelm I'm facing.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

717 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