|
-
Aug 5th, 2001, 02:47 AM
#1
Thread Starter
Lively Member
Strting Conversion
Does anyone know how to convert a char string ie char Something[] to a byte string used for so many of the windows base services and again vise versa from byte back to char string.
Thanks for the help
Peter
"Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
-- Judas Priest
My email is [email protected]
-
Aug 5th, 2001, 03:26 AM
#2
Monday Morning Lunatic
byte = char 
What functions are you trying to use? Just pass a pointer to the buffer.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 5th, 2001, 04:09 AM
#3
Thread Starter
Lively Member
Sorry what i ment is i have a char array which is an unsigned char array which is needed by the CryptGetProvParam and this function outputs the keystores to this string and i wanted to put these straight into a list box but the list box won't take the BYTE string (unsigned char) and i think it wants just a standard char string so how can i convert them so i can put the key stores in the list box.
Cheers
Peter
"Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
-- Judas Priest
My email is [email protected]
-
Aug 5th, 2001, 04:13 AM
#4
Thread Starter
Lively Member
This is the error i am getting when i try and pass a pointer to the BYTE string into the listbox.additem.
cannot convert parameter 1 from 'unsigned char *' to 'const char *'
Peter
"Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
-- Judas Priest
My email is [email protected]
-
Aug 5th, 2001, 04:21 AM
#5
Monday Morning Lunatic
listbox.additem ??? Are you using MFC?
Either way, the content of pbData is definitely unprintable, and is different depending on the value of dwParam. What are you using for that?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 5th, 2001, 04:46 AM
#6
Thread Starter
Lively Member
im using PP_ENUMCONTAINERS as the value of dwParam this should in theory return the names of the key containers into pbData.
"Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
-- Judas Priest
My email is [email protected]
-
Aug 6th, 2001, 05:56 AM
#7
Monday Morning Lunatic
Ok. The data returned is a single string, so you can just assign it straight. However, you need to keep calling CryptGetProvParam to retrieve all the provider names.
(Isn't MSDN a wonderful thing? )
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|