|
read This[^] and find the "ASSERT and VERIFY" paragraph, around the middle of the page.
|
|
|
|
|
Thanks for help.
I would like to know about the effect of assertion failure by MFC library (like accessing out of bounds index of CArray) where there is no ASSERT/VERIFY in code. Does it affect only the function where error happens or the overall application. I am eager to know the answer.
Thanks & Regards,
Suman
|
|
|
|
|
M having problems implementing segmentation with histogram. Actually i require histogram to decide my segmentation threshold. Any help???
|
|
|
|
|
Hi, I am trying to set an edit box to read-only during runtime.
I tried the two codes below, both caused the program to close.
m)CEditData.SendMessage(ES_READONLY);
and
m_CEditData.SetReadOnly(TRUE);
How can I toggle the read-only style without crashing?
Thanks
|
|
|
|
|
|
also, make sure the control's HWND is created befory trying any methods to set the read-only
style.
Mark
|
|
|
|
|
What happens if you use of ModifyStyle instead SendMessage
|
|
|
|
|
acerunner316 wrote: m)CEditData.SendMessage(ES_READONLY);
and
m_CEditData.SetReadOnly(TRUE);
Where it takes you in the code if you see callstack during debugging.
There is no harm using these functions, if used this way,
m_ed.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
CRect(10, 10, 100, 100), this, 1);
m_ed.SetReadOnly(TRUE);
-- modified at 0:54 Friday 15th December, 2006
|
|
|
|
|
I've got a problem with a DLL calling a function from a class in the EXE.
Here's the scenario I have. My app needs to give the user the a certain ability if and only if the DLL is present on their machine. (In this case it is a DLL I wrote to print a custom report). So if the DLL exists, when the report is called, the exe passes the object to make the report from to the DLL and the DLL goes to work and make the report.
What I need to be able to do, is to support the object changing in the EXE (new functions, new class members - basically, to be able to change the memory map of the object) and for the DLL (even if it is 3 generations older than the calling EXE) to still take in the object and create the report. This way, the customer can just keep their original custom DLL but still get updates to the product.
Anybody know a way to do this?
Thanks
Dave
|
|
|
|
|
DKScherpy wrote: Anybody know a way to do this?
You mean using an "Interface"?
led mike
|
|
|
|
|
Possibly - I kind of understand what an interface is/works. Can you, or anyone, give me a link or source that I can find an example of?
-- modified at 9:06 Friday 15th December, 2006
|
|
|
|
|
DKScherpy wrote: Can you, or anyone, give me a link or source that I can find an example of?
You should try looking at the "Articles" here on Code Project. They are a great resource.
Using Interfaces in C++[^]
led mike
|
|
|
|
|
[^]
After reading the link above I created a Bridge to be able to call a .NET
assembly and it worked with a unmanged tesp app. But when I try to use the bridge via an Unmanaged dll the dll will not load giving the error loadLibrary(): "Invalid access to memory location". What do I need to do to make this bridge work with my DLL as it works w/ my test app.
Jose Viveiros
Jose Viveiros
|
|
|
|
|
Please don't cross post.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi,
I had posted this question under Managed C++/CLI and I got sent here by the manager. Because this is a unmanaged to managed call I do not know where to go ?
Thanks Jose
|
|
|
|
|
You referenced an article here at Code Project. There is a section below the article to ask the author questions. You might get a reply there.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Is the DLL an MFC extension DLL?
|
|
|
|
|
Hi,
this Unmanaged DLL is not MFC but some of the applications that will use the DLL could be MFC but in this particular test I was using a Console application. The DLL does us some MessageBox() calls.
Jose Viveiros
|
|
|
|
|
Ok, just so I have this right....The DLL is unmanaged. If the app is unmanaged then LoadLibrary
works but if the app is managed then LoadLibrary fails?
|
|
|
|
|
Hi Mark,
No that, Here is the list of modules that work and the list
that does not work.
works works DoesNot work
------------- ------------- -------------
Unmanaged App Unmanaged App Unmanaged App
| | |
UnMng2Mng Bridge Unmanaged Dll Unmanaged Dll
| |
Assembly DLL UnMng2Mng Bridge
|
Assembly DLL
Jose Viveiros
|
|
|
|
|
Hi Mark,
Let me try again (as my last email colapsed some spaces)
works:
Unmanaged App -> UnMng2Mng Bridge -> Assembly DLL
works:
Unmanaged App -> Unmanaged Dll
DoesNot works:
Unmanaged App -> Unmanaged Dll -> UnMng2Mng Bridge -> Assembly DLL
|
|
|
|
|
Ok got it, thanks. And what is failing and where? LoadLibrary on the bridge DLL?
|
|
|
|
|
LoadLibrary( ) is failing to load the Unmanaged DLL if that DLL links to the unManged2Manged Bridge.
What is strange is that the Brige loads fine if it is loaded directly from the Unmanaged app but it causes problem if you try to use it with a unmanged Dll in between ????
Jose Viveiros
|
|
|
|
|
Jose Viveiros wrote: ...if that DLL links to the unManged2Manged Bridge.
How is this "link" done? Through an import library or explicitly with LoadLibrary?
If LoadLibrary, then where are you calling that from in the unmanaged DLL?
|
|
|
|
|
hum !
The link between the unmanaged Dll & the Bridge is not done via loadLibrary.
I link in the Bridge.lib and include bridge.h. Is this a problem?
The link between the App & the unmanged Dll does use loadLibrary
Thanks Jose
Jose Viveiros
|
|
|
|