ScottP
11/13/2007 6:53:00 PM
I guess I was not clear enough in my post. This is not a case a missing
files. If you are missing files, then the REGASM operation fails, or
visual basic complains when the object is instantiated.
This is specifically an issue that when the event is raised from the c#
server, the VB6 application crashes.
Thanks,
Scott
Here's the code:
namespace Solarius.Vision
{
public delegate void AlignmentCompletedEventHandler(int uniqueID,
bool succeeded);
[ComSourceInterfaces(typeof(IVisionAlignEvents)),
ClassInterface(ClassInterfaceType.None)]
public class VisionAlignment : IVisionAlign
{
private IDictionary<int, AlignmentJob> m_AlignmentJobs;
private bool m_StopJob;
private VideoDialog m_Dialog;
// Events for vision alignment
public event AlignmentCompletedEventHandler AlignmentCompleted;
....
protected virtual void DoWork(Object stateInfo)
{
AlignmentJob job = stateInfo as AlignmentJob;
if (job == null)
{
OnAlignmentCompleted(0, false);
}
else
{
// State info is valid, proceed with synchronous
alignment job
m_Dialog.PerformAlignment(ref job);
}
m_AlignmentJobs.Add(new KeyValuePair<int,
AlignmentJob>(job.UniqueID, job));
OnAlignmentCompleted(job.UniqueID, job.Succeeded);
}
protected virtual void OnAlignmentCompleted(int uniqueID, bool
succeeded)
{
try
{
if (AlignmentCompleted != null)
{
AlignmentCompleted(uniqueID, succeeded);
}
else
{
m_Dialog.SetStatus("OnAlignmentCompleted Event sink
not set.");
}
}
catch (Exception ex)
{
MessageBox.Show("Error during event: " + ex.Message);
}
}
Walter Wang [MSFT] wrote:
> Hi Scott,
>
> It's hard to say what might be wrong without some code. If you manually
> installed the files on your beta site, maybe there were some required files
> missing on it given the fact that your development box worked fine.
>
>
> Regards,
> Walter Wang (wawang@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>