PDA

Click to See Complete Forum and Search --> : Next level ActiveX alerts


alex_bogdan
Jul 19th, 2005, 04:10 AM
Hy all! I've developped an ActiveX control to send reports via e-mail and it finaly works, but there are still 3 issues:

1. the control is marked safe for scripting and this statement is recognized on a XP machine, but the same control is considered as Unsafe for scripting on a Win2000 computer and is blocked. Any ideea about what i should do to overcome this problem?

2. althow the control is safe for scripting, and officialy signed when it runs it triggers an alert like "this program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose <<NO>>" and just after that another alert "A program is trying to automatically send e-mail on your behalf. Do you want to allow this?..." . Since our employees have to send even hundreds of reports at once and to have access to change the recepients addresses I call the objects method inside a java script for every confirmed address and I get these alerts for each call..... Is there a way around these warnings?

3. after running ok for a while or when I close the IE window I get sometimes an error that says :

Debug assertion failed!
Program: C:\Program Files\Internet Explorer\iexplore.exe
File: cmdtarg.cpp
Line: 52
For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.
What is exactly an assertion an how can I debug it in a simple way since the msdn articles are very vague on this issue?

yrwyddfa
Aug 5th, 2005, 05:47 AM
An assertion is a statement that you expect to be correct.

IN VB, for instance you can use the debug.assert [a condition] at the beginning of a function, say.

The debugger will break if this assertion is not true.

Very useful if you want to check that function parameters are within certain bounds:

You may want to pass in a month to a function:


function ProcessMonth(Mth as long) as long
debug.assert mth>0 and mth<13

. . . blah blah blah


This assertion will break if the month is out of bounds. Very useful for debugging, indeed