|
I'd use this[^] tool to tell which process has the files locked. Once you know that it will be clearer how to proceed.
Steve
|
|
|
|
|
John Simmons / outlaw programmer wrote: The process that loaded the DLLs is no longer running (according to task manager).
Then there must be another process that has it open then since yours is no longer running.
led mike
|
|
|
|
|
Hi there! I´m trying to code an expression evaluator that can be used as an XLL by Excel.
I used the code provided by an article on this site that explains how to make an XLL for interpolation. The whole solution compiles but when I try to add it using Tools->AddIns, a message ops up saying it is an invalid XLL. I think the problem is with my two functions here:
/*
** Expr_EvalX( expression )
**
** The Expr_Val function evaluates an arithmetic expression passed as an argument
** using infix notation, calculating it using Reverse Polish Notation.
** Arguments:
**
** LPXLOPER ... expression String to be evaluated as an expression.
**
** Returns:
**
** LPXLOPER Expr_Eval The result of the evaluated expression. Is equal to
** #VALUE! if result could not be determined (meaning there
** was some freaky error).
*/
__declspec(dllexport) LPXLOPER Expr_EvalX( LPSTR expression )
{
static XLOPER tempXLOper; // Return Data
tempXLOper.xltype = xltypeStr;
tempXLOper.val.str = expression;
return Expr_Eval( (LPXLOPER)&tempXLOper );
}
__declspec(dllexport) LPXLOPER Expr_Eval( LPXLOPER expression )
{
static XLOPER result;
XLOPER buff;
std::string str( (char*)(*expression).val.str );
double exprVal = 0;
int error = 0;
error = ExpressionEvaluator :: calculateDouble( str, exprVal);
buff.val.num = exprVal;
if ( xlretUncalced ==
Excel4( xlCoerce, (LPXLOPER)&result, 1, (LPXLOPER)&buff ) )
{
return 0;
}
// if the "error" variable was set above, something significant failed
// and we should return an error for all x targets
if ( error != 0 )
{
result.xltype = xltypeErr;
result.val.err = error;
return (LPXLOPER)&result;
}
return (LPXLOPER)&result;
}
They are the ones that should work as InterpX and Interp of that article´s XLL.
Could somebody help? Or point me to good articles on the subject.
Thanks!
|
|
|
|
|
template < class type >
class binarytree
{
public:
struct treenode
{
int element;
treenode *left, *right;
treenode() : left(0), right(0) {}
treenode(int item, treenode *leftnode=0, treenode *rightnode=0):element(item), left(leftnode), right(rightnode){}
};
protected:
treenode *root;
BOOL insert(treenode *&tree, const type& item);
....
};
template < class type >
BOOL binarytree<type>::insert(treenode* &tree, const type& item)
{
if ( tree==0 )
{
tree=new treenode(item);
return tree ? TRUE : FALSE;
}
else if (item < tree->element )
return insert(tree->left, item);
else
return insert (tree->right, item);
}
what is thing "BOOL" in this code ?? how can a function return TRUE, FALSE or a node of type treenode at same time. If anyone can clear me this thing BOOL, FALSE, TRUE .. I'l b thankful ...
-- modified at 13:18 Thursday 7th December, 2006
|
|
|
|
|
Pimra wrote: what is thing "BOOL" in this code ??
It's the type that's returned from the insert() method. It usually evaluates to 0 and 1.
Pimra wrote: how can a function return...a node of type treenode at same time.
It's not.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But when i write this code in my compiler that is microsft visual C++ 6.0
it gives error of undeclared identifier ..
true=1, false=0
but this is in caps .. TRUE and FALSE also tht data type is bool not BOOL .. this caps thing gives eror and if replaced by smalls it gives eror for return types .. i simply cant understand this code ..
Sir, if u plz take out little time from ur precious time and try 2 explain a little more , I'l b vry thankful ..
|
|
|
|
|
the BOOL type is either TRUE or FALSE
and
the bool type is either true or false
|
|
|
|
|
Pimra wrote: true=1, false=0
true and false are already defined.
Pimra wrote: ...this caps thing gives eror...
Because TRUE and FALSE have not been defined.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
1. Sounds like the conditional expression syntax is confusing you.
return tree ? TRUE : FALSE; is equivalent to
if (tree != NULL)
return TRUE;
else
return FALSE;
2. A long time ago, in a time now forgotten, the data type bool and it's associated constants of true and false had not been created.
Microsoft wanted a boolean type for use in their Windows code, so they created one and named it 'BOOL'. It was created using a typedef statement. BOOL has associated constants of TRUE and FALSE that are defined using the C-Preprocessor macro facility (in other words, #define). Much code was written using BOOL, TRUE and FALSE.
Some time later, the ANSI committee got around to adding bool to the language as a native type (that is exactly one byte in size). Alas, the Windows code base, which used BOOL, was now quite large. It was a bigger pain to change to use bool than not to change, so BOOL was kept. So we have the legacy in Windows C++ code of seeing both BOOL and bool used.
In order for BOOL to work, the proper headers must be included in the file. The definitions live in <WinDef.h> but if you just include <windows.h> ( or "stdafx.h" if you are using MFC ) before the template definition, the template code will have these values defined.
Dan
Be clear about the difference between your role as a programmer and as a tester. The tester in you must be suspicious, uncompromising, hostile, and compulsively obsessed with destroying, utterly destroying, the programmer's software.
-----
Boris Beizer
|
|
|
|
|
Gave you a 5 for the "tale of the BOOL".
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi,
I have just a teenie weenie humble question. I am a student just learning C++. I have to develop a graphical project in C++ (VC++) and using win32 SDK.
Where can I download this SDK? Help?
I am working on a old machine, Windows 2000 Professional, low memory and with VC++ 6.0 version. I cannot upgrade to XP and hence to VC++ 2005 because my system will not allow it.
Thank you
Dan
|
|
|
|
|
|
thanks toxcct for the reply. I have been up and down the microsoft website for the past 2 days. Maybe i am not familiar with the terminologies, but all i know is that i need a win32 SDK. Now which one is that from all the ones on the link that you have given.
|
|
|
|
|
Download the Feb 2003 Platform SDK: clickety[^]
|
|
|
|
|
What's the best way to get the item height in a list control?
GetItemRect()? Assuming there are items.
Trying to restore a scroll position.
Since Scoll() divides by the height of the control line...
Thanks.
-- modified at 12:45 Thursday 7th December, 2006
|
|
|
|
|
Are you trying to ensure that a previously-selected item is visible the next time your application runs?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
No, my listctrl is a reflection of an internal list. When I update the listctrl I clear it first and just add the items that are in the list. Any data updates are performed on the internal list.
I hope to only update the modifed items in the future, but for now, I am clearing the listctrl. And that's why I need the restore the scroll position.
I'm currently trying to use the item height times the top item's index that I store, and I pass that to Scroll() in the CSize() parameter.
-- modified at 15:00 Thursday 7th December, 2006
|
|
|
|
|
//Store the top item position
topItemIndex = listControl->GetTopIndex();
...
//Scroll window back to original position, assuming starting at 0
if (listControl->GetItemCount() > 0) {
CRect itemRect;
listControl->GetItemRect(0, itemRect, LVIR_LABEL);
int x = 0;
x = listControl->Scroll(CSize(0, topItemIndex * itemRect.Height()));
_ASSERT(x != 0);
}
This seems to work except after to item 500+ it will scroll too far up or all the way to the beginning.
|
|
|
|
|
Anyone know if there is limit as to how many Scroll() can scroll?
|
|
|
|
|
Can't you use SetTopIndex() instead?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Don't see a SetTopIndex() for CListCtrl
|
|
|
|
|
Ooops, thought you we're using CListBox. Never mind....
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I think EnsureVisible() could work for you. Save the top index using GetTopIndex, then use EnsureVisible( nTopIndex, FALSE ) to scroll it into view.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Bless you!
It only scrolls until the index is visible on the bottom, so I add the value from GetCountPerPage() minus one:
...
result = listControl->EnsureVisible(
topItemIndex + listControl->GetCountPerPage() - 1,
FALSE);
_ASSERT(result = TRUE);
...
Seems to work, even on 1000+ items.
Hopefully I'll get the time to rewrite to where only modified items will be updated...
-- modified at 10:41 Friday 8th December, 2006
|
|
|
|
|
Hi,
I wanted to ask a very simple question. Okay I am reading this article on video conferencing(http://www.codeproject.com/internet/videonet.asp[^]), I was wondering is there anyway I could integrate this into like a C# container. I am creating a eLearning system in C#, but I am forced to use C++ for video conferencing since the encoder has not been ported from C++ to C#. So is it possible for me to create the eLearning system in C# and just add video conferencing facility via c++. Thanks
|
|
|
|