|
Great ! Is working, just like the original one ... I didn't replace 2D array by vector, but with CArray ... and is working ! Kindly thank you, NV3 !
|
|
|
|
|
|
Let two exes use same dll in windows platform at particular time.Then what is shared internally?Please correct me if I am wrong.
-Dll file in Hard disk is shared(Single copy).
-Instructions in Dll are loaded once and code can be used by both the executable.
-The objects in the Dlls are also shared by both executable.
Please clear me - The mechanism in windows os. whether this is same across all OS.
Thank you in Advance.
|
|
|
|
|
From MSDN[^]:
DLLs also help reduce memory overhead when several applications use the same functionality at the same time, because although each application receives its own copy of the DLL data, the applications share the DLL code.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
@CPAllinii
Thank you for answer. But if two dlls(having same signature) in two different directories and linked by tw different executable. Then what will happened? Is the design same across different OS.
Please answer.
|
|
|
|
|
|
There's an order by which exe's look for libraries. It will use the first one it finds, I believe CPallini gave you a link that specifies the search order. You can use tools such as Dependency Walker[^] to see what dll specifically is getting loaded by an exe if you're not sure which one it's loading. It is customary that shared dll's are placed in a location where any program that wants to use it has access to it, of course, this will require admin privilidges for your installer (assuming you place the dll copy in a system folder).
|
|
|
|
|
As far as object data (memory), that's not shared at all.... it's just the code that is shared. For example, if you have two exe's using an IO dll, the state of one will not affect the other, they're still independent while running. If you want them to share something, you have to set that up using other means (IPC).
|
|
|
|
|
HI,
I have Visual studio 2005 on WIn7 system. Project dependencies and Buildorder everything is in place and correct.
But it is not Building according to build order correctly when doing clean and Rebuild.
I checked with other win7 sytem it is doing properly there.
Any thoughts.
|
|
|
|
|
It could be because parallel compilation is used on a multi core machine. If two projects are not strictly dependent, they can be built in parallel.
If you wanted to enforce the build order (including single thread compilation), you could set the dependencies in a single row even though theprojects don't really depend on each other. But why would you want to do this?
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
If build order is important, then specify project dependencies. That should make the build order exactly the same every time.
If memory serves right, in a multi-project solution, you can right click on a project and set dependencies within the menus there. When you make one project dependent on the others, Studio will build the dependencies first.
|
|
|
|
|
float determinant(float **input,int order)
{
int j,p,q,t,i;
float pr;
float d;
float *c;
float **answer;
answer=memory_alloc_2D1(order,order);
float **b;
b=memory_alloc_2D1(order,order);
for(j=1;j<=order;j++)
{
int r=1,s=1;
for(p=1;p<=order;p++)
{
for(q=1;q<=order;q++)
{
if(p!=1&&q!=j)
{
answer[r][s]=input[p][q];
s++;
if(s>order-1)
{
r++;
s=1;
}
}
}
}
for(t=1,pr=1;t<=(1+j);t++)
pr=(-1)*pr;
c[j]=pr*determinant(b,order-1);
}
for(j=1,d=0.0;j<=order;j++)
{
d=d+(input[1][j]*c[j]);
}
return(d);
}
main.c
float determinantmatrix;
determinantmatrix=determinant(covariance1,waveframesize);
//covariance1 is the input matrix
|
|
|
|
|
I'll guess that you are attempting to access past the end of an array.
code like this,
for(j=1;j<=order;j++)
would normally look like this.
for(j=0;j<order;j++)
as array access is zero based, from 0 to (size - 1)
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
it compile finely but while running segmentation fault occur and couldnt printf the output.
|
|
|
|
|
That issue (indexing past the end of an array) isn't a syntactic issue and won't be flagged by the compiler, it is a logic issue and you will only see a problem at run time.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
but i cant find out where the logic is getting wrong can u help me out.
|
|
|
|
|
Do you understand what I said about array access?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
even though i change it, its not working..
|
|
|
|
|
The for() loops are wrong.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
maibam debina wrote: //covariance1 is the input matrix But you've not shown how it's defined. If you have something like:
float covariance1[5][8];
And you are trying to access it in determinant() like:
for (int p = 1; p <= 5; p++)
covariance1[p][q]...
You can expect an access violation.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I cant get u properly can u please ellaborate...
|
|
|
|
|
Hello everyone!
I need an important information that how much samples VC++ can plot in real-time. I am taking 500 samples per second . Is it possible to plot these samples real time in our VC++ GUI ?
If yes what is the configuration of system that it could support?
If anyone can help me I am really helpful to them.
Thanks in advance.
|
|
|
|
|
If you need fast plotting, you're more than likely going to have to get very familiar with the Windows GDI[^]. The toolset is very basic but very fast, works great for high-speed plots.
|
|
|
|
|
We would call this a system modal situation, but there is a twist - I have no source code for the application in question (so, no ::SetWindowPos).
The big picture - my application is running, and it's full screen. Think of a kiosk like application... no window manager, no task bar, no keyboard. Should the user choose to, they can invoke a calibration utility for the touchscreen. When calibration is complete, the utility helpfully posts an AfxMessageBox("Calibration complete"). Here's where my woe begins...
If the user is careful, they can press the acknowledge box and the utility terminates. Choose poorly, and the application pops up over the dialog, effectively causing a blocking window inversion.
I think I can work around this by not blocking with the CreateProcess call, but I haven't tried it yet. So, any other ideas? I'm going to write the oem for a variation on the utility, but I don't have much hope there.
thanks
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
You can still use SetWindowPos .
You just need to get the handle to the message box.
FindWindow will get you this handle.
The best way would be to install a shell hook using SetWindowsHookEx which will then give you a notification when the message box pops up and also its handle.
You could then use SetWindowPos on the handle to make it top most.
It is for you to decide if it is worth installing the shell hook because it will effect the entire system.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|