?
Solved

Mapping a function name

Posted on 1998-12-08
3
Medium Priority
?
137 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 40 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

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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
Course of the Month14 days, 18 hours left to enroll

770 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