Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2005, 01:50 AM
Authorized User
 
Join Date: Jun 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to get the value at the address??

Hi

i get the address of the variable thru VarPtr function.i want to get the value stored in that address ...how???

thanks and regards

Sruti
 
Old July 8th, 2005, 02:49 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello

As of me, I know, that we can get the Address from the memory using VarPtr, StrPtr or ObjPtr but not
the values.

I have tried a lot to find out but did not find any
way to get the value.

If you come accross, please let me know

With Regards,
Raghavendra Mudugal
 
Old July 8th, 2005, 04:51 AM
Authorized User
 
Join Date: Jun 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks Raghav

i'll definately let u know on it if i come across any...
 
Old July 8th, 2005, 01:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

first of all, you have to know which type of variable is, then use the copymemory API:

Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

Be EXTREMELY careful. save your project before running it, because that is one of the most dangerous API. Pass the wrong parameter and... GPF!
I usually never use the 'general' definition, because I do not like the Any (can be anything, just like a C pointer)

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get MAC K Address msbsam ASP.NET 2.0 Basics 2 July 10th, 2007 06:36 AM
physical address mateenmohd Classic ASP Basics 0 June 13th, 2007 09:24 AM
IP Address sumanghosh Classic ASP Basics 1 April 7th, 2006 11:24 AM
Retreiving IP address & gateway address sjangit VBScript 0 February 3rd, 2004 02:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.