473,385 Members | 1,472 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB.NET Picture Box Image Pointer?

3
Hi all.

Using VB.NET

I am using a Frame grabber SDK that passes picturebox.handle to a function in the framegrabber dll and the result is that a video frame is displayed in the picture box. That bits fine.

I now need to pass a pointer to that picturebox image to another sdk dll function. I thought that passing picturebox.handle.toint32 was the same as a pointer but I get the following error.

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Could someone tell me how to pass a picturebox image pointer and also maybe someone could explain what a handle is.

All help appreciated!
Jan 24 '08 #1
3 8283
Plater
7,872 Expert 4TB
You will probably have to mark that code as "unsafe" so that it does not safe guard the memory where the pointer is held.
Jan 24 '08 #2
ee0jmt
3
Hi again.

I have realised that I was trying to pass picturebox.handle.toint32 to the dll function. I changed it to:

dim p as intptr
p = picturebox.handle

and then pass p instead. I no longer get the error. However if I save the passed image using the sdk dll function and view it, it is not the image that was in the picturebox.

Is picturebox.handle a pointer to the memory that contains the image or does it need converting?

Could someone point me in the dirrection of some text that explains handles and pointers?
Jan 25 '08 #3
Plater
7,872 Expert 4TB
You could try checking in at the C/C++ or windows forum, since handles and pointers is more their realm then .NET
Jan 25 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: CD | last post by:
The platform is Win03, Access and SQL is available, along with all the normal image components (aspjeg, etc..). I have searched and I could spend several days looking for something. I was...
1
by: Fritz Switzer | last post by:
With two controls a PictureBox and another "PictureBox like" , Pic2, a control from a dll, I'm stuck on cannot implicity convert System.Drawing.Image to System.Drawing.Bitmap error. How do I...
0
by: wolf | last post by:
Hi I had put a PictureBox and three Buttons on a Form. I want the PictureBox show the 1.gif if I click button1 and show 2.gif if I click button2 and so on. But while it running, the value of...
2
by: Noozer | last post by:
Code sample: dim hash as Hashtable 'Declare Hashtable .... hash.add (picOne.image, "picture") 'Error here picOne is a picturebox added to the form at design time with a GIF image applied....
3
by: OptimalDesigns | last post by:
I'm trying to convert my website onto my CD drive (F:). Images are giving me problems due to lack of knowledge for sure. My image url looks like this ......
3
by: abspring | last post by:
Hi I am a technology teacher/support person at an elementary school. I have created a database in which I need to insert a picture for each of our 650+ students. I have a table of student...
1
by: WELCOME ### | last post by:
Hi every one Can I place an Image OR picture in any output program of C++ / without using "Controls"(Native C++) Thanks all ===================================
1
underscore
by: underscore | last post by:
i use a php4 and apache2.0 b4 with mysql4 or lower in my php program. when i use xampp every i can't view my stored image already in html... here's my code. <?php $db_server ="Localhost";...
1
by: MaryKJolly | last post by:
I want to display picture stored in an Access Database in a Picture/Image Box at run time. What should be the data type of the field? What should be the code?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.