|
| using TGuid in c++ builder |
 |
Sun, 4 Nov 2007 15:29:47 -0000 |
Hi:
This may sem simple:
I am trying to define a TGuid varialbe in c++:
I have the following that doesn't compile:
TGUID Directory ="(CC7913EF-214C-40b6-87F7-F6D54FD42440)";
Can someone tell me what is wrong withthis code--and how to fix it.
Regards
Sean.
|
| Post Reply
|
| Re: using TGuid in c++ builder |
 |
Sun, 4 Nov 2007 22:07:24 -0800 |
"Sean Farrow" <sean.farrow@seanfarrow.co.uk> wrote in message
news:472de56b$1@newsgroups.borland.com...
> I have the following that doesn't compile:
> TGUID Directory ="(CC7913EF-214C-40b6-87F7-F6D54FD42440)";
That is a Delphi declaration, not a C++ declaration. In C++, GUID is a
struct, so you have to specify the individual struct members instead, ie:
GUID Directory = {0xCC7913EF, 0x214C, 0x40B6, {0x87, 0xF7, 0xF6, 0xD5,
0x4F, 0xD4, 0x24, 0x40}};
Gambit
|
| Post Reply
|
| Re: using TGuid in c++ builder |
 |
Mon, 5 Nov 2007 09:22:43 -0000 |
Hi:
Thanks, that'll teach me to use two c++ compolers!
Sean.
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:472ea5af$1@newsgroups.borland.com...
>
> "Sean Farrow" <sean.farrow@seanfarrow.co.uk> wrote in
message
> news:472de56b$1@newsgroups.borland.com...
>
>> I have the following that doesn't compile:
>> TGUID Directory ="(CC7913EF-214C-40b6-87F7-F6D54FD42440)";
>
> That is a Delphi declaration, not a C++ declaration. In C++, GUID is a
> struct, so you have to specify the individual struct members instead, ie:
>
> GUID Directory = {0xCC7913EF, 0x214C, 0x40B6, {0x87, 0xF7, 0xF6, 0xD5,
> 0x4F, 0xD4, 0x24, 0x40}};
>
>
> Gambit
>
>
|
| Post Reply
|
| Re: using TGuid in c++ builder |
 |
Mon, 5 Nov 2007 10:17:34 -0600 |
TGUID GUID_DEVINTERFACE = {0x052DB09C, 0x95F7, 0x43BD,{ 0xB7, 0xF8, 0x49,
0x23, 0x73, 0xD1, 0x15, 0x1E} };;
-
Michael
|
| Post Reply
|
| Re: using TGuid in c++ builder |
 |
Wed, 7 Nov 2007 09:00:53 -0600 |
also
TGUID Directory =
StringToGUID("");
> TGUID GUID_DEVINTERFACE = {0x052DB09C, 0x95F7, 0x43BD,{ 0xB7, 0xF8,
> 0x49,
0x23, 0x73, 0xD1, 0x15, 0x1E} };;
Michael
|
| Post Reply
|
|
|