Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Convert object to Byte[*] in C#

Started 4 weeks, 1 day ago by f'lar
The trick here is that s is not a byte array. It's a pointer to a byte array. The function you're using must call into some unmanaged code. You should be able to convert this to a byte array, but it's not something I have to do myself very often so you're on your own from here.
Site: Dev Shed Forums - Open Source web development  Dev Shed Forums - Open Source web development - site profile
Forum: .Net Development  .Net Development - forum profile
Total authors: 2 authors
Total thread posts: 2 posts
Thread activity: no new posts during last week
Domain info for: devshed.com

Other posts in this thread:

radio_floyd replied 4 weeks, 1 day ago
Thanks. I worked on it for a while and found a solution. I will post it here for future reference. Code: Array arr=(Array)buffer; arr.CopyTo(array,0); This converts the byte[*] to byte[] Thanks!!

 

Top contributing authors

Name
Posts
f'lar
1
user's latest post:
Convert object to Byte[*] in C#
Published (2009-11-09 09:19:00)
The trick here is that s is not a byte array. It's a pointer to a byte array. The function you're using must call into some unmanaged code. You should be able to convert this to a byte array, but it's not something I have to do myself very often so you're on your own from here.
radio_floyd
1
user's latest post:
Convert object to Byte[*] in C#
Published (2009-11-09 11:05:00)
Thanks. I worked on it for a while and found a solution. I will post it here for future reference. Code: Array arr=(Array)buffer; arr.CopyTo(array,0); This converts the byte[*] to byte[] Thanks!!

Related threads on "Dev Shed Forums - Open Source web development":

Related threads on other sites:

Thread profile page for "Convert object to Byte[*] in C#" on http://www.devshed.com. This report page is a snippet summary view from a single thread "Convert object to Byte[*] in C#", located on the Message Board at http://www.devshed.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity