| | |
Pointers?
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2005
Posts: 4
Reputation:
Solved Threads: 0
Hi all,
I have had some experience using pointers in C and C++, but not in VB6.
I am using a function that requires as an argument (ByVal lPtrBuff As Long, ByVal lWriteSize As Long). I am assuming this means a pointer to the beginning of the data I want to use, and a long integer of the data's size in bytes.
The data I want to use for lPtrBuff is stored in a file. How do I send it to the function? Also, how do I calculate lWriteSize? I don't really understand the internal workings of this function, but if I can send it the right arguments I am pretty sure it will work for me.
Thanks again for any help
Cheers,
Clam
I have had some experience using pointers in C and C++, but not in VB6.
I am using a function that requires as an argument (ByVal lPtrBuff As Long, ByVal lWriteSize As Long). I am assuming this means a pointer to the beginning of the data I want to use, and a long integer of the data's size in bytes.
The data I want to use for lPtrBuff is stored in a file. How do I send it to the function? Also, how do I calculate lWriteSize? I don't really understand the internal workings of this function, but if I can send it the right arguments I am pretty sure it will work for me.
Thanks again for any help
Cheers,
Clam
it would help to have the function name.
basically you would use the function name and pass the variables to it.
{FunctionName} lptr,iwrite
basically you would use the function name and pass the variables to it.
{FunctionName} lptr,iwrite
.: We may acquire liberty, but it is never recovered if it is lost :.
irc://irc.rizon.net/#itf
irc://irc.rizon.net/#itf
•
•
Join Date: Aug 2005
Posts: 4
Reputation:
Solved Threads: 0
this is the function that I want to use. it should be noted however that I didnt write it, I am just trying to use it...
Public Function WriteWavData(ByVal lPtrBuff As Long, ByVal lWriteSize As Long) As Long
Dim lSize As Long
If (m_hMmio = 0) Then
errHandler 5, "WriteWavData"
Else
' Write to the data chunk:
lSize = mmioWrite(m_hMmio, ByVal lPtrBuff, lWriteSize)
' Check we wrote the right number of bytes:
If Not (lSize = lWriteSize) Then
errHandler 6, "WriteWavData"
End If
WriteWavData = lSize
End If
End Function
What I mean by my question, however is that the wave data that I want it to write is stored in a file. How do I cram that into that function?
Public Function WriteWavData(ByVal lPtrBuff As Long, ByVal lWriteSize As Long) As Long
Dim lSize As Long
If (m_hMmio = 0) Then
errHandler 5, "WriteWavData"
Else
' Write to the data chunk:
lSize = mmioWrite(m_hMmio, ByVal lPtrBuff, lWriteSize)
' Check we wrote the right number of bytes:
If Not (lSize = lWriteSize) Then
errHandler 6, "WriteWavData"
End If
WriteWavData = lSize
End If
End Function
What I mean by my question, however is that the wave data that I want it to write is stored in a file. How do I cram that into that function?
![]() |
Similar Threads
- Pointers (archived tutorial) (C++)
- Problem About Pointers (C++)
- New to C++ Pointers and need help with identifying where the errors are (C++)
- Linked List using pointers (C++ ADT) (C++)
- Why can't I use Pointers to point to a Enumurated Constant (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: how to simulate a round robin scheduler
- Next Thread: Password
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





