Click here to Skip to main content
15,909,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to create a window in general? Pin
Mark Salsbery28-Dec-06 14:33
Mark Salsbery28-Dec-06 14:33 
GeneralRe: How to create a window in general? Pin
Mark Salsbery28-Dec-06 14:38
Mark Salsbery28-Dec-06 14:38 
GeneralRe: How to create a window in general? Pin
Jethro6328-Dec-06 14:45
Jethro6328-Dec-06 14:45 
GeneralRe: How to create a window in general? Pin
prasad_som28-Dec-06 19:41
prasad_som28-Dec-06 19:41 
GeneralRe: How to create a window in general? Pin
Jethro6329-Dec-06 3:20
Jethro6329-Dec-06 3:20 
AnswerRe: How to create a window in general? Pin
prasad_som29-Dec-06 7:02
prasad_som29-Dec-06 7:02 
GeneralRe: How to create a window in general? Pin
prasad_som29-Dec-06 7:08
prasad_som29-Dec-06 7:08 
Questionoctal GUID convertion to string Pin
vga228-Dec-06 6:43
vga228-Dec-06 6:43 
Hi
I am using LDAP protocol (OpenLDAP) to speak to a MS active directory server. I have a DN of a user, and wants to retreive this users msExchMailboxGUID attribute which is (as far as I can read) a octal 16 byte array.

After a little research, I discovered a way to convert this value to a GUID that looks like this (string representation)

{A64B2D95-B730-4F2A-8F74-C6A37C11B7E5} (38 characters)

This works now on my computer which is an Intel based computer WinXP 32bit.

Which is what I am used to when I view GUID entries in MS SQL or .NET language.

I read somewhere that the GUID in memory is presented as

DWORD-WORD-WORD-BYTE BYTE-BYTE BYTE BYTE BYTE BYTE BYTE


I am no expert on the little-endian vs big-endian, but to obtain the guid string above, I had to start with byte [3], byte[2], byte[1] and byte[0], to get the first DWORD correct.

Is there anyone who has any advice on how to do this easier, or any knowledge if the first 4 bytes will always be in this order when I use LDAP protocol?

How can I in c++, convert a 4 byte "number" to an ascii string of 8 hex characters?

I did it by using _snprintf, and %02X for each byte, but I had to pick the bytes in the correct order out of the 16 byte array to get the right GUID.

I'm just posting to see if anyone has some advice or comments.

Thank you for reading.
AnswerRe: octal GUID convertion to string Pin
Michael Dunn28-Dec-06 7:15
sitebuilderMichael Dunn28-Dec-06 7:15 
GeneralRe: octal GUID convertion to string Pin
vga229-Dec-06 2:49
vga229-Dec-06 2:49 
QuestionBizarre printf behaviour Pin
Ed.Poore28-Dec-06 6:12
Ed.Poore28-Dec-06 6:12 
AnswerRe: Bizarre printf behaviour Pin
David Crow28-Dec-06 6:29
David Crow28-Dec-06 6:29 
GeneralRe: Bizarre printf behaviour Pin
Ed.Poore28-Dec-06 6:57
Ed.Poore28-Dec-06 6:57 
AnswerRe: Bizarre printf behaviour Pin
Mark Salsbery28-Dec-06 7:10
Mark Salsbery28-Dec-06 7:10 
GeneralRe: Bizarre printf behaviour Pin
Ed.Poore28-Dec-06 7:28
Ed.Poore28-Dec-06 7:28 
GeneralRe: Bizarre printf behaviour Pin
Mark Salsbery28-Dec-06 7:41
Mark Salsbery28-Dec-06 7:41 
JokeRe: Bizarre printf behaviour Pin
Chris Meech28-Dec-06 11:40
Chris Meech28-Dec-06 11:40 
GeneralRe: Bizarre printf behaviour Pin
Mark Salsbery28-Dec-06 11:50
Mark Salsbery28-Dec-06 11:50 
GeneralRe: Bizarre printf behaviour Pin
Ed.Poore28-Dec-06 12:12
Ed.Poore28-Dec-06 12:12 
AnswerRe: Bizarre printf behaviour Pin
Cristian Amarie28-Dec-06 22:47
Cristian Amarie28-Dec-06 22:47 
GeneralRe: Bizarre printf behaviour Pin
Ed.Poore29-Dec-06 0:05
Ed.Poore29-Dec-06 0:05 
Questionpls help me Pin
davvid28-Dec-06 6:09
davvid28-Dec-06 6:09 
AnswerRe: pls help me Pin
Johan Pretorius28-Dec-06 6:45
Johan Pretorius28-Dec-06 6:45 
GeneralRe: pls help me Pin
davvid28-Dec-06 6:53
davvid28-Dec-06 6:53 
GeneralRe: pls help me Pin
Hamid_RT28-Dec-06 17:19
Hamid_RT28-Dec-06 17:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.