Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

The Ultimate Toolbox - Updates and User Contributions

, 12 Feb 2013 CPOL
Updates and User Contributions for the Ultimate Toolbox Libraries
OutlookDemoUpdate.zip
Ultimate Grid
Demos
OutlookStyle
OutlookStyle.aps
OutlookStyle.dsp
OutlookStyle.dsw
OutlookStyle.suo
res
bitmap1.bmp
bmattach.bmp
bmp00001.bmp
bmp00002.bmp
bmp00003.bmp
Flags.bmp
OutlookStyle.ico
OutlookStyleDoc.ico
Toolbar.bmp
toolbar1.bmp
toolbar2.bmp
toolbarf.bmp
UltimateGrid72_Src_Update01.zip
CellTypes
Include
Source
UltimateGrid72_Src_Update02.zip
DataSources
ODBC
OleDB
EditControls
UltimateGrid72_Src_Update03.zip
UltimateGrid72_Src_Update04.zip
UltimateGrid73_src.zip
BuildDLL
Build DLL.dsp
Build DLL.dsw
res
BuildLib
ugmfclib.dsp
ugmfclib.dsw
Lib
Skel
UltimateTCP-IP42_Src_Update01.zip
Ultimate TCP-IP
Include
Security
Include
Source
source
UltimateTCP-IP42_Src_Update02.zip
Examples
Client
Mail
icon1.ico
icon2.ico
MailClientS.suo
test.dsp
test.dsw
UltimateTCP-IP42_Src_Update03.zip
ultimatetoolbox93_src_update01.zip
Ultimate Toolbox
include
source
UltimateToolbox93_Src_Update02.zip
lib
Build DLLs
Build Libs
UltimateToolbox93_Src_Update03.zip
UltimateToolbox93_Src_Update04.zip
UltimateToolbox93_Src_Update05.zip
// =================================================================
//  class: CUT_CertRequestWizard
//  File:  UT_CertWizard.h
//  
//  Purpose:
//
//	  Certificate request wizard
//       
// ===================================================================
// Ultimate TCP/IP v4.2
// This software along with its related components, documentation and files ("The Libraries")
// is � 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is
// governed by a software license agreement ("Agreement").  Copies of the Agreement are
// available at The Code Project (www.codeproject.com), as part of the package you downloaded
// to obtain this file, or directly from our office.  For a copy of the license governing
// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900.
// ===================================================================

#ifndef UT_CERTWIZARD
#define UT_CERTWIZARD

#ifdef CUT_SECURE_SOCKET

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <windows.h>
#include <windowsx.h>
#include <prsht.h>
#include <tchar.h>
#include <windef.h>


#include "UTCertifMan.h"

extern HANDLE hDllHandle;
#pragma comment(lib, "comctl32.lib")

class UTSECURELAYER_API CUT_CertRequestWizard  
{
public:
	// Constructor/Destructor
	CUT_CertRequestWizard();
	virtual ~CUT_CertRequestWizard();

	// Display the certificate request wizard
	virtual int DisplayWizard(DWORD dwStoreLocation =  CERT_SYSTEM_STORE_CURRENT_USER);
	
	// Return the certificate request data
	virtual LPCSTR GetCertRequest()
		{ return (LPCSTR) m_lpszRequestBuffer; }

	// Set flag to save the request into the buffer only (No saving to file)
	virtual void SetSaveToMemoryOnly(BOOL bFlag)
		{ m_bSaveToBufferOnly = bFlag; }

protected:

	_TCHAR		*m_lpszKeyContainerName;// Name of the key container
	enumPublicKeySize	m_dwKeySize;	// Certificate public key length
	_TCHAR		*m_lpszCommonName;		// Common Name 
	_TCHAR		*m_lpszOrganization;	// Organization Name
	_TCHAR		*m_lpszOrganizationUnit;// Name of the organization unit
	_TCHAR		m_lpszCountry[4];		// Two letter code for the country
	_TCHAR		*m_lpszState;			// Name of the state or province
	_TCHAR		*m_lpszCity;			// Locality 
	_TCHAR		*m_lpszGivenName;		// Given Name 
	_TCHAR		*m_lpszEMail;			// Email 
	_TCHAR		*m_lpszPhone;			// Phone Number
	_TCHAR		*m_lpszRequestBuffer;	// A buffer to hold the returned request
	_TCHAR		*m_lpszFileName;		// Name of the file to save the request data to
	BOOL		m_bOpenWithNotePad;		// Flag to open the file with notepad
	DWORD		m_dwStoreLocation;		// Store location
	HINSTANCE	m_hInstance;			// Application Instance
	int			m_nWizardResult;		// Wizard result error code
	BOOL		m_bSaveToBufferOnly;	// Do not save request to file.

protected:

// v4.2 - update 01 - 64-bit - return values for callbacks changed to INT_PTR
	// Key name and strength dialog
	static INT_PTR CALLBACK KeyStrengthDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
	
	// Error dialog Proc
	static INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
	
	// Organization dialog Proc
	static INT_PTR CALLBACK OrganizationDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
	
	// Common Name Dialog
	static INT_PTR CALLBACK CommonNameDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);

	// Geographic Location Dialog
	static INT_PTR CALLBACK GeographicInfoDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
	
	// Contact Information Dialog
	static INT_PTR CALLBACK ContactInfoDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
	
	// Request File Name Dialog
	static INT_PTR CALLBACK RequestFileDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);

	// Preview Dialog
	static INT_PTR CALLBACK PreviewDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);

	// Set the page style based on I.E.  version
	void SetPageStyle(PROPSHEETPAGE     *psp, LPTSTR szTitle, LPTSTR szSubTitle);

};

#endif // #ifdef CUT_SECURE_SOCKET

#endif // #ifndef UT_CERTWIZARD

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

The Ultimate Toolbox
Web Developer
Canada Canada
In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.
 
Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.
Group type: Organisation

392 members


| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.1411023.1 | Last Updated 13 Feb 2013
Article Copyright 2008 by The Ultimate Toolbox
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid