Advertisement

Results for "Author: pj naughter"

2002ASP #7294
Enumerate serial ports

One of the posts that keeps reappearing in the programming newsgroups is how to enumerate all the serial ports installed. The problem is that there is no standard Win32 API call which allows serial port enumeration. The approach that this code uses is calling CreateFile directly. If the port cannot be opened, the code examines the error code to see if it was accessed denied error in which case it knows that the port exists even though it could not open the port. .

2002ASP #7295
An application to call the ShellExecute API

A very simple utility to allow you to call the ShellExecute API from the command line. Places where you might find ShelExec useful are in adding an Autorun.inf file to your CD-R / CD-RW Discs. For example suppose you have a HTML page called index.htm on the root of your CD which you would like to run automatically whenever the user inserts the CD. All you need to do is put ShelExec.exe, some ico file and the index.htm files into the root directory and create a autorun.inf file with the following contents: [autorun] open=ShelExec.exe index.html icon=youricon.ico Items that ShelExec can handle include any file which is registered with the shell e.g. Word .Doc files, Text Files, batch files etc etc. It can also handle URLs such as "http://somesite.com", "ftp://www.microsoft.com" and "mailto:pjn@indigo.ie". The more technically minded of you may say why is there a need to have this program since you can use "start filename" on autorun CD's without any apparent problems. The problem with this approach is that it does not work on NT because on NT "start" is implemented as an "Internal" command in cmd.exe (as opposed to a standard exe on 95/98) with the upshot that your CD's will not AutoRun on NT 4 or Windows 2000. Using ShelExec will mean that your CD's will autorun on all OS's which support it. The zip file contains the ShelExec source code and a prebuilt version of ShelExec.

2002ASP #7296
Access the NT Performance Counters

Ever wanted to write some code to determine the amount of bytes sent or received by Dial-Up Networking, what is the current CPU Usage or how many threads are currently running on the system?. The classes provided allow you do query any of these parameters, or to query the availability of performance objects and their counters both on the local machine and any machine on the network. Please note that since 95/98 has its own version of performance counters which are incompatible with the NT versions, these classes will not work on 95/98. If you want classes to work with 95/98, have a look at the DynData classes which I have developed.

2002ASP #7297
MFC class to support the SMTP protocol

Welcome to CSMTPConnection, a freeware MFC class to support the SMTP protocol. SMTP for those not familiar with all the internet protocols is the protocol used to send internet email. For detailed information about the Simple Mail Transfer Protocol you should read RFC 821, You can find numerous servers which carry these documents by going to www.yahoo.com and look for RFC and 821 and/or 2045. Features Simple and clean C++ interface. The interface provided is synchronous which provides an easier programming model than using asynchronous sockets. The code does not rely on the MFC socket classes. These classes have a number of shortcomings, one of which causes problems when they are used in NT services. The code can be used in a console application without any problems (Again this is not the case for the MFC socket classes). A configurable timeout for the connection can be set through the class API. The classes are fully Unicode compliant and include Unicode built options in the workspace file. As of v1.1, the classes now fully supports file attachments. Full support is included for CC (Carbon Copy) & BCC (Blind Carbon Copy). PJ Naughter at http://indigo.ie/~pjn/index.html

2002ASP #7298
Class to encapsulate the PING protocol

MFC class to support the PING/ICMP protocol. ICMP for those not familiar with all the internet protocols is the protocol used to retrieve information about how IP packets are routed. Features Simple and clean C++ interface. The interface provided is synchronous which provides an easier programming model than using asynchronous sockets. A configurable timeout for the connection can be set through the class API. The classes are fully Unicode compliant and include Unicode built options in the workspace file. The enclosed zip file contains the CPing source code and a simple test program to exercise all of the functions the classes provide.

2002ASP #7299
MFC classes to implement a Web Server

3Mfc 1.1 A collection of freeware MFC classes to implement a Web Server Welcome to W3Mfc, a collection of freeware MFC classes to implement a simple Web server. The idea behind is W3Mfc was originally to learn about the Http protocol and how it is implemented on Win32. It is not intended to be a replacement for IIS or Apache. Instead it is designed as a tool for learning or in cases where deployment of a solution on IIS would be considered overkill or your product must run on 95/98 in addition to NT. For detailed information about the Hyper Text Transfer Protocol you should read RFC 1945, You can download this from a number of sites by searching for RFC and 1945 on www.yahoo.com. Another document that these classes refer to is RFC 2045 which defines MIME. The classes which constitute W3Mfc are: CHttpServerSettings: This class contains the settings which are used to configure the web server. Example member variables in this class include the root directory and the default filename. If you are developing a stand alone web server based on W3Mfc, you could for example store all the variables for the CHttpServerSettings instance in an ini file or in the registry. In the future this is the class which will be extended to include additional settings such as multiple virtual directories. CHttpServer: This is the actual class which implements the web server. It has a number of very simple functions to allow you to control the state of the web server such as Start and Stop. Internally a background thread is spun off to handle the client connections. CHttpSocket: This is a simple C++/MFC encapsulation of an SDK socket. CHttpResponseHeader: This class helps in the handling of sending request headers when returning the HTTP responses to clients. It provides a number of methods to allow standard Http headers to be added to the client response. CHttpMimeManager: This class is used when returning client responses. It is used to determine the mime type of a file given its extension type. This information is taken from the registry and is cached in this class. For example, files of .htm or .html will normally be of mime type "text/html". CHttpRequest: This class represents a request from a client. It contains information such as the URI of the request, the Http Verb used and the Http version used for the request. A member of this type is stored in the CHttpClient class. CHttpClient: This class is used in the CHttpServer class to handle client connections. It handles the parsing of client requests and returning the appropriate response. A number of virtual functions are provided to allow end user customization. The enclosed zip file contains the W3Mfc source code and a simple console based application which implements a simple web server. PJ Naughter at http://indigo.ie/~pjn/index.html

2002ASP #7300
Sending mail using Simple MAPI

CMapi v1.0 an MFC class to encapsulate sending mail using Simple MAPI Welcome to CMapi, 2 simple classes to encapsulate sending mail using Simple MAPI. Simple MAPI is a set of functions exported by MAPI32.dll which allows you to send and receive mail in a transport independent way. It is an optional part of all Win32 operating systems since Windows 95 (excluding Windows CE). MAPI is intended more for the corporate environment when compared with the Internet mail standard SMTP e.g. products such as MS Exchange Server use MAPI extensively. Transport providers are available for a number of messaging transports including Exchange Server, SMTP, Fax, cc:Mail CompuServe etc. To be able to specify different transports, MAPI provides the concept of profiles which are setup using the Mail control panel applet Features Simple and clean C++ interface. All the code is UNICODE compliant and build configurations are provided for this. Even though Simple MAPI only exports an ASCII versions of it's functions, the class internally performs the necessary conversions. The code can be used in a console application or without bringing up any Mapi dialogs if so desired. The code gracefully handles the case where MAPI is not installed on client machines. Internally the class loads the DLL and uses GetProcAddress calls. The enclosed zip file contains the source code and a simple test program to exercise all of the functions the classes provide. PJ Naughter at http://indigo.ie/~pjn/index.html

2002C #15898
Enumerate serial ports

One of the posts that keeps reappearing in the programming newsgroups is how to enumerate all the serial ports installed. The problem is that there is no standard Win32 API call which allows serial port enumeration. The approach that this code uses is calling CreateFile directly. If the port cannot be opened, the code examines the error code to see if it was accessed denied error in which case it knows that the port exists even though it could not open the port. .

2002C #15899
An application to call the ShellExecute API

A very simple utility to allow you to call the ShellExecute API from the command line. Places where you might find ShelExec useful are in adding an Autorun.inf file to your CD-R / CD-RW Discs. For example suppose you have a HTML page called index.htm on the root of your CD which you would like to run automatically whenever the user inserts the CD. All you need to do is put ShelExec.exe, some ico file and the index.htm files into the root directory and create a autorun.inf file with the following contents: [autorun] open=ShelExec.exe index.html icon=youricon.ico Items that ShelExec can handle include any file which is registered with the shell e.g. Word .Doc files, Text Files, batch files etc etc. It can also handle URLs such as "http://somesite.com", "ftp://www.microsoft.com" and "mailto:pjn@indigo.ie". The more technically minded of you may say why is there a need to have this program since you can use "start filename" on autorun CD's without any apparent problems. The problem with this approach is that it does not work on NT because on NT "start" is implemented as an "Internal" command in cmd.exe (as opposed to a standard exe on 95/98) with the upshot that your CD's will not AutoRun on NT 4 or Windows 2000. Using ShelExec will mean that your CD's will autorun on all OS's which support it. The zip file contains the ShelExec source code and a prebuilt version of ShelExec.

2002C #15900
Access the NT Performance Counters

Ever wanted to write some code to determine the amount of bytes sent or received by Dial-Up Networking, what is the current CPU Usage or how many threads are currently running on the system?. The classes provided allow you do query any of these parameters, or to query the availability of performance objects and their counters both on the local machine and any machine on the network. Please note that since 95/98 has its own version of performance counters which are incompatible with the NT versions, these classes will not work on 95/98. If you want classes to work with 95/98, have a look at the DynData classes which I have developed.

2002C #15901
MFC class to support the SMTP protocol

Welcome to CSMTPConnection, a freeware MFC class to support the SMTP protocol. SMTP for those not familiar with all the internet protocols is the protocol used to send internet email. For detailed information about the Simple Mail Transfer Protocol you should read RFC 821, You can find numerous servers which carry these documents by going to www.yahoo.com and look for RFC and 821 and/or 2045. Features Simple and clean C++ interface. The interface provided is synchronous which provides an easier programming model than using asynchronous sockets. The code does not rely on the MFC socket classes. These classes have a number of shortcomings, one of which causes problems when they are used in NT services. The code can be used in a console application without any problems (Again this is not the case for the MFC socket classes). A configurable timeout for the connection can be set through the class API. The classes are fully Unicode compliant and include Unicode built options in the workspace file. As of v1.1, the classes now fully supports file attachments. Full support is included for CC (Carbon Copy) & BCC (Blind Carbon Copy). PJ Naughter at http://indigo.ie/~pjn/index.html

2002C #15902
Class to encapsulate the PING protocol

MFC class to support the PING/ICMP protocol. ICMP for those not familiar with all the internet protocols is the protocol used to retrieve information about how IP packets are routed. Features Simple and clean C++ interface. The interface provided is synchronous which provides an easier programming model than using asynchronous sockets. A configurable timeout for the connection can be set through the class API. The classes are fully Unicode compliant and include Unicode built options in the workspace file. The enclosed zip file contains the CPing source code and a simple test program to exercise all of the functions the classes provide.

2002C #15903
MFC classes to implement a Web Server

3Mfc 1.1 A collection of freeware MFC classes to implement a Web Server Welcome to W3Mfc, a collection of freeware MFC classes to implement a simple Web server. The idea behind is W3Mfc was originally to learn about the Http protocol and how it is implemented on Win32. It is not intended to be a replacement for IIS or Apache. Instead it is designed as a tool for learning or in cases where deployment of a solution on IIS would be considered overkill or your product must run on 95/98 in addition to NT. For detailed information about the Hyper Text Transfer Protocol you should read RFC 1945, You can download this from a number of sites by searching for RFC and 1945 on www.yahoo.com. Another document that these classes refer to is RFC 2045 which defines MIME. The classes which constitute W3Mfc are: CHttpServerSettings: This class contains the settings which are used to configure the web server. Example member variables in this class include the root directory and the default filename. If you are developing a stand alone web server based on W3Mfc, you could for example store all the variables for the CHttpServerSettings instance in an ini file or in the registry. In the future this is the class which will be extended to include additional settings such as multiple virtual directories. CHttpServer: This is the actual class which implements the web server. It has a number of very simple functions to allow you to control the state of the web server such as Start and Stop. Internally a background thread is spun off to handle the client connections. CHttpSocket: This is a simple C++/MFC encapsulation of an SDK socket. CHttpResponseHeader: This class helps in the handling of sending request headers when returning the HTTP responses to clients. It provides a number of methods to allow standard Http headers to be added to the client response. CHttpMimeManager: This class is used when returning client responses. It is used to determine the mime type of a file given its extension type. This information is taken from the registry and is cached in this class. For example, files of .htm or .html will normally be of mime type "text/html". CHttpRequest: This class represents a request from a client. It contains information such as the URI of the request, the Http Verb used and the Http version used for the request. A member of this type is stored in the CHttpClient class. CHttpClient: This class is used in the CHttpServer class to handle client connections. It handles the parsing of client requests and returning the appropriate response. A number of virtual functions are provided to allow end user customization. The enclosed zip file contains the W3Mfc source code and a simple console based application which implements a simple web server. PJ Naughter at http://indigo.ie/~pjn/index.html

2002C #15904
Sending mail using Simple MAPI

CMapi v1.0 an MFC class to encapsulate sending mail using Simple MAPI Welcome to CMapi, 2 simple classes to encapsulate sending mail using Simple MAPI. Simple MAPI is a set of functions exported by MAPI32.dll which allows you to send and receive mail in a transport independent way. It is an optional part of all Win32 operating systems since Windows 95 (excluding Windows CE). MAPI is intended more for the corporate environment when compared with the Internet mail standard SMTP e.g. products such as MS Exchange Server use MAPI extensively. Transport providers are available for a number of messaging transports including Exchange Server, SMTP, Fax, cc:Mail CompuServe etc. To be able to specify different transports, MAPI provides the concept of profiles which are setup using the Mail control panel applet Features Simple and clean C++ interface. All the code is UNICODE compliant and build configurations are provided for this. Even though Simple MAPI only exports an ASCII versions of it's functions, the class internally performs the necessary conversions. The code can be used in a console application or without bringing up any Mapi dialogs if so desired. The code gracefully handles the case where MAPI is not installed on client machines. Internally the class loads the DLL and uses GetProcAddress calls. The enclosed zip file contains the source code and a simple test program to exercise all of the functions the classes provide. PJ Naughter at http://indigo.ie/~pjn/index.html

2002VB #24502
Enumerate serial ports

One of the posts that keeps reappearing in the programming newsgroups is how to enumerate all the serial ports installed. The problem is that there is no standard Win32 API call which allows serial port enumeration. The approach that this code uses is calling CreateFile directly. If the port cannot be opened, the code examines the error code to see if it was accessed denied error in which case it knows that the port exists even though it could not open the port. .

2002VB #24503
An application to call the ShellExecute API

A very simple utility to allow you to call the ShellExecute API from the command line. Places where you might find ShelExec useful are in adding an Autorun.inf file to your CD-R / CD-RW Discs. For example suppose you have a HTML page called index.htm on the root of your CD which you would like to run automatically whenever the user inserts the CD. All you need to do is put ShelExec.exe, some ico file and the index.htm files into the root directory and create a autorun.inf file with the following contents: [autorun] open=ShelExec.exe index.html icon=youricon.ico Items that ShelExec can handle include any file which is registered with the shell e.g. Word .Doc files, Text Files, batch files etc etc. It can also handle URLs such as "http://somesite.com", "ftp://www.microsoft.com" and "mailto:pjn@indigo.ie". The more technically minded of you may say why is there a need to have this program since you can use "start filename" on autorun CD's without any apparent problems. The problem with this approach is that it does not work on NT because on NT "start" is implemented as an "Internal" command in cmd.exe (as opposed to a standard exe on 95/98) with the upshot that your CD's will not AutoRun on NT 4 or Windows 2000. Using ShelExec will mean that your CD's will autorun on all OS's which support it. The zip file contains the ShelExec source code and a prebuilt version of ShelExec.

2002VB #24504
Access the NT Performance Counters

Ever wanted to write some code to determine the amount of bytes sent or received by Dial-Up Networking, what is the current CPU Usage or how many threads are currently running on the system?. The classes provided allow you do query any of these parameters, or to query the availability of performance objects and their counters both on the local machine and any machine on the network. Please note that since 95/98 has its own version of performance counters which are incompatible with the NT versions, these classes will not work on 95/98. If you want classes to work with 95/98, have a look at the DynData classes which I have developed.

2002VB #24505
MFC class to support the SMTP protocol

Welcome to CSMTPConnection, a freeware MFC class to support the SMTP protocol. SMTP for those not familiar with all the internet protocols is the protocol used to send internet email. For detailed information about the Simple Mail Transfer Protocol you should read RFC 821, You can find numerous servers which carry these documents by going to www.yahoo.com and look for RFC and 821 and/or 2045. Features Simple and clean C++ interface. The interface provided is synchronous which provides an easier programming model than using asynchronous sockets. The code does not rely on the MFC socket classes. These classes have a number of shortcomings, one of which causes problems when they are used in NT services. The code can be used in a console application without any problems (Again this is not the case for the MFC socket classes). A configurable timeout for the connection can be set through the class API. The classes are fully Unicode compliant and include Unicode built options in the workspace file. As of v1.1, the classes now fully supports file attachments. Full support is included for CC (Carbon Copy) & BCC (Blind Carbon Copy). PJ Naughter at http://indigo.ie/~pjn/index.html

2002VB #24506
Class to encapsulate the PING protocol

MFC class to support the PING/ICMP protocol. ICMP for those not familiar with all the internet protocols is the protocol used to retrieve information about how IP packets are routed. Features Simple and clean C++ interface. The interface provided is synchronous which provides an easier programming model than using asynchronous sockets. A configurable timeout for the connection can be set through the class API. The classes are fully Unicode compliant and include Unicode built options in the workspace file. The enclosed zip file contains the CPing source code and a simple test program to exercise all of the functions the classes provide.

2002VB #24507
MFC classes to implement a Web Server

3Mfc 1.1 A collection of freeware MFC classes to implement a Web Server Welcome to W3Mfc, a collection of freeware MFC classes to implement a simple Web server. The idea behind is W3Mfc was originally to learn about the Http protocol and how it is implemented on Win32. It is not intended to be a replacement for IIS or Apache. Instead it is designed as a tool for learning or in cases where deployment of a solution on IIS would be considered overkill or your product must run on 95/98 in addition to NT. For detailed information about the Hyper Text Transfer Protocol you should read RFC 1945, You can download this from a number of sites by searching for RFC and 1945 on www.yahoo.com. Another document that these classes refer to is RFC 2045 which defines MIME. The classes which constitute W3Mfc are: CHttpServerSettings: This class contains the settings which are used to configure the web server. Example member variables in this class include the root directory and the default filename. If you are developing a stand alone web server based on W3Mfc, you could for example store all the variables for the CHttpServerSettings instance in an ini file or in the registry. In the future this is the class which will be extended to include additional settings such as multiple virtual directories. CHttpServer: This is the actual class which implements the web server. It has a number of very simple functions to allow you to control the state of the web server such as Start and Stop. Internally a background thread is spun off to handle the client connections. CHttpSocket: This is a simple C++/MFC encapsulation of an SDK socket. CHttpResponseHeader: This class helps in the handling of sending request headers when returning the HTTP responses to clients. It provides a number of methods to allow standard Http headers to be added to the client response. CHttpMimeManager: This class is used when returning client responses. It is used to determine the mime type of a file given its extension type. This information is taken from the registry and is cached in this class. For example, files of .htm or .html will normally be of mime type "text/html". CHttpRequest: This class represents a request from a client. It contains information such as the URI of the request, the Http Verb used and the Http version used for the request. A member of this type is stored in the CHttpClient class. CHttpClient: This class is used in the CHttpServer class to handle client connections. It handles the parsing of client requests and returning the appropriate response. A number of virtual functions are provided to allow end user customization. The enclosed zip file contains the W3Mfc source code and a simple console based application which implements a simple web server. PJ Naughter at http://indigo.ie/~pjn/index.html

Languages
Top Categories
Global Discovery