Re: ADO in multithreaded: Application Verifier (with WinDbg) gives "Invalid Handle" at the end of my application
- From: "Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom>
- Date: Fri, 24 Nov 2006 18:42:52 -0000
The following is an excerpt from the code:
::Coinitialize(NULL)
Why aren't you examining the return value of ::Coinitialize(NULL) ?
It can be S_OK, S_FALSE or something else. If it is something else, you are
in trouble.
If S_FALSE it has already been initialised.
I only call ::CoUninitialize() if I get a return value of S_OK from
::Coinitialize()
hr = adoConnection->Open("", "", "", adModeUnknown);
The adModeUnknown is wrong and is probably confusing ADO.
It is for setting the Connection Mode property
Instead it should be one of the 2 enums in the ConnectOptionEnum:
adAsyncConnect or adConnectUnspecified
See
http://msdn2.microsoft.com/en-us/library/ms678189.aspx
Stephen Howe
.
- Follow-Ups:
- References:
- Prev by Date: ADO in multithreaded: Application Verifier (with WinDbg) gives "Invalid Handle" at the end of my application
- Next by Date: Re: Too many arguments in Stored Proc (VB6)
- Previous by thread: ADO in multithreaded: Application Verifier (with WinDbg) gives "Invalid Handle" at the end of my application
- Next by thread: Re: ADO in multithreaded: Application Verifier (with WinDbg) gives "Invalid Handle" at the end of my application
- Index(es):