|
Use your debugger to locate the problem properly. Press F5 to start, and once the crash occurs, use the callstack to locate the problem in your sources. You will be able to see a bit more in details what the problem might be (you'll also be able to inspect the different variables).
|
|
|
|
|
Its minimum info can you show line that products this error?
|
|
|
|
|
So have you looked at line 1184 of dlgprop.cpp ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi Gurus!
I am a relative newbie to VC++ and I am now working on a small VC++ prj wherein I need to convert what is currently an exported DLL into an exe.
An insight into what the DLL does:
It primarily exports User Interface functions for a parent app. The objective is to convert this DLL into a standalone exe application.
I'd be very thankful for any suggestions to get me going...
Thanks in advance,
Rennie.
|
|
|
|
|
The short answer is: you can't. But what you can do is start a new exe project from scratch and then reuse part of the code of your dll.
|
|
|
|
|
Thank you Cedric.. That much I did gather.
I was actually looking for some coding guidelines on how to convert the exported functions of the DLL when I add them in the exe (maybe a sample..)
Thanks again,
Rennie.
|
|
|
|
|
There's no guidelines because it totally depends of your code and which functionalities you want to 'convert'. There's no automated process neither. Think of it like if you want to take some functionalities of a standalone exe to put them into another one. The problem is the same.
|
|
|
|
|
Rennie76 wrote: I was actually looking for some coding guidelines on how to convert the exported functions...
There should be little, if anything, to convert. The functions, for the most part, can be put in the new project as-is, but you'll want to remove __declspec(dllexport) from them.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks David, this is what I was looking for...
Let me give an example of what the DLL main looks like (it's mainly an User Interface):
<pre>
CResourceModule _Module;
MY_OBJECT_MAP_BEGIN()
MY_OBJECT_ENTRY(WSPACE::UI::IID_MYUIObj, CMYUIObj)
MY_OBJECT_MAP_END()
// DLL Entry Point
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpRs)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
_Module.Init(NULL, hInstance);
DisableThrdLibCalls(hInstance);
MY_RESOURCE_MAP_BEGIN(_Module)
MY_RESOURCE_MAP_MODULE_ENTRY(L"MYUIRes.loc")
MY_RESOURCE_MAP_END()
}
return TRUE;
}
</pre>
My question is if I put the same code (after I remove the explicit DLL references) in the _tWinMain() of my new EXE file, will it work???
|
|
|
|
|
Hi,
In my application i need to create shortcuts for the menu items.
I have done that by overridding the ProcessMessageFilter() method.
For the first time if i run my application all the short cuts are working fine. If i use the same combination again it is not working. Please help me...........
|
|
|
|
|
Hi,
After calling your function, are you passing message to default handler?
Please refer MSDN and its remarks section:
CWinApp::ProcessMessageFilter [^]
--
"Programming is an art that fights back!"
|
|
|
|
|
|
Hi all..
I dont have knowledge on Com...I no Basic Mfc..
I want to study COM..Any good site...where i can study..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Hi Manju,
I strongly recommend that you should learn (or at least begin learning) a technology by reading books. There may be several great articles over the internet, but reading a book is more important and will do you more good. At least that was my experience. Ask people over here to suggest you a good beginners book and I'm sure they will suggest you the best ones.
I'll recommend Beginning MFC COM Programming by Julian Templeman.
CodeProject has a dedicated article section for COM and COM+[^] as well.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
HI sir.
Thank you for ur suggestion..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
|
|
Have also a look to Jeff Glatt's wonderful article series, namely COM in plain C , starting here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I learned a lot from this book, back when COM was a mystical beast: Essential COM[^]
And the follow up book: Effective COM[^]
Sorry to throw more books at you, I know you were looking for a website...
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
|
My advice is to stay away from COM. It's poorly designed, unnecessarily complex, hard to use, and old technology.
.NET is a more modern technology and will be around longer. .NET is easier to use; many tasks in .NET can be done by just invoking a method in a class. To do the equivalent in COM requires writing code that looks like hieroglyphics.
COM is the framework equivalent of Vista.
|
|
|
|
|
I am trying to find out whats the problem with my application when running in debug and release modes. The same code in another application (similar application) doesnt produce the following behavior. In debug mode everything is fine. The situation is, I am initializing an array while starting the application (for example as follows)-
<br />
norm_radius = sqrt(xpos * xpos + ypos * ypos) / constant;<br />
norm_radius_2 = pow(norm_radius, 2.0);<br />
...<br />
sin_angle = sin(angle); cos_angle = cos(angle);<br />
sin_2angle = sin(2 * angle); cos_2angle = cos(2 * angle);<br />
...<br />
data[0] = 0.0;<br />
data[1] = 2 * norm_radius * sin_angle;<br />
data[2] = 2 * norm_radius * cos_angle;<br />
<br />
data[3] = sqrt_6 * norm_radius_2 * sin_2angle;<br />
data[4] = sqrt_3 * (2 * norm_radius_2 - 1);<br />
data[5] = sqrt_6 * norm_radius_2 * cos_2angle;
noting complicated, just simple assignments with some arithmetic functions. But when I run it in release mode, the data is not the same as it is in debug mode (which is the correct one). BTW the above code is in a function which I call form another function while starting the application.
Any ideas/suggestions for why this is happening??
-thanks
PKNT
|
|
|
|
|
Can you show more code? What is data ? If it's an array how big is it? Are you exceeding its capacity?
Steve
|
|
|
|
|
I can show the full code of this function tomm. data is just an array of 65 double elements. These initializations are done in two nested for loops nested. I think if I am exceeding its capacity at least the first elements should be correct, am I right?? I am still why its different between debug and release modes. Actually I am using the same code in another application and it works fine. To say the file in which this code/function is defined is the same in both applications.
-thanks
PKNT
|
|
|
|
|
Please post compilable code snippet and array declaration. I hope you've enabled project settings to debug in release mode or else the compiler will show bogus values.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|