Click here to Skip to main content
16,006,341 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB Pin
28-May-01 20:35
suss28-May-01 20:35 
GeneralRe: VB Pin
Mangesh Sardesai15-May-01 21:54
Mangesh Sardesai15-May-01 21:54 
GeneralLaunch MS Word and open file Pin
Richard Cheng11-May-01 7:23
Richard Cheng11-May-01 7:23 
GeneralRe: Launch MS Word and open file Pin
LANNEZVAL14-May-01 3:42
LANNEZVAL14-May-01 3:42 
GeneralRe: Launch MS Word and open file Pin
LANNEZVAL14-May-01 23:23
LANNEZVAL14-May-01 23:23 
GeneralCalling Extension DLLs from VB or MATLAB Pin
Kaitain8-May-01 5:21
Kaitain8-May-01 5:21 
GeneralDereferencing in VisualBasic Pin
5-May-01 9:14
suss5-May-01 9:14 
GeneralRe: Dereferencing in VisualBasic Pin
5-May-01 12:33
suss5-May-01 12:33 
It's not directly possible to dereference a variable in Visual Basic, but you can do a workaround with the help of the api-function "rtlmovememory" (copymemory). This function makes it possible to copy the data of the variable when only having its adress (varptr-function in VB; some api-functions only return pointers to datastructs).

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
(hpvDest As Any, ByVal hpvSource As Long, ByVal cbCopy As Long)

This function copies the value of a variable into another variable of the same size (hpvDest). The second parameter takes the adress of the sourcevariable. The third parameter takes the size of the variable.

I think there is an example of this technique in the Knowledge Base...
"HOWTO: Call NetUserGetInfo API from Visual Basic" Article ID: Q151774


GeneralSave date and time to a txt document Pin
3-May-01 9:01
suss3-May-01 9:01 
GeneralRe: Save date and time to a txt document Pin
Konstantin Vasserman5-May-01 7:20
Konstantin Vasserman5-May-01 7:20 
GeneralDetect Application Launch Pin
Ray Brack24-Apr-01 18:21
Ray Brack24-Apr-01 18:21 
GeneralRe: Printer Pin
19-May-01 0:20
suss19-May-01 0:20 
Generalrename file Pin
23-Apr-01 10:00
suss23-Apr-01 10:00 
GeneralRe: rename file Pin
Jason Gerard23-Apr-01 10:21
Jason Gerard23-Apr-01 10:21 
GeneralRe: rename file Pin
23-Apr-01 11:04
suss23-Apr-01 11:04 
GeneralASCII to HTML String Urgent Pin
23-Apr-01 5:10
suss23-Apr-01 5:10 
GeneralRe: ASCII to HTML String Urgent Pin
28-Aug-01 11:34
suss28-Aug-01 11:34 
Generaliiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii Pin
23-Apr-01 4:23
suss23-Apr-01 4:23 
GeneralPassing variable values between forms Pin
17-Apr-01 6:47
suss17-Apr-01 6:47 
GeneralRe: Passing variable values between forms Pin
Jason Gerard17-Apr-01 15:42
Jason Gerard17-Apr-01 15:42 
GeneralRe: Passing variable values between forms Pin
18-Apr-01 6:49
suss18-Apr-01 6:49 
GeneralScanning (Not anti-virun scanning) using VB API Pin
10-Apr-01 20:15
suss10-Apr-01 20:15 
Generalvariable problems Pin
6-Apr-01 10:23
suss6-Apr-01 10:23 
GeneralRe: variable problems Pin
Raveendra Madupu8-Apr-01 22:37
Raveendra Madupu8-Apr-01 22:37 
GeneralRe: variable problems Pin
18-Apr-01 7:05
suss18-Apr-01 7:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.