|
-
Mar 4th, 2002, 11:10 AM
#1
Thread Starter
Hyperactive Member
DLL + resources
What would be the implications, if any, that would occur as a
result of creating a DLL solely for the purpose of storing a very
large string table (200+ entries) that a program would link
to in order to retrieve these strings. I understand that the
static nature of the string table would increase the size of the
DLL's working set but would this have a significant impact on
the performance of the application if you were not constantly
reading these values?
thx for any help
Bababooey
Tatatoothy
Mamamonkey
-
Mar 5th, 2002, 06:45 AM
#2
That's called localization dlls and is done all the time.
No negative impact, except that you must use LoadLibrary to obtain a module handle that you can later use to load resources.
pro: every instance of your app can use the same string storage, you can create international versions simply by replacing the dll (no compiling/linking of the main app required)
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 5th, 2002, 12:55 PM
#3
Thread Starter
Hyperactive Member
I'm trying to get this to work and something is not right.
What am i doing wrong?
in my DLL...
Code:
CString MYLIB_DLLAPI CTestDLL::Message()
{
CString strTemp;
strTemp.LoadString(IDS_STRING1);
return strTemp;
}
and in my test prog...
Code:
CTestDLL test;
CString strTemp = test.Message();
AfxMessageBox(strTemp);
should i be doing something else?
Bababooey
Tatatoothy
Mamamonkey
-
Mar 5th, 2002, 02:18 PM
#4
Thread Starter
Hyperactive Member
nm
AFX_MANAGE_STATE( AfxGetStaticModuleState() );
solves the problem
Bababooey
Tatatoothy
Mamamonkey
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|