Click here to Skip to main content
16,007,443 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why do you need this kind of code? Pin
11-Oct-01 7:43
suss11-Oct-01 7:43 
AnswerRe: Setting window pos behind desktop icons? Pin
Michael Dunn10-Oct-01 15:47
sitebuilderMichael Dunn10-Oct-01 15:47 
GeneralPlatform SDk problem Pin
Janssens Johan10-Oct-01 13:50
Janssens Johan10-Oct-01 13:50 
GeneralRe: Platform SDk problem Pin
Christian Graus10-Oct-01 14:17
protectorChristian Graus10-Oct-01 14:17 
GeneralRe: Platform SDk problem Pin
Michael Dunn10-Oct-01 15:45
sitebuilderMichael Dunn10-Oct-01 15:45 
GeneralRe: Platform SDk problem Pin
Steen Krogsgaard10-Oct-01 22:21
Steen Krogsgaard10-Oct-01 22:21 
GeneralRe: Platform SDk problem Pin
Michael Dunn10-Oct-01 22:35
sitebuilderMichael Dunn10-Oct-01 22:35 
GeneralCOM client structure Pin
Peter Molnar10-Oct-01 13:43
Peter Molnar10-Oct-01 13:43 
Sirs,

this is my first COM adventure so I need your advise.
I have an in process server with lots of interfaces and even more methods in it.
The manufacturer of the dll provides a sample code snippet of how to get pointers to all the interfaces:

//First object
HRESULT hr = ::CoCreateInstance(...
if ( !FAILED( hr ) ) {

//First interface
hr = pIUnknown->QueryInterface(...
if ( !FAILED( hr ) ) {
//Second interface
hr = pIUnknown->QueryInterface(...
if ( !FAILED( hr ) ) {
//Third interface
hr = pIUnknown->QueryInterface(...
if ( !FAILED( hr ) ) {
...
//Here comes the code that uses the interfaces
...
} else {
...//Third interface failed
}
} else {
...//Second interface failed
}
} else {
...//First interface failed
}
} else {
...//CreateInstance failed
}

Why are the QI calls NESTED? I tried putting them after each other but the same code taken from the nested structure didn't work (Runtime library: abnormal program termination) although all interfaces were succesfully created.
I would like to create the appropriate interfaces in my dialogs' OnInitdialogs and release in the OnDestroyWindow. Is that possible? Any sugggestions?

Thanks for your help in advance.

Bunburry

A subject that is beautiful in itself gives no suggestion to the Artist. It lacks imperfection. (O.Wilde)
GeneralCComboBox Pin
Vu Nguyen10-Oct-01 13:22
Vu Nguyen10-Oct-01 13:22 
GeneralRe: CComboBox Pin
Michael Dunn10-Oct-01 13:39
sitebuilderMichael Dunn10-Oct-01 13:39 
GeneralRe: The other way is ...? Pin
Masaaki Onishi10-Oct-01 15:05
Masaaki Onishi10-Oct-01 15:05 
GeneralGood Win32 resources Pin
EvilSource10-Oct-01 12:31
EvilSource10-Oct-01 12:31 
GeneralRe: Good Win32 resources Pin
Christian Graus10-Oct-01 12:48
protectorChristian Graus10-Oct-01 12:48 
GeneralRepost: CSocket help needed Pin
Peter Sjöström10-Oct-01 12:26
Peter Sjöström10-Oct-01 12:26 
GeneralRe: Repost: CSocket help needed Pin
markkuk10-Oct-01 19:45
markkuk10-Oct-01 19:45 
GeneralRe: Repost: CSocket help needed Pin
Peter Sjöström10-Oct-01 22:29
Peter Sjöström10-Oct-01 22:29 
GeneralSending SMS in Visual C++ Pin
10-Oct-01 11:14
suss10-Oct-01 11:14 
GeneralIcons cache in WIN98 Pin
10-Oct-01 10:04
suss10-Oct-01 10:04 
GeneralHello Michael P Butler and all ! about the ATL ! Pin
10-Oct-01 9:33
suss10-Oct-01 9:33 
GeneralRe: Hello Michael P Butler and all ! about the ATL ! Pin
Carlos Antollini10-Oct-01 9:43
Carlos Antollini10-Oct-01 9:43 
GeneralManny thanks !!! Pin
10-Oct-01 10:06
suss10-Oct-01 10:06 
GeneralRe: Manny thanks !!! Pin
Carlos Antollini10-Oct-01 10:16
Carlos Antollini10-Oct-01 10:16 
GeneralCarlos Antollini and all ! Can you contain aid me in this subject ? Please ! Pin
10-Oct-01 22:03
suss10-Oct-01 22:03 
GeneralRe: Carlos Antollini and all ! Can you contain aid me in this subject ? Please ! Pin
Michael P Butler10-Oct-01 22:17
Michael P Butler10-Oct-01 22:17 
GeneralMany much Thanks Michael !!! and extra small question ! please !!! Pin
10-Oct-01 23:42
suss10-Oct-01 23:42 

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.