Click here to Skip to main content
15,924,482 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 11:33
Mark Salsbery1-Jun-07 11:33 
GeneralRe: GDI / GDI+ Pin
Adno1-Jun-07 11:55
Adno1-Jun-07 11:55 
GeneralRe: GDI / GDI+ Pin
Mark Salsbery1-Jun-07 12:02
Mark Salsbery1-Jun-07 12:02 
QuestionHow to get GUID Pin
john56321-Jun-07 3:31
john56321-Jun-07 3:31 
AnswerRe: How to get GUID Pin
Roger Stoltz1-Jun-07 4:13
Roger Stoltz1-Jun-07 4:13 
AnswerRe: How to get GUID Pin
CPallini1-Jun-07 5:44
mveCPallini1-Jun-07 5:44 
QuestionRe: How to get GUID Pin
john56321-Jun-07 21:15
john56321-Jun-07 21:15 
AnswerRe: How to get GUID Pin
CPallini3-Jun-07 2:55
mveCPallini3-Jun-07 2:55 
pther wrote:
hr=::CoCreateInstance(uuid(47000673-7DB2-44C9-8AC1-65266117D280),NULL,CLSCTX_INPROC_SERVER,
__uuidof(IPropertyBag),(void**) &Properties);


You cannot use the CLSID string (47000673-7DB2-44C9-8AC1-65266117D280) that way, you have EITHER TO:

(1) Properly initialize the GUID struct members (The following example deals with MsComm control, asking for IUnknown interface):

GUID guid;
IUnknowun *pUnk;
// {648A5600-2C6E-101B-82B6-000000000014}
guid.Data1 = 0x648A5600;
guid.Data2 = 0x2C6E;
guid.Data3 = 0x101B;
guid.Data4[0] = 0x82;
guid.Data4[1] = 0xB6;
guid.Data4[2] = guid.Data4[3] = guid.Data4[4] = guid.Data4[5] =   guid.Data4[6] = 0x00;
guid.Data4[7] = 0x14;
hr = CoCreateInstance( guid, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **) &pUnk);

OR
(2) Use the UuidFromString to perform the task, i.e.
GUID guid;
IUnknown * pUnk;
RPC_STATUS Status = UuidFromString((unsigned char *)"648A5600-2C6E-101B-82B6-000000000014", &guid);
hr = CoCreateInstance( guid, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **) &pUnk);


Please note that point (2) requires the rpc.h header in your source file and to link your project with rpcrt4.lib library.

Hope that helps.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

QuestionCopy constructor Pin
Karismatic1-Jun-07 1:39
Karismatic1-Jun-07 1:39 
AnswerRe: Copy constructor Pin
Maximilien1-Jun-07 1:44
Maximilien1-Jun-07 1:44 
AnswerRe: Copy constructor Pin
Cedric Moonen1-Jun-07 1:46
Cedric Moonen1-Jun-07 1:46 
GeneralRe: Copy constructor Pin
Jeffrey Walton1-Jun-07 8:03
Jeffrey Walton1-Jun-07 8:03 
AnswerHomework? Pin
leckey1-Jun-07 4:59
leckey1-Jun-07 4:59 
GeneralRe: Homework? Pin
bob169721-Jun-07 7:32
bob169721-Jun-07 7:32 
GeneralRe: copy construtors : other stuff Pin
tom groezer1-Jun-07 10:22
tom groezer1-Jun-07 10:22 
QuestionFlow of messages in VC++ Doc-view architecture Pin
Karismatic1-Jun-07 1:36
Karismatic1-Jun-07 1:36 
AnswerRe: Flow of messages in VC++ Doc-view architecture Pin
jhwurmbach1-Jun-07 6:27
jhwurmbach1-Jun-07 6:27 
QuestionRe: Flow of messages in VC++ Doc-view architecture Pin
David Crow1-Jun-07 6:56
David Crow1-Jun-07 6:56 
AnswerRe: Flow of messages in VC++ Doc-view architecture Pin
jhwurmbach3-Jun-07 23:43
jhwurmbach3-Jun-07 23:43 
GeneralRe: Flow of messages in VC++ Doc-view architecture Pin
David Crow4-Jun-07 2:23
David Crow4-Jun-07 2:23 
QuestionMultithreading in VC++ Pin
Karismatic1-Jun-07 1:33
Karismatic1-Jun-07 1:33 
AnswerRe: Multithreading in VC++ Pin
Programm3r1-Jun-07 1:42
Programm3r1-Jun-07 1:42 
GeneralRe: Multithreading in VC++ Pin
Hamid_RT1-Jun-07 2:15
Hamid_RT1-Jun-07 2:15 
AnswerRe: Multithreading in VC++ Pin
toxcct1-Jun-07 2:13
toxcct1-Jun-07 2:13 
AnswerRe: Multithreading in VC++ Pin
Hamid_RT1-Jun-07 2:13
Hamid_RT1-Jun-07 2:13 

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.