|
by: matt melton |
last post by:
Hi there,
I am trying to write a method that accepts an array of any primitive
type and will return the same array without copying memory as an array
of bytes.
ie. I'd like to be able to do something like:
char chars = "Hello!";
byte bytes = (byte) chars;
|
by: Darrel |
last post by:
I am using binary writer to write an array of bytes to disk. However, my data starts out as an array of sbytes. I am currently type casting each array element in a for loop. Is there a faster method for converting an array of sbytes to an array of bytes?
Thanks,
Darrel
|
by: iyuen |
last post by:
I'm having problems with converting a byte array to an image object~
My byte array is an picture in VB6 StdPicture format. I've used propertybag
to convert the picture into base64Array format in XML, and embedded
the array as some child element in an xml file, i.e.:
<Mask>bHQAAH4AAABCTX4AAAAAAAAAPgAAACgAAAAQAAAAEAAAAAEAAQAAAAAAQAAAAAAAAAAAAA
AA AAAAAAAAAAAAAAAA////AP//AAD//wAA//8AAP//AAD/7wAA//cAALtzAABVeQAAVUAAAFVA...
|
by: Luis Arvayo |
last post by:
Hello,
I am trying to convert a jpeg image stored in a PictureBox to a byte array
in order to later save it to a database, but I get this error : "Generic
Error in GDI+".
The source code is the following (when clicking in a button):
MemoryStream ms = new MemoryStream();
pictureBox1.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); //
|
by: moondaddy |
last post by:
I need to convert a byte array to a string and pass it as a parameter in a
URL and then convert it back to the original byte array. However, its
getting scrambled in the conversion. In short, here's the code:
======================================
Dim textConverter As New ASCIIEncoding
Dim sParam As String = "This is my cool param"
Dim bytParam() As Byte
'load the byte array here...
|
|
by: Phillip Ian |
last post by:
Version: VS 2005
I took the sample code from help about encrypting and decrypting
strings, and changed it to work directly with byte arrays and get the
key and IV values from functions I've written to privide them. No
other changes were made...
Friend Function EncryptBytes(ByVal Data() As Byte, ByVal APassphrase
As String) As Byte()
Try
|
by: philip |
last post by:
Here is some lines of code than I wrote. You can copy/paste theis code as
code of form1 in a new project.
My problem is this one :
I try to write in a file a serie of bytes.
BUT some bytes written in file are not the sent bytes.
Copy and paste the following lines to observe my problem.
What can I do to resolve problem ?
Only System.Text.Encoding.ASCII write the same number of bytes, but not the
good bytes.
Someone can help me. Thanks by...
|
by: Damir Dezeljin |
last post by:
Hi.
I'm developing an application using managed C++. My application has to use a
DLL developed in standard C++. The mentioned DLL implements a class for file
operations. There is a class method uses a pointer to a buffer (e.g. BYTE
*pBuf = new BYTE ) as input / output.
My program has to serialize a 'ref class MyClass' and store it in the file
using the mentioned DLL API. Another invocation of the program has to
deserialize the prior...
|
by: ogtheterror |
last post by:
Hi I have a very limited understanding of Python and have given this the best shot i have but still have not been able to get it working.
Is there anyone that knows how to get this into a .net assembly?
_________________________________________________________
def encrypt_password(challenge, password):
if challenge == 'md5':
inner = md5(challenge + password).hexdigest()
elif challenge == 'sha1':
inner =...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|