|
i emailed you with the project sources.
tell me if there are any points that you don't understand
cheers
ps : i'm going home, don't mind if i don't answer immediately
|
|
|
|
|
Yep I can take a look but this week-end I'm away until tuesday.
And it would be nice if you explain me the steps to reproduce the behavior (otherwise I'll spend too much time searching how to fire the exception )
|
|
|
|
|
very easy to reproduce
compile, link, launch, then type enter key when the dialog box appears.
it should display an error message saying "Mathematic expression expected", but it crashes there.
|
|
|
|
|
Damn, Cedric, i'm so happy, simply changing the DLL project runtime library property to multithreaded DLL (/MD or /MDd for debud version) solved the problem...
well, thanks you very much, you were more than useful on this point.
and you have the chance to be the 1st one playing with VisualCalc 3.0 beta 1(at the condition that you rebuild it correctly ).
hope to be able to update the article soon...
humm, well, so have a nice easter week-end dear
-- modified at 14:41 Saturday 15th April, 2006
|
|
|
|
|
Cool !
I'm glad it helped
BTW, I didn't receive your source code, that's strange.
Happy Easter for you too
|
|
|
|
|
Maybe a possible solution. I found that looking on the net (on this page[^])
Does getFileName() comes from a DLL? If so, make sure that your EXE and the<br />
DLL are both compiled with /MD (/MDd in debug builds) so you're both using<br />
the DLL version of the runtime. If you don't do that, you can't pass<br />
std::strings (or many other things) between the DLL and the EXE (or two<br />
DLLs, whatever the case may be).
Hope this will help
|
|
|
|
|
both DLL and exe projects are compiled in debug mode ('cause in the same solution).
|
|
|
|
|
Yep, but go in the properties of your project and go to the code generation tab. There you will have a selection for Runtime Mibrary. Check if this is well Multi-threaded DLL (I don't know exactly how it will affect your code) for both projects. There is also some valuable info in the thread I gave you (and I think I was at least partially right )
|
|
|
|
|
I found another interesting link[^]
I think this is more or less the problem you have.
|
|
|
|
|
A general rule of thumb is that it is not safe to throw an exception across a DLL boundary. Like most rules of thumb if you really know what you're doing you may be able to isolate specific cases in which it if safe to ignore it but in general the rule is sound.
Steve
|
|
|
|
|
Why is VC++ the best language to write an Office COM addin? I mean, why not VB, VBA, java or .NET?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
COM is a microsoft technology, so first, forget java.
VBA is VB for office applications (word, excel, etc), so forget it too.
for managed languages, they simply cannot generate native code...
|
|
|
|
|
v2.0 wrote: VBA is VB for office applications (word, excel, etc),
I do want to create an Office Add-in.
v2.0 wrote: for managed languages, they simply cannot generate native code...
I believe the JIT Compiler of the .NET framework compiles IL to Native code.
Could you give me some good solid reasons?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
LazyKancha wrote: Why is VC++ the best language to write an Office COM addin?
Being the "best" is mostly just a matter of opinion.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hello , I copied a sample from msdn, but the compailer doesn't understend most of the language wordes ,The sample itself not importent for now,Only the compailer problem.
the semple is:
using namespace System;
int main()
{
array<string^>^args = Environment::GetCommandLineArgs();
const double tipRate = 0.18;
double billTotal;
if ( args->Length != 2 )
{
Console::WriteLine( "usage: TIPCALC total" );
return 1;
}
else
{
try
{
billTotal = Double::Parse( args[ 1 ] );
}
catch ( FormatException^ )
{
Console::WriteLine( "usage: TIPCALC total" );
return 1;
}
double tip = billTotal * tipRate;
Console::WriteLine();
Console::WriteLine( "Bill total:\t{0,8:c}", billTotal );
Console::WriteLine( "Tip total/rate:\t{0,8:c} ({1:p1})", tip, tipRate );
Console::WriteLine( ((String^)"")->PadRight( 24, '-' ) );
Console::WriteLine( "Grand total:\t{0,8:c}", billTotal + tip );
return 0;
}
}
/////////////////////////////////////////////////////
and I get this answer from compiler:
/////////////////////////////////////////////
------ Build started: Project: testing_from_books, Configuration: Debug Win32 ------
Compiling...
general_uri.cpp
.\general_uri.cpp(2) : error C2871: 'System' : a namespace with this name does not exist
.\general_uri.cpp(5) : error C2065: 'array' : undeclared identifier
.\general_uri.cpp(5) : error C2065: 'String' : undeclared identifier
.\general_uri.cpp(5) : error C2059: syntax error : '>'
.\general_uri.cpp(5) : error C2653: 'Environment' : is not a class or namespace name
.\general_uri.cpp(8) : error C2065: 'args' : undeclared identifier
.\general_uri.cpp(8) : error C2227: left of '->Length' must point to class/struct/union/generic type
type is ''unknown-type''
.\general_uri.cpp(10) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(10) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(17) : error C2653: 'Double' : is not a class or namespace name
.\general_uri.cpp(17) : error C3861: 'Parse': identifier not found
.\general_uri.cpp(19) : error C2061: syntax error : identifier 'FormatException'
.\general_uri.cpp(19) : error C2310: catch handlers must specify one type
.\general_uri.cpp(21) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(21) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(25) : error C2317: 'try' block starting on line '16' has no catch handlers
.\general_uri.cpp(26) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(26) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(27) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(27) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(28) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(28) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(29) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(29) : error C2059: syntax error : ')'
.\general_uri.cpp(30) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(29) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(30) : error C3861: 'WriteLine': identifier not found
Build log was saved at "file://f:\Documents and Settings\uri\My Documents\אורי\חומר ופרויקטים ב-C++\Visual Studio 2005\Projects\testing_from_books\testing_from_books\Debug\BuildLog.htm"
testing_from_books - 27 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
//////////////////////////////////////////////////////////////
Why
|
|
|
|
|
|
I want to learn some knowledge about OLE and "Inside OLE" is considered to be one of the most classical book about it.I search many website,but still can't find its electronic version.So if anyone have this ebook,I hope you can share it to me.Thanks a lot.
My Email: tombfifa2@hotmail.com
Best wishes!;)
-- modified at 4:34 Friday 14th April, 2006
|
|
|
|
|
Hi people ::- ). I'm working at a wrapper over the Win32 API that will be able to create lots of types of windows, some with tons of special behaviors. This component will be open source and I'll post it here when it's going to be ready. One of the things I'm trying to do is to override how the window gets destroyed. To do this, I got to play a little with the close button of the window.
When one presses this button, the window dies directly. I want to integrate a special behavior which will give me total control of when the window should be destroyed completely. Of course, as you might have already guessed, since this is a Win32 API, I got full control of all messages BUT NO MFC. So how do you think I could override those WM_DESTROY messages?
Thank you in advance ::- D.
-= E C H Y S T T A S =-
The Greater Mind Balance
Blending C++ with COM ^
|
|
|
|
|
|
Thank you Mike, that worked. You're in the "Thanks to..." list *laugh* ::- D.
No, really, you are ::- ).
-= E C H Y S T T A S =-
The Greater Mind Balance
Blending C++ with COM ^
|
|
|
|
|
Use function callback WindowProc and check parameter uMsg is WM_DESTROY
------------------
conglt
|
|
|
|
|
Handel WM_DESTROY in ur Button or use PostMessage() call in your button.
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
I have IP address of remote PC, how do I get username of current user login if my PC and remote PC, both run in a Active Directory domain
-----------------------------------
conglt
|
|
|
|
|
Hi,
i.e. you can use:
NetWkstaUserGetInfo
or
NetWkstaUserEnum - it enumerates currently logged users
-----------
Mila
|
|
|
|
|
Thank you very much
-----------------
conglt
|
|
|
|