I am currently running an C++ application on a Windows 2000 server that simply recives messages through the Mailslot and writes the recieved messages to a access database via a sequal statment using ADO.
The whole process works about 1000 times and then it will generate the following error in the Event Viewer:
Event Type: Error
Event Source: COM+
Event Category: Executive
Event ID: 4199
Date: 10/17/2001
Time: 7:36:16 AM
User: N/A
Description:
The COM+ Services DLL (comsvcs.dll) was unable to load because allocation of thread local storage failed.
Process Name: Server Status Window.exe
Error Code = 0x80070008 : Not enough storage is available to process this command.
COM+ Services Internals Information:
File: .\comsvcs.cpp, Line: 289
I can clear this problem up by simply stopping the application and restarting it.
Here is the c++ function:
#include <stdio.h>
#include <string.h>
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "EndOfFile" // requires at least version 2.61.7326.0
void main (void)
{
CoInitialize(NULL);
try
{
_ConnectionPtr Conn("ADODB.Connection"
Conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\inetpub\\logonmsg.mdb;","","",adConnectUnspecified);
sprintf(sqlstat, "INSERT into Messages (Dates,Times,Type,UserID,Source,Computer,Description) VALUES ( %s,'%s','%s','%s','%s','%s','%s')", da, tim, typ, usid, org, comp, des);
Conn->Execute (sqlstat, NULL, adCmdText);
Conn->Close();
}
catch(_com_error &e)
{
printf("Description = '%s'\n", (char*) e.Description());
}
::CoUninitialize();
}
And help would be appreciated!
Thanks!
Mark
The whole process works about 1000 times and then it will generate the following error in the Event Viewer:
Event Type: Error
Event Source: COM+
Event Category: Executive
Event ID: 4199
Date: 10/17/2001
Time: 7:36:16 AM
User: N/A
Description:
The COM+ Services DLL (comsvcs.dll) was unable to load because allocation of thread local storage failed.
Process Name: Server Status Window.exe
Error Code = 0x80070008 : Not enough storage is available to process this command.
COM+ Services Internals Information:
File: .\comsvcs.cpp, Line: 289
I can clear this problem up by simply stopping the application and restarting it.
Here is the c++ function:
#include <stdio.h>
#include <string.h>
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "EndOfFile" // requires at least version 2.61.7326.0
void main (void)
{
CoInitialize(NULL);
try
{
_ConnectionPtr Conn("ADODB.Connection"
Conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\inetpub\\logonmsg.mdb;","","",adConnectUnspecified);
sprintf(sqlstat, "INSERT into Messages (Dates,Times,Type,UserID,Source,Computer,Description) VALUES ( %s,'%s','%s','%s','%s','%s','%s')", da, tim, typ, usid, org, comp, des);
Conn->Execute (sqlstat, NULL, adCmdText);
Conn->Close();
}
catch(_com_error &e)
{
printf("Description = '%s'\n", (char*) e.Description());
}
::CoUninitialize();
}
And help would be appreciated!
Thanks!
Mark