Click here to Skip to main content
16,007,277 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: User Control problem/error Pin
Shawn200010-Mar-05 8:38
Shawn200010-Mar-05 8:38 
GeneralRe: User Control problem/error Pin
Dave Kreskowiak10-Mar-05 9:47
mveDave Kreskowiak10-Mar-05 9:47 
GeneralRe: User Control problem/error Pin
Shawn200010-Mar-05 10:23
Shawn200010-Mar-05 10:23 
Generaldataset sharing between forms Pin
rayfouc10-Mar-05 7:14
rayfouc10-Mar-05 7:14 
GeneralRe: dataset sharing between forms Pin
Raistlin21_4510-Mar-05 8:00
Raistlin21_4510-Mar-05 8:00 
GeneralRe: dataset sharing between forms Pin
j45mw12-Mar-05 17:12
j45mw12-Mar-05 17:12 
Generalplaying a wav file Pin
Raistlin21_4510-Mar-05 7:07
Raistlin21_4510-Mar-05 7:07 
GeneralHelp Required Upgrading VB6 project to VB Net -> specifically VarPtr solution Pin
Quenchmaster10-Mar-05 1:40
Quenchmaster10-Mar-05 1:40 
i have been trying to upgrade the VB6 project that can be
found at
http://www.vbaccelerator.com/home/VB/Code/vbMedia/Audio/WAV_File_Viewer/article.asp
I have managed to get the majority done, using a combination of the upgrade
facility and some programming of my own. I have now unfortantly got stuck
with the following line of code: Sniff | :^)

copymemory(VarPtrArray(iWav), VarPtr(tSA), 4)

(copymemory being the standard API call to RtlMOveMemory in kernel32)

The problem i have is the VarPtr command, and to some extent the VarPtrArray
command. I need a solution for VBnet.


Background information:
tSA is variable of the following structure:

StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi) _<br />
Private Structure SAFEARRAYBOUND<br />
Dim cElements As Integer<br />
Dim lLbound As Integer<br />
End Structure<br />
<br />
StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi) _<br />
Private Structure SAFEARRAY2D<br />
Dim cDims As Short<br />
Dim fFeatures As Short<br />
Dim cbElements As Integer<br />
Dim cLocks As Integer<br />
Dim pvData As Integer<br />
VBFixedArray(1) Dim BoundsR() As SAFEARRAYBOUND<br />
Public Sub Init()<br />
ReDim BoundsR(1)<br />
End Sub<br />
End Structure


and is created just before the copymemory line by

Dim tSA As SAFEARRAY2D<br />
tSA.Init()


and propulated with

With tSA<br />
.cbElements = 2<br />
.cDims = 2<br />
.BoundsR(0).lLbound = 0<br />
.BoundsR(0).cElements = m_cWAVRead.ReadbufferSize<br />
.BoundsR(1).lLbound = 0<br />
.BoundsR(1).cElements = 2<br />
End With


iwav is created in the following method

Dim iWav() As Short

If you need any more information please email me at
adrian.game@nospamWarwick.ac.uk (please remove the nospam)
or reply to the post. I have both the orignal VB6 project, the VBnet project
created using the upgrade wizard and my
own semi working version.

Thanks for any help provide

Adrian
GeneralRandom Number Generator Pin
jarlath9-Mar-05 23:35
jarlath9-Mar-05 23:35 
GeneralRe: Random Number Generator Pin
J4amieC10-Mar-05 5:02
J4amieC10-Mar-05 5:02 
GeneralRe: Random Number Generator Pin
jarlath10-Mar-05 11:12
jarlath10-Mar-05 11:12 
QuestionHow to make a start up form using the coding. Pin
ADY0079-Mar-05 22:59
ADY0079-Mar-05 22:59 
AnswerRe: How to make a start up form using the coding. Pin
Dave Kreskowiak10-Mar-05 5:11
mveDave Kreskowiak10-Mar-05 5:11 
Generalabt c graphics Pin
Anonymous9-Mar-05 19:41
Anonymous9-Mar-05 19:41 
GeneralRe: abt c graphics Pin
Dave Kreskowiak10-Mar-05 5:08
mveDave Kreskowiak10-Mar-05 5:08 
GeneralDatabase in Sql Server Pin
eshban2849-Mar-05 19:25
eshban2849-Mar-05 19:25 
GeneralRe: Database in Sql Server Pin
Dave Kreskowiak10-Mar-05 5:05
mveDave Kreskowiak10-Mar-05 5:05 
GeneralTransparent TextBox in VB6 Pin
loane9-Mar-05 19:20
loane9-Mar-05 19:20 
GeneralRe: Transparent TextBox in VB6 Pin
Dave Kreskowiak10-Mar-05 4:22
mveDave Kreskowiak10-Mar-05 4:22 
GeneralForm in Vb.net Pin
eshban2849-Mar-05 19:07
eshban2849-Mar-05 19:07 
GeneralRe: Form in Vb.net Pin
Anonymous9-Mar-05 19:14
Anonymous9-Mar-05 19:14 
QuestionInserting into a collection possible? Pin
sam@twmi.rr.com9-Mar-05 16:31
sam@twmi.rr.com9-Mar-05 16:31 
AnswerRe: Inserting into a collection possible? Pin
Dave Kreskowiak10-Mar-05 4:15
mveDave Kreskowiak10-Mar-05 4:15 
GeneralRe: Inserting into a collection possible? Pin
sam@twmi.rr.com10-Mar-05 11:46
sam@twmi.rr.com10-Mar-05 11:46 
GeneralRe: Inserting into a collection possible? Pin
Dave Kreskowiak10-Mar-05 12:04
mveDave Kreskowiak10-Mar-05 12:04 

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.