S
seppuku
Hello!
I wrote a service application, which fills a exported class from a dll
with data from a access database and sends this filled class in a loop
to a server.
First, I linked the dll dynamically and exported the class through a
function:
// Telegram, Export
extern "C" __declspec(dllexport) TTelegram* CreateTelegram()
{
return new Telegram;
}
Both, the service application and the dll include a header file, in
which the class is abstract.
This way, I can install and start the service application without
problems, but the memory is increasing immense and that's the main
problem.
So i tried and linked the dll in a test application statically and
exported the class like the example in the C++Builder 5 Developer's
Guide:
__declspec(dllexport) class TTelegram
{
....
};
This way, the memory isn't increasing so fast (but still, it is and I
don't know why...) and so I linked the DLL in the service application
statically, too.
I can install the service, but if i like to start it, it says: "Error
193: 0xc1" and in the Eventlog (or Eventhistory, don't know the english
word for it) of Windows it says: "This application is not a valid
Win32 application..."
Could it be, that the service doesn't find the dll? But I put it in the
start directory of the application and in the windows/system32
directory.
I wrote a service application, which fills a exported class from a dll
with data from a access database and sends this filled class in a loop
to a server.
First, I linked the dll dynamically and exported the class through a
function:
// Telegram, Export
extern "C" __declspec(dllexport) TTelegram* CreateTelegram()
{
return new Telegram;
}
Both, the service application and the dll include a header file, in
which the class is abstract.
This way, I can install and start the service application without
problems, but the memory is increasing immense and that's the main
problem.
So i tried and linked the dll in a test application statically and
exported the class like the example in the C++Builder 5 Developer's
Guide:
__declspec(dllexport) class TTelegram
{
....
};
This way, the memory isn't increasing so fast (but still, it is and I
don't know why...) and so I linked the DLL in the service application
statically, too.
I can install the service, but if i like to start it, it says: "Error
193: 0xc1" and in the Eventlog (or Eventhistory, don't know the english
word for it) of Windows it says: "This application is not a valid
Win32 application..."
Could it be, that the service doesn't find the dll? But I put it in the
start directory of the application and in the windows/system32
directory.