Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: global connection to db Pin
David Crow30-Jun-04 2:55
David Crow30-Jun-04 2:55 
GeneralSorry... Pin
JabraJabra30-Jun-04 3:00
JabraJabra30-Jun-04 3:00 
GeneralRe: Sorry... Pin
David Crow30-Jun-04 3:04
David Crow30-Jun-04 3:04 
GeneralRe: Sorry... Pin
JabraJabra30-Jun-04 3:08
JabraJabra30-Jun-04 3:08 
GeneralRe: Sorry... Pin
David Crow30-Jun-04 3:22
David Crow30-Jun-04 3:22 
GeneralRe: Sorry... Pin
Jaime Stuardo30-Jun-04 3:45
Jaime Stuardo30-Jun-04 3:45 
GeneralIT WORKS!!! Pin
JabraJabra30-Jun-04 21:21
JabraJabra30-Jun-04 21:21 
GeneralRe: IT WORKS!!! Pin
Jaime Stuardo1-Jul-04 4:44
Jaime Stuardo1-Jul-04 4:44 
Some additional comments.

1.- Be sure CoInitialize is only called once in your application, and CoUninitialize is called just before shutting down the application.

2.- There was an easy way you could use to know which error occured. You know that CreateInstance returns an HRESULT. If after the call the pointer was 0x00000000, you can know the error by mean of the HRESULT (0 means no error).

For example, write the line this way:
HRESULT hr = ....CreateInstance(...);
or
TRACE("%x", ....CreateInstance(...));

Then copy the resulting code to the clipboard and finally, run the Error Lookup utility (present in Microsoft Visual Studio Tools menu). The copied error code will appear in Value edit box. Press Look Up button and the corresponding message will appear in Error Message window. For example, for your particular error, hr is 0x800401F0... using Error Lookup, you will get the message "CoInitialize has not been called".

Alternatively you can search that HRESULT code in winerror.h file.

Cheers
Jaime
GeneralRe: IT WORKS!!! Pin
JabraJabra1-Jul-04 4:52
JabraJabra1-Jul-04 4:52 
GeneralRe: Sorry... Pin
Antony M Kancidrowski30-Jun-04 6:01
Antony M Kancidrowski30-Jun-04 6:01 
GeneralRe: Sorry... Pin
JabraJabra30-Jun-04 21:11
JabraJabra30-Jun-04 21:11 
Generalglobal app pointer Pin
JabraJabra30-Jun-04 1:52
JabraJabra30-Jun-04 1:52 
GeneralRe: global app pointer Pin
RChin30-Jun-04 2:08
RChin30-Jun-04 2:08 
GeneralTree Ctrl Refreshing Pin
Manicka Vasagam N30-Jun-04 1:38
Manicka Vasagam N30-Jun-04 1:38 
GeneralRe: Tree Ctrl Refreshing Pin
GermanGeorge1-Jul-04 2:07
GermanGeorge1-Jul-04 2:07 
GeneralHelp on dialog boxes! Pin
cheenu_200230-Jun-04 1:14
cheenu_200230-Jun-04 1:14 
GeneralRe: Help on dialog boxes! Pin
Johan Rosengren30-Jun-04 1:43
Johan Rosengren30-Jun-04 1:43 
GeneralRe: Help on dialog boxes! Pin
User 665830-Jun-04 1:44
User 665830-Jun-04 1:44 
QuestionHow to know if Oracle server connectivity is Okay? Pin
mfc_surfer30-Jun-04 1:00
mfc_surfer30-Jun-04 1:00 
AnswerRe: How to know if Oracle server connectivity is Okay? Pin
Jaime Stuardo30-Jun-04 4:48
Jaime Stuardo30-Jun-04 4:48 
Questionhow to commnicate two pcs using usb Pin
Member 120802930-Jun-04 0:21
Member 120802930-Jun-04 0:21 
AnswerRe: how to commnicate two pcs using usb Pin
Henry miller30-Jun-04 2:59
Henry miller30-Jun-04 2:59 
Questionhow can i creat only one instance of my application Pin
Anonymous29-Jun-04 23:45
Anonymous29-Jun-04 23:45 
AnswerRe: how can i creat only one instance of my application Pin
wb30-Jun-04 0:20
wb30-Jun-04 0:20 
GeneralRe: how can i creat only one instance of my application Pin
Anonymous30-Jun-04 1:48
Anonymous30-Jun-04 1:48 

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.