Solved

Mapping a function name

Posted on 1998-12-08
3
135 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Microsoft Access combo box help 2 52
using web browser with BING 40 137
backup program with robocopy 6 75
Problem to line 23 74
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

730 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