|
-
Jun 29th, 2000, 06:46 AM
#1
Thread Starter
Hyperactive Member
I have a structure being passed to by a callback.
One of the parts in the structure is a long called lpData, which is the address to the data in memory (i assume).
Now in the C equivalent code (which i'm trying to imitate), there is a loop in which loops though the data and gets various bits of info out of it.
Can anyone tell me, knowing (assuming) that the lpData is the pointer to the data in memory, how do i get the info out of memory using that pointer.
Confused? I am and i'm the one trying to do it. I have nearly finished a personal goal and this is what is blocking me at the moment.
Cheers in advance
But_Why
-
Jun 29th, 2000, 08:54 AM
#2
A bit confused about this
Ok directly accessing memory is a time honoured technique in C and assembly
But
This isn't really a technique in VB as such
Hmmm....having said that try something like
Add a textbox to the form and set
textbox1 = lpData
Ok at this stage just want a report back on what shows up in the textbox. Is this memory allocation or what?????
Probably doesn't help you at the moment, but will maybe indicate to you, me, or some one else how to proceed.
-
Jun 29th, 2000, 09:14 AM
#3
Thread Starter
Hyperactive Member
Thanks for that Jethro
I was thinking noone would be able to help.
I will try that tonight and let you know. If it helps then GREAT.
BTW i have seen an API around, i think it was
CopyStructFromMemory, or something to that effect.
Anyone know of it, or something that works similarly.
I'm pretty sure i have seen it before (of course only when i wasn't looking for it), but can't for the life of me find it again.
Cheers
BW
-
Jun 29th, 2000, 11:49 AM
#4
Thread Starter
Hyperactive Member
memory access
Anyone know about GlobalAlloc and GlobalLock
Also CopyStructFromPtr is what i was trying to get at before.
Cheers
-
Jun 29th, 2000, 01:01 PM
#5
Lively Member
I think you can use the CopyMemory API
Take a look at the address for how to use ithttp://www.vbapi.com/ref/c/copymemory.html
-
Jun 30th, 2000, 10:29 AM
#6
Lively Member
just wondering
what structure is being returned by the callback ?
-
Jul 1st, 2000, 02:00 AM
#7
Thread Starter
Hyperactive Member
The struct
Kersey: The callback is returning a buffer from the wavein device. I'm trying to extract the data from the buffer.
Anyone else done this in VB? I have found very little on it on the web. Very little. In fact, pretty much nothing in VB. Not a lot in C either hehehehe.
KWell: I have seen a copymemory thing around, i just couldn't remember what it was called. Thanks for the link, i'll look into it, and see if thats what i'm after.
Cheers guys, look forward to any other replies, and will try Kwells idea.
BW
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|