Click here to Skip to main content
15,914,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Skipping Bytes When Reading Files Pin
Scott H. Settlemier27-Sep-04 9:43
Scott H. Settlemier27-Sep-04 9:43 
GeneralRe: Skipping Bytes When Reading Files Pin
shaileshkumar27-Sep-04 20:59
shaileshkumar27-Sep-04 20:59 
GeneralRe: Skipping Bytes When Reading Files Pin
David Crow28-Sep-04 5:02
David Crow28-Sep-04 5:02 
QuestionPlaySound crash under Win ME? Pin
LukeV27-Sep-04 8:24
LukeV27-Sep-04 8:24 
GeneralSockets and future portability Pin
Ivanets27-Sep-04 8:09
Ivanets27-Sep-04 8:09 
GeneralRe: Sockets and future portability Pin
cmk27-Sep-04 11:39
cmk27-Sep-04 11:39 
GeneralRadio buttons in Treeview (like the Folder Optionsin Windows Explorer) Pin
klkeng27-Sep-04 7:00
klkeng27-Sep-04 7:00 
GeneralADO Crashing big time! Pin
Chris Ulliott27-Sep-04 6:30
Chris Ulliott27-Sep-04 6:30 
Hi all,

I have written a DLL that is statically linked to the MFC and it #imports ADO just like this...


// LOAD ADO<br />
#pragma warning(push)<br />
#pragma warning( disable : 4146 )   // ADO compile warning cannot be avoided<br />
<br />
// ADO Extension Libraries<br />
#import "c:\Program Files\Common Files\System\ADO\msadox.dll"<br />
<br />
// ADO Standard Libraries<br />
#import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF","EndOfFile")<br />
<br />
#pragma warning( default : 4146 )   // Restore warnings for rest of application<br />
#pragma warning(pop)


My DLL has a global variable defined as :


_ConnectionPtr pConn;

The first function exported calls CoInitialize(NULL) and this works fine.

Next some other exported function calls use the pConn variable to check if we can connect to a given database. This works fine and no exceptions are created.

The last function exported calls ::CoUninitialize() and this works ok.

My problem at the moment is that after I call the last exported function I then close my test application. When I close my test application I am getting a serious access violation as follows:

'Unhandled exception in (MSDART.DLL) 0xC0000005: Access Violation'

I have MDAC 2.71.9040.2 installed. I am running on Windows 2k and using MSVC6.0.

Any ideas you can offer me would be greatly appreciated.

Kind Regards,

Chris
GeneralRe: ADO Crashing big time! Pin
Anonymous27-Sep-04 7:04
Anonymous27-Sep-04 7:04 
GeneralRe: ADO Crashing big time! Pin
Chris Ulliott27-Sep-04 23:46
Chris Ulliott27-Sep-04 23:46 
Generalaaa Pin
Anonymous27-Sep-04 6:25
Anonymous27-Sep-04 6:25 
Generalbbb Pin
ThatsAlok27-Sep-04 19:27
ThatsAlok27-Sep-04 19:27 
GeneralDettecting Change to windows appearance / XP styles Pin
Tristan Rhodes27-Sep-04 6:25
Tristan Rhodes27-Sep-04 6:25 
GeneralRe: Dettecting Change to windows appearance / XP styles Pin
Yves Tkaczyk27-Sep-04 7:51
Yves Tkaczyk27-Sep-04 7:51 
GeneralRe: Dettecting Change to windows appearance / XP styles Pin
Tristan Rhodes27-Sep-04 8:24
Tristan Rhodes27-Sep-04 8:24 
QuestionHow to load own bitmap icon in place of miscrosoft default image in VC++ application Pin
mnarayan27-Sep-04 6:10
mnarayan27-Sep-04 6:10 
AnswerRe: How to load own bitmap icon in place of miscrosoft default image in VC++ application Pin
Tom Wright27-Sep-04 6:41
Tom Wright27-Sep-04 6:41 
GeneralRe: How to load own bitmap icon in place of miscrosoft default image in VC++ application Pin
mnarayan27-Sep-04 8:52
mnarayan27-Sep-04 8:52 
GeneralRe: How to load own bitmap icon in place of miscrosoft default image in VC++ application Pin
Tom Wright27-Sep-04 9:41
Tom Wright27-Sep-04 9:41 
GeneralRe: How to load own bitmap icon in place of miscrosoft default image in VC++ application Pin
mnarayan27-Sep-04 10:21
mnarayan27-Sep-04 10:21 
GeneralMonitoring a folder for new files Pin
BlackDice27-Sep-04 6:04
BlackDice27-Sep-04 6:04 
GeneralRe: Monitoring a folder for new files Pin
Tom Wright27-Sep-04 6:45
Tom Wright27-Sep-04 6:45 
GeneralRe: Monitoring a folder for new files Pin
David Crow27-Sep-04 8:20
David Crow27-Sep-04 8:20 
GeneralRe: Monitoring a folder for new files Pin
l a u r e n27-Sep-04 13:38
l a u r e n27-Sep-04 13:38 
GeneralRe: Monitoring a folder for new files Pin
David Crow28-Sep-04 5:07
David Crow28-Sep-04 5:07 

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.