|
Thanks... for the info -- but I was hoping not to do it that way.
This DLL contains about 150 classes with many methods in each. Most every class is currently marked declspec(dllexport)....
Is there no way to just strip the name table?
Sounds like I need to write one -- years ago I worked for Borland -- and we had a way to do this -- but, alas, I don't work there anymore... Those days were good -- you could always get a custom version of the linker if you needed it....
Is it the case that the loader (win32) actually resolves these names at runtime -- even if I link to the LIB created when that same DLL is built?
-p
|
|
|
|
|
I think a .DEF file is the only way to do it with MSVC. Check out MFC42.DEF (in [msdevdir]\vc98\mfc\src\intel) - even MS uses a DEF file to export stuff by ordinal.
Is it the case that the loader (win32) actually resolves these names at runtime -- even if I link to the LIB created when that same DLL is built?
Yep. The import LIB goes in your EXE and lists which exports you call. (This is how Depends knows which DLLs your app uses and what functions it calls.) When the PE loader starts up your EXE, it loads all implictly referenced DLLs and checks that they have all the entry points your EXE references.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
oh well -- thanks for the info.
it kinda seems like an opportunity to write a tool -- but it really seems like a good shortcoming of MSVC. BorlandC++ did this nicely -- oh well....
-p
|
|
|
|
|
Is there a way to send lines of formatted text to the rich edit control?
|
|
|
|
|
Hi,
I'm curious about how the floating tools (colors/swatches, history, etc) in Adobe Photoshop are implemented in VC++. At first I thought toolbars, then modeless dialogs, and now I'm wondering if they're CDialogBars or even some funky type of CView? What are your thoughts?
thanks,
Jake
Also, is there a way to get rid of the fat margins on a dialog box, which might make mine look closer to Photoshops?
|
|
|
|
|
I'll bet dollars to donuts that Photoshop does not use MFC. You can change your dialog boxes properties in the dialog editor.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
Hi all!!!
How to create multilanguge application, in which user can change a language during run-time, for example, selecting it from menu.
Thanks.
|
|
|
|
|
Hello, the codegurus around the world.;)
We can load the resource DLL file in InitInstance()
on the user selection or detection of the language OS.
I think that this is the easiest way.
However, we may need some tool to convert English resource file
to Japanese resource file, for example.
You can find some reference of the multi-language in MSDN help.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Thanks.
...but can you explain this more detailed, whith example.
|
|
|
|
|
Try SetThreadLocale function. Create resources in required languages one resource for one language. For example, dialog IDD_ABOUT (English) and IDD_ABOUT (Spanish). Then use SetThreadLocale to choose Your thread locale. Loading IDD_ABOUT dilaog template will load proper version. But this function is only available on NT systems, afaik.
On non-nt system You may try to dynamically change resource handle, but don't know if it work.
I use SetThreadLocale with success in FileMaster, see: www.geocities.com/TeamMukippe/
|
|
|
|
|
The problem is that my applictaion must work in all kind of windows system, even on win95
|
|
|
|
|
Create several language dll's and dynamically load that required one during application startup. Use AfxSetResourceHandle to set resource handle for MFC app. Maybe even it will be possible to change that handle in run-time??
|
|
|
|
|
I do that.
I use AfxSetResourceHandle().
I get the handle of the resources dll and then use AfxSetResourceHandle.
You need to put the AfxSetResourceHandle in several parts of your code because I don't Know why the application loose it.
Cheers!!!
Carlos Antollini.
|
|
|
|
|
I've successfully build the EXE for my program, but when I double click on it to run, a message come up like the one below...
----------------------------------------
Microsoft Visual C++ Debug Library
----------------------------------------
Debug Assertion Failed!
Program - ...Program.EXE
File: dlgdata.cpp
Line: 43
For information on how your program can
cause an assertion failure, see the Visual
C++ documentation on asserts.
Please Retry to debug the application.
= Abort = = Retry = = Ignore =
-----------------------------------------------
That was the message, I've try looking it up in the help file, but no luck. PLease help, the program just won't run even if I press Abort, Retry, or Ignore. When I press Retry, a message come up saying "An Unsupported Operation Was Attempted!"...
Please, I really need to get this thing fix...
|
|
|
|
|
1. Did you try to debug it from IDE?
2. Did you try to build a release version?
I vote pro drink
|
|
|
|
|
F5 Helps
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
Hi, I press F5 to build/compile it, but still receive the same error.
How can I build a release version?
I try to debug it, but I just don't know the proper step. I'm really new to this kind of stuff, please help...
|
|
|
|
|
You use F9 to put a breakpoint in your code, then when you push F5 you will go into debug mode, and the program will stop at your break point. Use F10 to execute a line of code at a time until you find the line that is crashing.
In this case, you just need to go to the line in question of the file in question. It's in MFC and the code looks like this:
if (hWndCtrl == NULL)
{
TRACE1("Error: no data exchange control with ID 0x%04X.\n", nIDC);
ASSERT(FALSE);
AfxThrowNotSupportedException();
}
What it is saying is that you used to have a control in your dialog, you deleted it, and there is still code there trying to link to that control. Get rid of the code related to the control you deleted and it will work.
In future I recommend if an error comes up telling you a file and line number you have a look to see where it crashes so you can figure out why. The TRACE line would also have output this error into your output window, you should read what it say when a program crashes.
Christian
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
|
|
|
|
|
Assumming dlgdata.cpp is something you've written, what does line 43 say?
The best thing to do is to put a breakpoint somewhere and see what you're passing to the particular function...
Cheers, Richard.
|
|
|
|
|
Press Retry, then select View|Debug windows|Call stack. YOu'll see that assert failed inside CDataExchange::PrepareCtrl. Look deeper on the stack to find out who called PrepareCtrl. I have a strong feeling that you have DDX_something on a control with nontexisting identifier inside CYourDialog::DoDataExchange.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
i have just encountered the same problem...
if you had any luck in solving the problem. please do tell.
|
|
|
|
|
I tried "insert activex control" in VC, but can't find the PowerPoint control.
Did you anyone once solve the problem? THank you very very much.
tag
|
|
|
|
|
I haven't heard of any PowerPoint ActiveX control but I have used PowerPoint and other Office apps as out of process COM objects.
|
|
|
|
|
Could you show me some sample code? I 'm a beginner of COM. Thank you
very much.
xiang
|
|
|
|
|
Do you Know the name of that OCX??
Carlos Antollini.
|
|
|
|