473,411 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Static linking of a DLL in a service application?

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.

Jul 23 '05 #1
1 1376
On 30 May 2005 01:41:27 -0700, se*****@arcor.de wrote in
comp.lang.c++:
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.


You need to ask this in a group like
news:comp.os.ms-windows.programmer.win32, or one of Microsoft's
support groups in the news:microsoft.public.* family.

It is off-topic here, because neither services nor DLLs are defined by
the C++ language, they are Windows specific mechanisms.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mccoyn | last post by:
I'm porting an old project to use .NET. When I try to link in a static library (.lib) that has a single managed class in it. I get the following errors: LINK : error LNK2020: unresolved token...
8
by: Robert A Riedel | last post by:
I have an application that requires a DLL and an executable that uses the DLL, both of which were implemented in Visual C++ using unmanged code. Both the executable and the DLL are linked with...
6
by: depalau | last post by:
I'm running into some issues on maintaining a static variable across the lifetime of a web service and I was wondering if anyone could help. Background: We have developed a C#/1.1 web service...
2
by: ashesman | last post by:
OK, I have written an application in MS Visual C# using .net. Is it posibble to static link into one self contained .exe file? This would certainly make distribution of a small accessory file...
7
by: =?Utf-8?B?UmFtZW5kcmEgS290aGFya2Fy?= | last post by:
Hello, I want to know how to statically link GDIPlus.dll with VC++ application that should be able to run on W2k machine without the existence of GDIPlus.dll on the target machine. Currently,...
0
by: xieml2007 | last post by:
Dear Madam or Sir, I encountered one problem which is quite similiar to the discussions launched at the web site: http://www.thescripts.com/forum/thread280324.html
2
by: amarok | last post by:
I've got a problem - I must to static link to dll library, which is placed in subdirectory of application. I knonw how do it in delphi but I don't known how do it in c++ (builder). In delphi I...
3
by: Pixel.to.life | last post by:
Hi, Gurus, I recently attempted to build a .Net forms application, that links with old style unmanaged C++ static libs. Of course I had to recompile the static lib projects to link properly...
1
by: Jaco Naude | last post by:
Hi, I'm using a static library in my application which links fine except for a few global variables. The static library only contains a bunch of .cpp and .h files and the global variables are...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.