Solved

Mapping a function name

Posted on 1998-12-08
3
131 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
3 Comments
 
LVL 2

Accepted Solution

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

Expert Comment

by:vikiing
Comment Utility
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
Comment Utility
Vikiing has made a vaild point. This is the probelm I'm facing.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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 …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now