Click here to Skip to main content
16,017,857 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Inverse of a matrix(urgent:) Pin
Mark Salsbery2-Jun-07 5:22
Mark Salsbery2-Jun-07 5:22 
AnswerRe: Inverse of a matrix(urgent:) Pin
toxcct2-Jun-07 6:04
toxcct2-Jun-07 6:04 
JokeWRONG!! Pin
Rajesh R Subramanian2-Jun-07 8:37
professionalRajesh R Subramanian2-Jun-07 8:37 
QuestionWH_KEYBOARD_LL Pin
nitin31-Jun-07 22:27
nitin31-Jun-07 22:27 
AnswerRe: WH_KEYBOARD_LL Pin
Rajesh R Subramanian1-Jun-07 22:43
professionalRajesh R Subramanian1-Jun-07 22:43 
Question860312 - using macros Pin
ilostmyid21-Jun-07 22:08
professionalilostmyid21-Jun-07 22:08 
QuestionCLSID Pin
john56321-Jun-07 22:00
john56321-Jun-07 22:00 
AnswerRe: CLSID Pin
Matthew Faithfull1-Jun-07 22:45
Matthew Faithfull1-Jun-07 22:45 
The first problem here is the syntax issue with the CLSID you're passing to CoCreateinstance. the big number with the -'s in is not in a form that the C++ compiler can understand. MIDL which handles .idl files might be OK with this but in a .cpp file it's a no. You have to translate theses GUIDs (Globally Unique IDentifiers) to a struct with curly bracket syntax :-

{0x0000, 0x00, 0x00, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

//Microsoft's definition of a GUID is like this
<br />
typedef struct _GUID <br />
{<br />
  DWORD Data1;<br />
  WORD Data2;<br />
  WORD Data3;<br />
  BYTE Data4[8]; <br />
} GUID;<br />


There is a more fundamental problem here though. It appears you're trying to create an instance of IProperyBag?
If so, this is the root of your problem. You need to be creating an instance of something that implements IPropertyBag. It's like trying to create an instance of surfing, when what you need is an instance of a surfer. The surfer or in this case the thing that does IPropertyBag will have a Class ID (CLSID) and this is what needs to be in the call to CoCreateInstance. A CLSID is just a typedef of a GUID.
If this doesn't make sense or isn't clear (It's a while since I did much COM at this level) I recommend trying the experts in the COM forum who will undoubtedly be able to explain it better.
All the best.Smile | :)





Nothing is exactly what it seems but everything with seems can be unpicked.

QuestionCSplitterWnd Pin
TariqZ1-Jun-07 21:21
TariqZ1-Jun-07 21:21 
AnswerRe: CSplitterWnd Pin
Hamid_RT1-Jun-07 21:58
Hamid_RT1-Jun-07 21:58 
AnswerRe: CSplitterWnd Pin
Mark Salsbery2-Jun-07 5:28
Mark Salsbery2-Jun-07 5:28 
QuestionMail -mfc Pin
prathuraj1-Jun-07 20:09
prathuraj1-Jun-07 20:09 
GeneralRe: Mail -mfc Pin
Matthew Faithfull1-Jun-07 21:56
Matthew Faithfull1-Jun-07 21:56 
AnswerRe: Mail -mfc Pin
Hamid_RT1-Jun-07 21:57
Hamid_RT1-Jun-07 21:57 
Questionseekg() and streampos, C++ Pin
C_Zealot1-Jun-07 17:40
C_Zealot1-Jun-07 17:40 
GeneralRe: seekg() and streampos, C++ Pin
Rajkumar R3-Jun-07 21:48
Rajkumar R3-Jun-07 21:48 
AnswerRe: seekg() and streampos, C++ Pin
C_Zealot3-Jun-07 23:34
C_Zealot3-Jun-07 23:34 
AnswerRe: seekg() and streampos, C++ Pin
Rajkumar R4-Jun-07 2:02
Rajkumar R4-Jun-07 2:02 
QuestionDirectory Search Sort Order Pin
Kaylin1-Jun-07 16:26
Kaylin1-Jun-07 16:26 
AnswerRe: Directory Search Sort Order Pin
Mark Salsbery2-Jun-07 5:34
Mark Salsbery2-Jun-07 5:34 
Questionsystemtray icon Pin
locoone1-Jun-07 16:04
locoone1-Jun-07 16:04 
AnswerRe: systemtray icon Pin
Mark Salsbery2-Jun-07 5:42
Mark Salsbery2-Jun-07 5:42 
AnswerRe: systemtray icon Pin
Hamid_RT2-Jun-07 20:26
Hamid_RT2-Jun-07 20:26 
QuestionExtracting lparam from WM_KEYDOWN MSG Pin
aquawicket1-Jun-07 12:47
aquawicket1-Jun-07 12:47 
AnswerRe: Extracting lparam from WM_KEYDOWN MSG Pin
Mark Salsbery1-Jun-07 13:39
Mark Salsbery1-Jun-07 13:39 

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.