Click here to Skip to main content
15,921,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Socket problem here Pin
jmkhael15-Oct-03 22:33
jmkhael15-Oct-03 22:33 
Generalarabic support Pin
Anonymous15-Oct-03 19:40
Anonymous15-Oct-03 19:40 
GeneralLinker errors on Unicode version of BCGSoft library Pin
Uwe Keim15-Oct-03 19:39
sitebuilderUwe Keim15-Oct-03 19:39 
GeneralRe: Linker errors on Unicode version of BCGSoft library Pin
sexywetdeath17-Oct-03 2:34
sexywetdeath17-Oct-03 2:34 
QuestionHow do I declare a function ? Pin
Anonymous15-Oct-03 18:58
Anonymous15-Oct-03 18:58 
AnswerRe: How do I declare a function ? Pin
Randhir Sinha15-Oct-03 20:17
Randhir Sinha15-Oct-03 20:17 
AnswerRe: How do I declare a function ? Pin
PremL17-Oct-03 6:09
PremL17-Oct-03 6:09 
GeneralMFC DLL Help Pin
Mike Danberg15-Oct-03 17:21
Mike Danberg15-Oct-03 17:21 
Hi all,

Need some help with an MFC dll I have.

I'm connecting/disconnecting to a database using two simple functions.

__declspec(dllexport) void Connect()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

database.Open( "EmployeeManager" );
}

__declspec(dllexport) void Disconnect()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

database.Close();
}

database is declared as global so I can access it all through the dll.

The problem is coming when I exit from the program using the dll. It throws a memory exception. I can't figure out why. I know its a problem with the connection because I tested just opening and connecting, then quitting and the error only occurs if I'm connected. I get an error regardless of whether or not I call disconnect on exit. Any ideas?

Mike
GeneralRe: MFC DLL Help Pin
Mike Danberg15-Oct-03 19:36
Mike Danberg15-Oct-03 19:36 
GeneralRe: MFC DLL Help Pin
Mike Dimmick16-Oct-03 1:18
Mike Dimmick16-Oct-03 1:18 
GeneralRe: MFC DLL Help Pin
Mike Danberg16-Oct-03 6:41
Mike Danberg16-Oct-03 6:41 
GeneralVisual Studio.Net C++ bug Pin
Anonymous15-Oct-03 17:12
Anonymous15-Oct-03 17:12 
GeneralRe: Visual Studio.Net C++ bug Pin
Steve S15-Oct-03 21:57
Steve S15-Oct-03 21:57 
GeneralHTML Help with VC++ in .net Pin
dhhlam15-Oct-03 13:39
dhhlam15-Oct-03 13:39 
GeneralChange the size of the console window Pin
hkl15-Oct-03 13:05
hkl15-Oct-03 13:05 
Questionstd::bad_alloc exception when plenty of memory available? Pin
IGx8915-Oct-03 12:56
IGx8915-Oct-03 12:56 
AnswerRe: std::bad_alloc exception when plenty of memory available? Pin
IGx8915-Oct-03 13:32
IGx8915-Oct-03 13:32 
GeneralRe: std::bad_alloc exception when plenty of memory available? Pin
IGx8915-Oct-03 13:47
IGx8915-Oct-03 13:47 
GeneralInstallShield request Pin
Gary R. Wheeler15-Oct-03 12:46
Gary R. Wheeler15-Oct-03 12:46 
GeneralBEGINNER help me here Pin
15-Oct-03 12:06
suss15-Oct-03 12:06 
GeneralRe: BEGINNER help me here Pin
Terry O'Nolley15-Oct-03 16:15
Terry O'Nolley15-Oct-03 16:15 
GeneralRe: BEGINNER help me here Pin
LOSTTWARE.com15-Oct-03 19:44
LOSTTWARE.com15-Oct-03 19:44 
GeneralRe: BEGINNER help me here Pin
Terry O'Nolley16-Oct-03 10:04
Terry O'Nolley16-Oct-03 10:04 
GeneralAdding bitmap to resources Pin
Tomas Petricek15-Oct-03 11:27
Tomas Petricek15-Oct-03 11:27 
GeneralRe: Adding bitmap to resources Pin
Steve Thresher17-Oct-03 2:38
Steve Thresher17-Oct-03 2:38 

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.