From: Geoff Schaller on
Hi Folks.

Here is my Easter gift to you all. It is basically an example of how VO
can use COM to exploit what is very easy in C# and very hard in VO
natively. You might even find a production use for it.

It is all about VO generating emails, tasks, appointments, report
services report viewers, direct print reports, bulk emails, error
handlers and more.

ftp://www.softwareobjectives.com.au/anonymous/so.service.client.zip

For newcomers, see the notes way down below...
New things for March: bulk email facility.
For April: Setting and managing user passwords.

Your email dialog now includes an option to group BCC addresses into
blocks of 'x' emails. There is also a send timeout that you can
adjust to get through things like satellite connections. Even the
IsRunning() command has its own timeout extender in case you have a
wonky connection.

This is a stand-alone app so you don't have to have anything else to
make it work. All source code to the client is offered but I would
probably want to charge a small something if you want the C# source and
your own web service.

Let's go over the basics again:

1. Download the zip.
2. Import all the AEF's into a VO project and compile.
3. Put ALL the dll's into your VO executable folder (be it
BIN or your own)
4. Run the app
5. Register the dll's (they are new) – there is a button
for this.
6. Copy the dlls to wherever there is an exe that is going to
use them.
7. It works on XP, Vista, W7 and 32 bit or 64 bit.

So, there are three components to this system:

1. A web service. Just needed for the email side of things.
Currently this is running on my server and you are welcome to test with
it. This web service can be anywhere and the COM client can be given any
URL to use instead of mine. The web service logs all activity and all
outgoing emails into a SQL Server database (Obviously could be yours in
your web service). It logs all error messages it receives and it links
to your Outlook 2007 and MS SQL Server 2008 installations if you have
them. For anyone who wants to go production with this then let me know
and I will organise you your own web service.

2. A COM dll. This is basically a C# application that does
all the smarts. Being COM it can be used with VO, C#, VB or anything. It
needs to be registered and only needs the web service for email
facilities. The Outlook options prefers Outlook 2007 (but 2003 works)
and you can choose between my email client and the Outlook one. Bulk
emails require my client because it uses my server to bypass anti-spam
provisions.

3. A Client – see the VO one. I can't attach a screen shot
for the news group because many readers won't allow it. However you have
the VO AEF so you can look at it yourself.

Here now is the description from my first public release:

....In it is my latest version of our integration component, including
the VO generated classes and a small sample application showing how to
use it. The big issue has been making something to register the COM
object seamlessly for the user. I had to make it work for 32 bit, 64
bit, XP, Vista and W7. And it does, as long as the Dot Net Framework 2.0
is installed. This should be the case for almost all PCs anyhow.

Ok, so what is it and why? Well as we move to MS Office integration and
Sharepoint features, we wanted some simple way to extend VO application
functionality but using C#. I wanted a consistent interface that could
be extended with new functions as time went by. The reason is simple
enough. In C# it is easy and in VO it is hard. This application is a
perfect example of how we access C# from VO and a demonstration of
C#'s superiority in such matters. Here is what is in the Zip:

• A stack of DLL's. You need to put these into every executable
folder using the COM component.
• A TLB file (type library) if you want to mess with your own server
generation, otherwise ignore it
• Three VO aefs that are the minimum required to run the sample
• The Library AEF has OLE classes which are generated from the
Automation Server for you

To test this from the VO IDE, put the DLL's in your default executable
folder (or cavo bin), import the aefs, compile and run. Make sure you
register the COM object (there is a button on the test form for this)
but I have added an example of the necessary error handling to be
“safe” from a user perspective, in case they don't. For your own
applications, should you decide to use it, you will need only the two
library AEF's but use the sample exe AEF as a guide on how to use it.
Consult the Registered types MEFs to see all the functionality we have
extended - obviously the sample only goes so far. To force registration
of the COM object in your client's machines you will need something to
trigger the function call. I detect a version change and do this
forcefully.

So now for a brief description of the functionality:

1. Reporting Services Reports Viewer

This cool little tool will display reports from SQL Express Report
Server, full blown Report Server, RDLC local reports and Sharepoint
Integrated servers. By using the Report Viewer it means we can control
the parameter block, supply defaults, get the user to add them if
desired or hide specific ones, print without displaying the preview
dialog and even supply the default printer and its settings. Of course
the big benefit is no nasty web browser to review the report. Users hate
it and so do I. We have exposed all the export methods (so you can
create a PDF, for example, without showing the dialog) but obviously
they are only available for the appropriate server version. SQL Express
has less options than full blown server. I also do not demonstrate the
RDLC option here because that is really for C# applications where you
build the datasets in code. My ReportServer class has a few useful
overrides that translate 'standard' VO behaviour but if you look at
the iReportItem class you will see what is possible, including providing
credentials with the report load, document maps, bookmarks and a ton of
printer presets. You will need a report and a report server somewhere to
play with. Just supply the URLs, folder path and report name and
you're off and running.

2. Exception Handler

This is an error handler class on steroids and you can have some fun
with this. Here are its features:

• There is the usual dialog with some nice additions – you can add
and hide buttons for different return values
• It can automatically send an email to a predetermined address on
every error or only at the users request
• The emails optionally include a screen shot of the user's desktop
at the time of the error
• It automatically logs an entry into a central server database
• It has an unattended mode if used in services or unattended
processes (and still send emails)
• It produces an error log on the local machine always
• It has a function to just log information to a central server (a
deliberate call – not an error condition)
• It has a COM+ mode (for use with VO) and a native mode for use from
C#.

At the moment the emails are generated from my server's web service
and the logging takes place on my server but if you wanted to put this
into a production environment I would give you the web service to run on
your own server and all you do is supply the web service URL to the COM
object. Voila! Your own international error management system.

3. Email Client

This is fully Outlook integrated client: 2003, 2007 and 2010. It will
try for Outlook first (unless told not to) and then default back to our
C# client. It is fully HTML enabled although the sample client here is
only text. If our client is used then the email is sent via a web
service from our server so there are some size limitations at the
moment. The intention is to address this in our production client and
also add large address list handling for bulk emails. The service
we've put in place here is anonymous for now but it can take
credentials to make sure it cannot be used for spam. We store a copy of
all emails (for audit and anti-spam purposes) unless you tell the class
not to. Please review the iEmailitem class for the standard functions
and properties. But honestly, this makes email usage from VO so easy. No
ISP settings to worry about, no end user client variations to worry
about, can be fully secured if required, can preview or just send, can
employ bulk email options. (Outlook 2003 will need Redemption.dll)

4. Outlook Tasks and Appointments

I'm going to lump these two things together because they both only
work for MS Outlook. The classes are optimised for MS Outlook 2007 and
2010 but will work for MS Outlook 2003 – minus one or two 2007
features. You may need Redemption.dll or some other security override
for MS Outlook 2003 or just suffer the “Allow Access for 1 Minute”
dialog in silence . Mind you, the dialog only occurs for emails so if
you don't send invites to your appointments, you won't see that.
You can task yourself or others – this is cool – so you can have an
administrative account doing an overnight process creating tasks for
specific users. Likewise you can set up appointments on behalf of other
people and even invite yourself back to the same meeting. We haven't
exposed recurring meeting features or the workspace settings but we
could, after a bit of testing. I'll wait until someone asks. All the
usual features are there: reminders, attendees, locations, priority,
sound settings and so on. Of course there is a silent mode so you can
generate these programmatically without having to show a dialog.

Please play around. If there are other must-have features you think are
worthwhile we can add them in. If no-one finds any ball-breakers in here
I intend to put this code up on the web for the rest of the VO community
to play with. For those of you working with me on production systems we
have some additional functionality and code that I will share with you.
I probably won't be making the C# code free because that is where all
the effort has been, especially connecting with the report server
variations and Outlook.

If anyone gets seriously interested I might expose the SQL Server
listings of where the logs and emails go for audit storage. This is easy
enough to do via web service again. So have fun.


Regards,

Geoff Schaller

From: Danilo Giuliani on
Thank you Geoff.

Danilo

"Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> ha scritto nel
messaggio news:xuatn.16628$pv.12358(a)news-server.bigpond.net.au...
> Hi Folks.
>
> Here is my Easter gift to you all. It is basically an example of how VO
> can use COM to exploit what is very easy in C# and very hard in VO
> natively. You might even find a production use for it.
>
> It is all about VO generating emails, tasks, appointments, report services
> report viewers, direct print reports, bulk emails, error handlers and
> more.
>
> ftp://www.softwareobjectives.com.au/anonymous/so.service.client.zip
>
> For newcomers, see the notes way down below...
> New things for March: bulk email facility.
> For April: Setting and managing user passwords.
>
> Your email dialog now includes an option to group BCC addresses into
> blocks of 'x' emails. There is also a send timeout that you can adjust to
> get through things like satellite connections. Even the IsRunning()
> command has its own timeout extender in case you have a wonky connection.
>
> This is a stand-alone app so you don't have to have anything else to make
> it work. All source code to the client is offered but I would probably
> want to charge a small something if you want the C# source and your own
> web service.
>
> Let's go over the basics again:
>
> 1. Download the zip.
> 2. Import all the AEF's into a VO project and compile.
> 3. Put ALL the dll's into your VO executable folder (be it BIN
> or your own)
> 4. Run the app
> 5. Register the dll's (they are new) – there is a button for
> this.
> 6. Copy the dlls to wherever there is an exe that is going to
> use them.
> 7. It works on XP, Vista, W7 and 32 bit or 64 bit.
>
> So, there are three components to this system:
>
> 1. A web service. Just needed for the email side of things.
> Currently this is running on my server and you are welcome to test with
> it. This web service can be anywhere and the COM client can be given any
> URL to use instead of mine. The web service logs all activity and all
> outgoing emails into a SQL Server database (Obviously could be yours in
> your web service). It logs all error messages it receives and it links to
> your Outlook 2007 and MS SQL Server 2008 installations if you have them.
> For anyone who wants to go production with this then let me know and I
> will organise you your own web service.
>
> 2. A COM dll. This is basically a C# application that does all
> the smarts. Being COM it can be used with VO, C#, VB or anything. It needs
> to be registered and only needs the web service for email facilities. The
> Outlook options prefers Outlook 2007 (but 2003 works) and you can choose
> between my email client and the Outlook one. Bulk emails require my client
> because it uses my server to bypass anti-spam provisions.
>
> 3. A Client – see the VO one. I can't attach a screen shot for
> the news group because many readers won't allow it. However you have the
> VO AEF so you can look at it yourself.
>
> Here now is the description from my first public release:
>
> ...In it is my latest version of our integration component, including the
> VO generated classes and a small sample application showing how to use it.
> The big issue has been making something to register the COM object
> seamlessly for the user. I had to make it work for 32 bit, 64 bit, XP,
> Vista and W7. And it does, as long as the Dot Net Framework 2.0 is
> installed. This should be the case for almost all PCs anyhow.
>
> Ok, so what is it and why? Well as we move to MS Office integration and
> Sharepoint features, we wanted some simple way to extend VO application
> functionality but using C#. I wanted a consistent interface that could be
> extended with new functions as time went by. The reason is simple enough.
> In C# it is easy and in VO it is hard. This application is a perfect
> example of how we access C# from VO and a demonstration of C#'s
> superiority in such matters. Here is what is in the Zip:
>
> • A stack of DLL's. You need to put these into every executable folder
> using the COM component.
> • A TLB file (type library) if you want to mess with your own server
> generation, otherwise ignore it
> • Three VO aefs that are the minimum required to run the sample
> • The Library AEF has OLE classes which are generated from the Automation
> Server for you
>
> To test this from the VO IDE, put the DLL's in your default executable
> folder (or cavo bin), import the aefs, compile and run. Make sure you
> register the COM object (there is a button on the test form for this) but
> I have added an example of the necessary error handling to be “safe” from
> a user perspective, in case they don't. For your own applications, should
> you decide to use it, you will need only the two library AEF's but use the
> sample exe AEF as a guide on how to use it. Consult the Registered types
> MEFs to see all the functionality we have extended - obviously the sample
> only goes so far. To force registration of the COM object in your client's
> machines you will need something to trigger the function call. I detect a
> version change and do this forcefully.
>
> So now for a brief description of the functionality:
>
> 1. Reporting Services Reports Viewer
>
> This cool little tool will display reports from SQL Express Report Server,
> full blown Report Server, RDLC local reports and Sharepoint Integrated
> servers. By using the Report Viewer it means we can control the parameter
> block, supply defaults, get the user to add them if desired or hide
> specific ones, print without displaying the preview dialog and even supply
> the default printer and its settings. Of course the big benefit is no
> nasty web browser to review the report. Users hate it and so do I. We have
> exposed all the export methods (so you can create a PDF, for example,
> without showing the dialog) but obviously they are only available for the
> appropriate server version. SQL Express has less options than full blown
> server. I also do not demonstrate the RDLC option here because that is
> really for C# applications where you build the datasets in code. My
> ReportServer class has a few useful overrides that translate 'standard' VO
> behaviour but if you look at the iReportItem class you will see what is
> possible, including providing credentials with the report load, document
> maps, bookmarks and a ton of printer presets. You will need a report and a
> report server somewhere to play with. Just supply the URLs, folder path
> and report name and you're off and running.
>
> 2. Exception Handler
>
> This is an error handler class on steroids and you can have some fun with
> this. Here are its features:
>
> • There is the usual dialog with some nice additions – you can add and
> hide buttons for different return values
> • It can automatically send an email to a predetermined address on every
> error or only at the users request
> • The emails optionally include a screen shot of the user's desktop at the
> time of the error
> • It automatically logs an entry into a central server database
> • It has an unattended mode if used in services or unattended processes
> (and still send emails)
> • It produces an error log on the local machine always
> • It has a function to just log information to a central server (a
> deliberate call – not an error condition)
> • It has a COM+ mode (for use with VO) and a native mode for use from C#.
>
> At the moment the emails are generated from my server's web service and
> the logging takes place on my server but if you wanted to put this into a
> production environment I would give you the web service to run on your own
> server and all you do is supply the web service URL to the COM object.
> Voila! Your own international error management system.
>
> 3. Email Client
>
> This is fully Outlook integrated client: 2003, 2007 and 2010. It will try
> for Outlook first (unless told not to) and then default back to our C#
> client. It is fully HTML enabled although the sample client here is only
> text. If our client is used then the email is sent via a web service from
> our server so there are some size limitations at the moment. The intention
> is to address this in our production client and also add large address
> list handling for bulk emails. The service we've put in place here is
> anonymous for now but it can take credentials to make sure it cannot be
> used for spam. We store a copy of all emails (for audit and anti-spam
> purposes) unless you tell the class not to. Please review the iEmailitem
> class for the standard functions and properties. But honestly, this makes
> email usage from VO so easy. No ISP settings to worry about, no end user
> client variations to worry about, can be fully secured if required, can
> preview or just send, can employ bulk email options. (Outlook 2003 will
> need Redemption.dll)
>
> 4. Outlook Tasks and Appointments
>
> I'm going to lump these two things together because they both only work
> for MS Outlook. The classes are optimised for MS Outlook 2007 and 2010 but
> will work for MS Outlook 2003 – minus one or two 2007 features. You may
> need Redemption.dll or some other security override for MS Outlook 2003 or
> just suffer the “Allow Access for 1 Minute” dialog in silence . Mind you,
> the dialog only occurs for emails so if you don't send invites to your
> appointments, you won't see that. You can task yourself or others – this
> is cool – so you can have an administrative account doing an overnight
> process creating tasks for specific users. Likewise you can set up
> appointments on behalf of other people and even invite yourself back to
> the same meeting. We haven't exposed recurring meeting features or the
> workspace settings but we could, after a bit of testing. I'll wait until
> someone asks. All the usual features are there: reminders, attendees,
> locations, priority, sound settings and so on. Of course there is a silent
> mode so you can generate these programmatically without having to show a
> dialog.
>
> Please play around. If there are other must-have features you think are
> worthwhile we can add them in. If no-one finds any ball-breakers in here I
> intend to put this code up on the web for the rest of the VO community to
> play with. For those of you working with me on production systems we have
> some additional functionality and code that I will share with you. I
> probably won't be making the C# code free because that is where all the
> effort has been, especially connecting with the report server variations
> and Outlook.
>
> If anyone gets seriously interested I might expose the SQL Server listings
> of where the logs and emails go for audit storage. This is easy enough to
> do via web service again. So have fun.
>
>
> Regards,
>
> Geoff Schaller
>
From: Ginny Caughey on
Nice, Geoff!

For anybody who wants to read how to extend a VO app with C# coding, this
paper shows in simple terms how to do it:
http://www.elbe-data.se/sv/vografx/visualobjectsandcsharp.pdf (about 3 MB)

I've been using this approach in production for several years now, deploying
apps that use it all over North America.

--

Ginny Caughey
www.wasteworks.com




"Danilo Giuliani" <softdevo(a)tiscali.it> wrote in message
news:4bb59396$0$6833$5fc30a8(a)news.tiscali.it...
> Thank you Geoff.
>
> Danilo
>
> "Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> ha scritto nel
> messaggio news:xuatn.16628$pv.12358(a)news-server.bigpond.net.au...
>> Hi Folks.
>>
>> Here is my Easter gift to you all. It is basically an example of how VO
>> can use COM to exploit what is very easy in C# and very hard in VO
>> natively. You might even find a production use for it.
>>
>> It is all about VO generating emails, tasks, appointments, report
>> services report viewers, direct print reports, bulk emails, error
>> handlers and more.
>>
>> ftp://www.softwareobjectives.com.au/anonymous/so.service.client.zip
>>
>> For newcomers, see the notes way down below...
>> New things for March: bulk email facility.
>> For April: Setting and managing user passwords.
>>
>> Your email dialog now includes an option to group BCC addresses into
>> blocks of 'x' emails. There is also a send timeout that you can adjust to
>> get through things like satellite connections. Even the IsRunning()
>> command has its own timeout extender in case you have a wonky connection.
>>
>> This is a stand-alone app so you don't have to have anything else to make
>> it work. All source code to the client is offered but I would probably
>> want to charge a small something if you want the C# source and your own
>> web service.
>>
>> Let's go over the basics again:
>>
>> 1. Download the zip.
>> 2. Import all the AEF's into a VO project and compile.
>> 3. Put ALL the dll's into your VO executable folder (be it BIN
>> or your own)
>> 4. Run the app
>> 5. Register the dll's (they are new) – there is a button for
>> this.
>> 6. Copy the dlls to wherever there is an exe that is going to
>> use them.
>> 7. It works on XP, Vista, W7 and 32 bit or 64 bit.
>>
>> So, there are three components to this system:
>>
>> 1. A web service. Just needed for the email side of things.
>> Currently this is running on my server and you are welcome to test with
>> it. This web service can be anywhere and the COM client can be given any
>> URL to use instead of mine. The web service logs all activity and all
>> outgoing emails into a SQL Server database (Obviously could be yours in
>> your web service). It logs all error messages it receives and it links to
>> your Outlook 2007 and MS SQL Server 2008 installations if you have them.
>> For anyone who wants to go production with this then let me know and I
>> will organise you your own web service.
>>
>> 2. A COM dll. This is basically a C# application that does all
>> the smarts. Being COM it can be used with VO, C#, VB or anything. It
>> needs to be registered and only needs the web service for email
>> facilities. The Outlook options prefers Outlook 2007 (but 2003 works) and
>> you can choose between my email client and the Outlook one. Bulk emails
>> require my client because it uses my server to bypass anti-spam
>> provisions.
>>
>> 3. A Client – see the VO one. I can't attach a screen shot for
>> the news group because many readers won't allow it. However you have the
>> VO AEF so you can look at it yourself.
>>
>> Here now is the description from my first public release:
>>
>> ...In it is my latest version of our integration component, including the
>> VO generated classes and a small sample application showing how to use
>> it. The big issue has been making something to register the COM object
>> seamlessly for the user. I had to make it work for 32 bit, 64 bit, XP,
>> Vista and W7. And it does, as long as the Dot Net Framework 2.0 is
>> installed. This should be the case for almost all PCs anyhow.
>>
>> Ok, so what is it and why? Well as we move to MS Office integration and
>> Sharepoint features, we wanted some simple way to extend VO application
>> functionality but using C#. I wanted a consistent interface that could be
>> extended with new functions as time went by. The reason is simple enough.
>> In C# it is easy and in VO it is hard. This application is a perfect
>> example of how we access C# from VO and a demonstration of C#'s
>> superiority in such matters. Here is what is in the Zip:
>>
>> • A stack of DLL's. You need to put these into every executable folder
>> using the COM component.
>> • A TLB file (type library) if you want to mess with your own server
>> generation, otherwise ignore it
>> • Three VO aefs that are the minimum required to run the sample
>> • The Library AEF has OLE classes which are generated from the Automation
>> Server for you
>>
>> To test this from the VO IDE, put the DLL's in your default executable
>> folder (or cavo bin), import the aefs, compile and run. Make sure you
>> register the COM object (there is a button on the test form for this) but
>> I have added an example of the necessary error handling to be “safe” from
>> a user perspective, in case they don't. For your own applications, should
>> you decide to use it, you will need only the two library AEF's but use
>> the sample exe AEF as a guide on how to use it. Consult the Registered
>> types MEFs to see all the functionality we have extended - obviously the
>> sample only goes so far. To force registration of the COM object in your
>> client's machines you will need something to trigger the function call. I
>> detect a version change and do this forcefully.
>>
>> So now for a brief description of the functionality:
>>
>> 1. Reporting Services Reports Viewer
>>
>> This cool little tool will display reports from SQL Express Report
>> Server, full blown Report Server, RDLC local reports and Sharepoint
>> Integrated servers. By using the Report Viewer it means we can control
>> the parameter block, supply defaults, get the user to add them if desired
>> or hide specific ones, print without displaying the preview dialog and
>> even supply the default printer and its settings. Of course the big
>> benefit is no nasty web browser to review the report. Users hate it and
>> so do I. We have exposed all the export methods (so you can create a PDF,
>> for example, without showing the dialog) but obviously they are only
>> available for the appropriate server version. SQL Express has less
>> options than full blown server. I also do not demonstrate the RDLC
>> option here because that is really for C# applications where you build
>> the datasets in code. My ReportServer class has a few useful overrides
>> that translate 'standard' VO behaviour but if you look at the iReportItem
>> class you will see what is possible, including providing credentials with
>> the report load, document maps, bookmarks and a ton of printer presets.
>> You will need a report and a report server somewhere to play with. Just
>> supply the URLs, folder path and report name and you're off and running.
>>
>> 2. Exception Handler
>>
>> This is an error handler class on steroids and you can have some fun with
>> this. Here are its features:
>>
>> • There is the usual dialog with some nice additions – you can add and
>> hide buttons for different return values
>> • It can automatically send an email to a predetermined address on every
>> error or only at the users request
>> • The emails optionally include a screen shot of the user's desktop at
>> the time of the error
>> • It automatically logs an entry into a central server database
>> • It has an unattended mode if used in services or unattended processes
>> (and still send emails)
>> • It produces an error log on the local machine always
>> • It has a function to just log information to a central server (a
>> deliberate call – not an error condition)
>> • It has a COM+ mode (for use with VO) and a native mode for use from C#.
>>
>> At the moment the emails are generated from my server's web service and
>> the logging takes place on my server but if you wanted to put this into a
>> production environment I would give you the web service to run on your
>> own server and all you do is supply the web service URL to the COM
>> object. Voila! Your own international error management system.
>>
>> 3. Email Client
>>
>> This is fully Outlook integrated client: 2003, 2007 and 2010. It will
>> try for Outlook first (unless told not to) and then default back to our
>> C# client. It is fully HTML enabled although the sample client here is
>> only text. If our client is used then the email is sent via a web service
>> from our server so there are some size limitations at the moment. The
>> intention is to address this in our production client and also add large
>> address list handling for bulk emails. The service we've put in place
>> here is anonymous for now but it can take credentials to make sure it
>> cannot be used for spam. We store a copy of all emails (for audit and
>> anti-spam purposes) unless you tell the class not to. Please review the
>> iEmailitem class for the standard functions and properties. But honestly,
>> this makes email usage from VO so easy. No ISP settings to worry about,
>> no end user client variations to worry about, can be fully secured if
>> required, can preview or just send, can employ bulk email options.
>> (Outlook 2003 will need Redemption.dll)
>>
>> 4. Outlook Tasks and Appointments
>>
>> I'm going to lump these two things together because they both only work
>> for MS Outlook. The classes are optimised for MS Outlook 2007 and 2010
>> but will work for MS Outlook 2003 – minus one or two 2007 features. You
>> may need Redemption.dll or some other security override for MS Outlook
>> 2003 or just suffer the “Allow Access for 1 Minute” dialog in silence .
>> Mind you, the dialog only occurs for emails so if you don't send invites
>> to your appointments, you won't see that. You can task yourself or
>> others – this is cool – so you can have an administrative account doing
>> an overnight process creating tasks for specific users. Likewise you can
>> set up appointments on behalf of other people and even invite yourself
>> back to the same meeting. We haven't exposed recurring meeting features
>> or the workspace settings but we could, after a bit of testing. I'll wait
>> until someone asks. All the usual features are there: reminders,
>> attendees, locations, priority, sound settings and so on. Of course there
>> is a silent mode so you can generate these programmatically without
>> having to show a dialog.
>>
>> Please play around. If there are other must-have features you think are
>> worthwhile we can add them in. If no-one finds any ball-breakers in here
>> I intend to put this code up on the web for the rest of the VO community
>> to play with. For those of you working with me on production systems we
>> have some additional functionality and code that I will share with you. I
>> probably won't be making the C# code free because that is where all the
>> effort has been, especially connecting with the report server variations
>> and Outlook.
>>
>> If anyone gets seriously interested I might expose the SQL Server
>> listings of where the logs and emails go for audit storage. This is easy
>> enough to do via web service again. So have fun.
>>
>>
>> Regards,
>>
>> Geoff Schaller
>>
From: Geoff Schaller on
Hi Folks,

A couple of you have started playing around with this - great!

Now for the error handler, if you want the emails to come back to you
(by default they come to me), all you need to do is set yourself as the
recipient of the error message by using the EmailTargetAddress assign.
Look at the IExceptionHandler class for a whole range of other useful
properties and methods.

Cheers.

Geoff




"Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> wrote in message
news:xuatn.16628$pv.12358(a)news-server.bigpond.net.au:

> Hi Folks.
>
> Here is my Easter gift to you all. It is basically an example of how VO
> can use COM to exploit what is very easy in C# and very hard in VO
> natively. You might even find a production use for it.
>
> It is all about VO generating emails, tasks, appointments, report
> services report viewers, direct print reports, bulk emails, error
> handlers and more.
>
> ftp://www.softwareobjectives.com.au/anonymous/so.service.client.zip
>
> For newcomers, see the notes way down below...
> New things for March: bulk email facility.
> For April: Setting and managing user passwords.
>
> Your email dialog now includes an option to group BCC addresses into
> blocks of 'x' emails. There is also a send timeout that you can
> adjust to get through things like satellite connections. Even the
> IsRunning() command has its own timeout extender in case you have a
> wonky connection.
>
> This is a stand-alone app so you don't have to have anything else to
> make it work. All source code to the client is offered but I would
> probably want to charge a small something if you want the C# source and
> your own web service.
>
> Let's go over the basics again:
>
> 1. Download the zip.
> 2. Import all the AEF's into a VO project and compile.
> 3. Put ALL the dll's into your VO executable folder (be it
> BIN or your own)
> 4. Run the app
> 5. Register the dll's (they are new) - there is a button
> for this.
> 6. Copy the dlls to wherever there is an exe that is going to
> use them.
> 7. It works on XP, Vista, W7 and 32 bit or 64 bit.
>
> So, there are three components to this system:
>
> 1. A web service. Just needed for the email side of things.
> Currently this is running on my server and you are welcome to test with
> it. This web service can be anywhere and the COM client can be given any
> URL to use instead of mine. The web service logs all activity and all
> outgoing emails into a SQL Server database (Obviously could be yours in
> your web service). It logs all error messages it receives and it links
> to your Outlook 2007 and MS SQL Server 2008 installations if you have
> them. For anyone who wants to go production with this then let me know
> and I will organise you your own web service.
>
> 2. A COM dll. This is basically a C# application that does
> all the smarts. Being COM it can be used with VO, C#, VB or anything. It
> needs to be registered and only needs the web service for email
> facilities. The Outlook options prefers Outlook 2007 (but 2003 works)
> and you can choose between my email client and the Outlook one. Bulk
> emails require my client because it uses my server to bypass anti-spam
> provisions.
>
> 3. A Client - see the VO one. I can't attach a screen shot
> for the news group because many readers won't allow it. However you have
> the VO AEF so you can look at it yourself.
>
> Here now is the description from my first public release:
>
> ...In it is my latest version of our integration component, including
> the VO generated classes and a small sample application showing how to
> use it. The big issue has been making something to register the COM
> object seamlessly for the user. I had to make it work for 32 bit, 64
> bit, XP, Vista and W7. And it does, as long as the Dot Net Framework 2.0
> is installed. This should be the case for almost all PCs anyhow.
>
> Ok, so what is it and why? Well as we move to MS Office integration and
> Sharepoint features, we wanted some simple way to extend VO application
> functionality but using C#. I wanted a consistent interface that could
> be extended with new functions as time went by. The reason is simple
> enough. In C# it is easy and in VO it is hard. This application is a
> perfect example of how we access C# from VO and a demonstration of
> C#'s superiority in such matters. Here is what is in the Zip:
>
> . A stack of DLL's. You need to put these into every executable
> folder using the COM component.
> . A TLB file (type library) if you want to mess with your own server
> generation, otherwise ignore it
> . Three VO aefs that are the minimum required to run the sample
> . The Library AEF has OLE classes which are generated from the
> Automation Server for you
>
> To test this from the VO IDE, put the DLL's in your default executable
> folder (or cavo bin), import the aefs, compile and run. Make sure you
> register the COM object (there is a button on the test form for this)
> but I have added an example of the necessary error handling to be
> "safe" from a user perspective, in case they don't. For your own
> applications, should you decide to use it, you will need only the two
> library AEF's but use the sample exe AEF as a guide on how to use it.
> Consult the Registered types MEFs to see all the functionality we have
> extended - obviously the sample only goes so far. To force registration
> of the COM object in your client's machines you will need something to
> trigger the function call. I detect a version change and do this
> forcefully.
>
> So now for a brief description of the functionality:
>
> 1. Reporting Services Reports Viewer
>
> This cool little tool will display reports from SQL Express Report
> Server, full blown Report Server, RDLC local reports and Sharepoint
> Integrated servers. By using the Report Viewer it means we can control
> the parameter block, supply defaults, get the user to add them if
> desired or hide specific ones, print without displaying the preview
> dialog and even supply the default printer and its settings. Of course
> the big benefit is no nasty web browser to review the report. Users hate
> it and so do I. We have exposed all the export methods (so you can
> create a PDF, for example, without showing the dialog) but obviously
> they are only available for the appropriate server version. SQL Express
> has less options than full blown server. I also do not demonstrate the
> RDLC option here because that is really for C# applications where you
> build the datasets in code. My ReportServer class has a few useful
> overrides that translate 'standard' VO behaviour but if you look at
> the iReportItem class you will see what is possible, including providing
> credentials with the report load, document maps, bookmarks and a ton of
> printer presets. You will need a report and a report server somewhere to
> play with. Just supply the URLs, folder path and report name and
> you're off and running.
>
> 2. Exception Handler
>
> This is an error handler class on steroids and you can have some fun
> with this. Here are its features:
>
> . There is the usual dialog with some nice additions - you can add
> and hide buttons for different return values
> . It can automatically send an email to a predetermined address on
> every error or only at the users request
> . The emails optionally include a screen shot of the user's desktop
> at the time of the error
> . It automatically logs an entry into a central server database
> . It has an unattended mode if used in services or unattended
> processes (and still send emails)
> . It produces an error log on the local machine always
> . It has a function to just log information to a central server (a
> deliberate call - not an error condition)
> . It has a COM+ mode (for use with VO) and a native mode for use from
> C#.
>
> At the moment the emails are generated from my server's web service
> and the logging takes place on my server but if you wanted to put this
> into a production environment I would give you the web service to run on
> your own server and all you do is supply the web service URL to the COM
> object. Voila! Your own international error management system.
>
> 3. Email Client
>
> This is fully Outlook integrated client: 2003, 2007 and 2010. It will
> try for Outlook first (unless told not to) and then default back to our
> C# client. It is fully HTML enabled although the sample client here is
> only text. If our client is used then the email is sent via a web
> service from our server so there are some size limitations at the
> moment. The intention is to address this in our production client and
> also add large address list handling for bulk emails. The service
> we've put in place here is anonymous for now but it can take
> credentials to make sure it cannot be used for spam. We store a copy of
> all emails (for audit and anti-spam purposes) unless you tell the class
> not to. Please review the iEmailitem class for the standard functions
> and properties. But honestly, this makes email usage from VO so easy. No
> ISP settings to worry about, no end user client variations to worry
> about, can be fully secured if required, can preview or just send, can
> employ bulk email options. (Outlook 2003 will need Redemption.dll)
>
> 4. Outlook Tasks and Appointments
>
> I'm going to lump these two things together because they both only
> work for MS Outlook. The classes are optimised for MS Outlook 2007 and
> 2010 but will work for MS Outlook 2003 - minus one or two 2007
> features. You may need Redemption.dll or some other security override
> for MS Outlook 2003 or just suffer the "Allow Access for 1 Minute"
> dialog in silence J. Mind you, the dialog only occurs for emails so if
> you don't send invites to your appointments, you won't see that.
> You can task yourself or others - this is cool - so you can have an
> administrative account doing an overnight process creating tasks for
> specific users. Likewise you can set up appointments on behalf of other
> people and even invite yourself back to the same meeting. We haven't
> exposed recurring meeting features or the workspace settings but we
> could, after a bit of testing. I'll wait until someone asks. All the
> usual features are there: reminders, attendees, locations, priority,
> sound settings and so on. Of course there is a silent mode so you can
> generate these programmatically without having to show a dialog.
>
> Please play around. If there are other must-have features you think are
> worthwhile we can add them in. If no-one finds any ball-breakers in here
> I intend to put this code up on the web for the rest of the VO community
> to play with. For those of you working with me on production systems we
> have some additional functionality and code that I will share with you.
> I probably won't be making the C# code free because that is where all
> the effort has been, especially connecting with the report server
> variations and Outlook.
>
> If anyone gets seriously interested I might expose the SQL Server
> listings of where the logs and emails go for audit storage. This is easy
> enough to do via web service again. So have fun.
>
>
> Regards,
>
> Geoff Schaller

From: richard.townsendrose on
Geoff

we are going to add "Web Service" as an email option. we can then
build in ftp'ing [for html download [using your lib ...]] if the
attachment is bigger than [say 2mb] as specified in user settings.

saves any hassle when it depts have buggered around with office and
outlook etc etc

we have our own web services written in php anyway ... not by me but a
mime specific free library

richard