Click here to Skip to main content
15,924,828 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questioncombobox and listbox Pin
lukisf7-Nov-06 21:48
lukisf7-Nov-06 21:48 
AnswerRe: combobox and listbox Pin
_mubashir7-Nov-06 22:24
_mubashir7-Nov-06 22:24 
Questionconnectivity in vb6 Pin
hi!_its_me7-Nov-06 21:27
hi!_its_me7-Nov-06 21:27 
AnswerRe: connectivity in vb6 Pin
OldWarhorse8-Nov-06 3:47
OldWarhorse8-Nov-06 3:47 
QuestionVisual basic Pin
rajuaj7-Nov-06 21:14
rajuaj7-Nov-06 21:14 
AnswerRe: Visual basic Pin
PavanPareta7-Nov-06 21:23
PavanPareta7-Nov-06 21:23 
GeneralRe: Visual basic Pin
rajuaj8-Nov-06 1:08
rajuaj8-Nov-06 1:08 
QuestionHow to get the Base address of an array in VB.net Pin
varmag7-Nov-06 20:10
varmag7-Nov-06 20:10 
Hi All,

We are porting the following VB 6 code in to VB.net

VB 6 Code:

NumChan = GetDppData(objDppApi, VarPtr(DataBuffer(0)))

Here GetDppData is the function declared as below

Public Declare Function GetDppData Lib "DppApi.dll" (ByVal objptr As Long, ByVal DataBuffer As Long) As Integer

Where DPPApi.dll is a registerable COM Dll.

VB.net code :

UseDll.DppApi.GetDppData(objptr, VarPtr(dp4DataBuffer(intMcaChannelCount)))

Where the above function is declared in a module with name UseDll as below

Public Declare Auto Function GetDppData Lib "DppApi.dll" Alias "GetDppData" (ByVal objptr As Integer, ByVal DataBuffer As Integer) As Integer

VarPtr function Definition in VB.Net is as below

Public Function VarPtr(ByVal o As Object) As Integer

Dim GC As System.Runtime.InteropServices.GCHandle = System.Runtime.InteropServices.GCHandle.Alloc(o, System.Runtime.InteropServices.GCHandleType.Pinned)

Dim ret As Integer = GC.AddrOfPinnedObject.ToInt32

GC.Free()

Return ret

End Function



Here the functionality that we are woking is :

We are passing the Address of array to the dll so that it can fill all the array elements using Base address of the array.

The VB 6 code is working fine.

In the case of VB.Net code array is not getting initialized.

Please Guide me How to proceed


Varma
QuestionVB6 connection timeout expired?? [modified] Pin
campbells7-Nov-06 19:33
campbells7-Nov-06 19:33 
AnswerRe: VB6 connection time out error??? Pin
wcwphs7-Nov-06 20:09
wcwphs7-Nov-06 20:09 
GeneralRe: VB6 connection time out error??? Pin
campbells7-Nov-06 21:58
campbells7-Nov-06 21:58 
QuestionCrystal Reports Pin
Deepasubramanian7-Nov-06 19:22
Deepasubramanian7-Nov-06 19:22 
AnswerRe: Crystal Reports Pin
rajuaj7-Nov-06 21:10
rajuaj7-Nov-06 21:10 
Questionvb6 print help Pin
wcwphs7-Nov-06 17:35
wcwphs7-Nov-06 17:35 
QuestionEventHandler Pin
Socheat.Net7-Nov-06 14:49
Socheat.Net7-Nov-06 14:49 
AnswerRe: EventHandler Pin
mr_lasseter7-Nov-06 16:24
mr_lasseter7-Nov-06 16:24 
GeneralRe: EventHandler Pin
Socheat.Net11-Nov-06 15:18
Socheat.Net11-Nov-06 15:18 
GeneralRe: EventHandler Pin
mr_lasseter13-Nov-06 2:19
mr_lasseter13-Nov-06 2:19 
QuestionReading integers from a binary file Pin
Instamatix_Simon7-Nov-06 14:28
Instamatix_Simon7-Nov-06 14:28 
AnswerRe: Reading integers from a binary file Pin
Guffa7-Nov-06 14:59
Guffa7-Nov-06 14:59 
GeneralRe: Reading integers from a binary file Pin
Instamatix_Simon8-Nov-06 15:13
Instamatix_Simon8-Nov-06 15:13 
QuestionExcel to DatGrid Problem Pin
alexfromto7-Nov-06 11:32
alexfromto7-Nov-06 11:32 
AnswerRe: Excel to DatGrid Problem Pin
_mubashir7-Nov-06 22:13
_mubashir7-Nov-06 22:13 
GeneralRe: Excel to DatGrid Problem Pin
alexfromto8-Nov-06 3:06
alexfromto8-Nov-06 3:06 
QuestionHelp Convert C# Threading Code to Vb.net Pin
eatwork7-Nov-06 9:46
eatwork7-Nov-06 9:46 

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.