|
ForNow wrote: debugging multithreading code is really fustrating Very true, that's why it is best not to use multi-threading until your code is working.
ForNow wrote: it would seem to me that the call to CAsynSocket::connect has to be serialized
per thread Checking the documentation and your implementation will help you determine if that's true.
|
|
|
|
|
Can someone explain the usage of the run time macros DECLARE/IMPLEMENT_SERIAL
DECLARE/IMPLMENT DYNAMIC DECLARE/IMPLEMENT/DYNCREATE
Thanks
|
|
|
|
|
|
ForNow wrote: explain the usage of the run time macros ... It is all explained here on MSDN[^], which you should learn to use more often.
|
|
|
|
|
I have a Delphi application which Creates a shared memory uses CreateFileMapping, OpenFileMapping, MapViewOfFile functions.
Now I wanted to share the same memory for my MFC application. I used the OpenFileMapping, MapViewOfFile functions.
I created a structure exactly same in size as the Delphi application and mapped the structure object.
sample code:
HANDLE hMapObject2;
hMapObject2 = OpenFileMapping( FILE_MAP_ALL_ACCESS, FALSE, "PP101U3_SHARED");
if( !hMapObject2 )
{
AfxMessageBox("Failed to open Simpack DataBase");
return( 0 );
}
Simpack = ( struct SIMPACKDB *) MapViewOfFile( hMapObject2, FILE_MAP_ALL_ACCESS, 0, 0, 0 );
if( !Simpack )
{
AfxMessageBox("Failed to create Simpack File Map View");
return(0);
}
Esim->SPV1 = Simpack->SP_Z;I am able to read the values exactly correct for all the member variables in the structure.
But when I try to write value in the shared memory, its not changing. It shows the previous value immediately in the debugger watch window.
The value of Simpack->SP_Z[15] is 0.5010 as read from the shared memory which is got from the Delphi application. i.e., value set by the Delphi application
When I set or write the value of the same variable to the shared memory in my MFC Application using the code:
Simpack->SP_Z[15] = 0.6123;
or
float test = 0.6123;
memcpy( Simpack->SP_Z + 16, &test, sizeof(float));it still shows the previous value 0.5010 which is got from the Delphi Application. But When I change the same variable's value in the Delphi applicationit changes and the changed value can be read here in the MFC application.
Please help me to find why I am unable to write or set value in the shared memory from my MFC Application and suggest me with any code how to write the values in the shared memory from my MFC Application.
Is there anything wrong in the code?
Is this happening because I am sharing the memory that is created by a Delphi Application from a MFC Application? i.e., Sharing memory between Delphi and MFC Application is not allowed.
|
|
|
|
|
You still haven't figured this out?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
No I am unable to find out. The Problem is still persisting
|
|
|
|
|
Hi,
As a part of our project's analytical phase, I am doing a research on the methods of putting some software pieces together in a unified user interface. We are a software company having some standalone software selling to the customers. But we decided to rewrite them using Qt and provide customers a all-in-one application suite (like Folder Lock product) and offer them their requested software and features.
There are a variety of methods to do the UI integration such as using COM technology, using plugin frameworks, using simple multi-exe launcher and using component/library compositors.
Does anybody know a guide or survey (not a university-like paper or article) around the currently available software integration techniques with the focus on 'user interface'? The thing I really seek for in this guide is an introduction about each method and then an overall comparison for those methods, their pros and cons. The information would then be used to decide about the technique we adopt in our company.
Thanks for your help
|
|
|
|
|
I'm not certain what the question is or what is the expected goal?
What is "softwre integration" when talking about user interface? is this like having the same UI look and feel across different application from the same "company" (i.e. software suite) ?
If that is the case, just create a simple UI library (or DLL) that will handle all the UI classes and use that library for your different projects.
Aren't you over-complexifying your project?
Or am i missing something ?
Watched code never compiles.
|
|
|
|
|
As I said in the question, we seek for a solution to provide our customers an application suite, but depending on the license or product class (Home edition, enterprise edition, etc) we deliver suites with different capabilities. For example, suppose our suite is a security suite. In home edition we have just file encryption and in Enterprise edition we have both file and disk encryption features.
The magic we look for is a proven method for our developers team to simply define the class type and then build the intended suite. If you, as the customer, later bought a higher class license, you will receive a small package of components which could be easily installed on your system. Launching the original product suite, you will have the new features available in it without having to modify the older installation. This way we have a dynamically configurable component suite with a unified look and feel for the component UI elements.
If you have guide or survey (though not detailed) please send it out to me.
|
|
|
|
|
I don't have a guide or survey; me think it is all done on a case-by-case basis with requirements and specifications specific for each company that does that.
One way of doing it would be to split your project in different sub-projects:
- UI Library: responsible of creating the UI look and feel (this could be optional if you use the default Microsoft UI look and feel and User Experience guideline)
- application launcher : main difficulty is here.
The launcher will be responsible to find all installed components and present them to the user according to the license in place (for example, it could look for executable and extract icons for them, and present them to the user as buttons to click to launch corresponding application.
- discreet applications (file encryption, disk encryption, ... ) : Individual components that could be build and run and tested independently.
Good luck with you projects.
Watched code never compiles.
|
|
|
|
|
Hi friends,
I have started to explore about abstract class and interface. but i could not able find exact solution for my question.
1. when where and how to use abstract class and interface in real time application using C++.
2. What is difference between Abstract class and Interface class?
kindly share your views and idea with me.
Thanks and Regards,
S.Shanmugaraja
|
|
|
|
|
shanmugarajaa wrote: 1. when where and how to use abstract class and interface in real time
application using C++.
Abstract Class: Abstract class provides default behavior for a function. This means, that even if child class does not provide its own method, we have a default behavior for this method. Eg: The classes like CEdit, CButton etc.
Interface: You cannot provide a default behavior in interfaces. Interfaces only allow you to provide signature of the method.
shanmugarajaa wrote: 2. What is difference between Abstract class and Interface class?
You cannot provide access modifiers methods in Interfaces, but access modifiers can be specified in a abstract class.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
1. Abstract classes and Interfaces are basic building blocks of the language, they have nothing to do with real-time or any other type of application, in the sense you are asking about.
2. See this discussion[^] from Microsoft.
|
|
|
|
|
Hi,
I have loop in my code which I try to execute 4 times I have tried a for statment
while statement nothing seems to work
going into assembly mode the compiler doesn't seem to have generated the right code
if tried a for loop
while but the compiler generates a compare for a 1 instead of 4
<pre lang="cpp">249: while(i < 4)
0137149F mov dword ptr [ebp-14h],0
013714A6 mov dword ptr [ebp-10h],2AFFh
013714AD jmp CHERC_CMDApp::InitInstance+341h (13714C1h)
013714AF mov ecx,dword ptr [ebp-10h]
013714B2 add ecx,1
013714B5 mov dword ptr [ebp-10h],ecx
013714B8 mov edx,dword ptr [ebp-14h]
013714BB add edx,1
013714BE mov dword ptr [ebp-14h],edx
013714C1 cmp dword ptr [ebp-14h],1 <===
013714C5 jae 013715BA
250:
|
|
|
|
|
Please post the code for the entire loop.
There must be something wrong with the loop.
|
|
|
|
|
I re-compiled and the loop seems to be working however I got another exception
for which I'll start another thread a little later as I amy need your help
Thanks
|
|
|
|
|
Hi, how could I use GTK+ in CodeBlocks?
|
|
|
|
|
|
hello guys... I have this 4 tabbed program and I am relatively new to MFC so don't know what exactly is happening. When I press Enter on Tab1, the the whole tab page goes blank. When I select Tab2 and come back to Tab1, it becomes alright.
So the question is why does the dialog goes blank and what should I do to prevent this? Thnks
This world is going to explode due to international politics, SOON.
modified 2-Jul-12 7:16am.
|
|
|
|
|
Are your tabs also derived from CDialog?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Yes. But it is solved now. I just overrided OnOK() and OnCancel() in each tab. Thanks for showing interest.
This world is going to explode due to international politics, SOON.
|
|
|
|
|
That's what would have been my suggestion...yourwelcome for the interest.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Hello all,
I would like to know of any software, books or resources I could use to create a software you can boot from the BIOS (basic input-output system), like (1.) you turn on your computer pressing the power button. (2.) You hit the F8 key, (3.) you select boot from CD or from USB [or any other media] (3.) you select the software from what the computer detects and BAM! your software is loading. Something like that.
I've heard of using .img, .lst and just plain files (files without extensions), just like "KonBoot" does (just three simple files).
Simple Thanks and Regards,
Brandon T. H.
Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison
|
|
|
|
|
Brandon T. H. wrote: I would like to know of any software, books or resources
There are some articles[^] here on CodeProject that discuss building your own OS; no doubt they will contain sections on bootstrapping. You can also use Google which will probably have thousands of references.
|
|
|
|