CCPDFConverter/CCPDFConverter.cpp File Reference

Main functions file for CCPDFConverter/XL2PDFConverter application. More...

#include "stdafx.h"
#include "iapi.h"
#include <shellapi.h>
#include <errno.h>
#include <stdio.h>
#include "Helpers.h"
#include <io.h>
Include dependency graph for CCPDFConverter.cpp:

Go to the source code of this file.

Defines

#define MAX_ERR   1023
 Size of error string buffer.

Functions

bool ExistsAsFolder (LPCTSTR pPath)
void CleanInput ()
void CenterWindow (HWND hWnd)
 This function will center the window on the screen.
UINT_PTR CALLBACK SaveDlgCallback (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 Main function.

Variables

FILE * fileInput
 Input file pointer.
char cBuffer [MAX_PATH *2+1]
 Initial input buffer.
int nBuffer = 0
 Length of data in initial buffer.
int nInBuffer = 0
 Current location in the initial buffer.
char cErr [MAX_ERR+1]
 Error string buffer.
const char * ARGS []
 Command line options used by GhostScript.

Detailed Description

Main functions file for CCPDFConverter/XL2PDFConverter application.

Definition in file CCPDFConverter.cpp.


Function Documentation

void CenterWindow ( HWND  hWnd  ) 

This function will center the window on the screen.

Parameters:
hWnd The window to center

Definition at line 232 of file CCPDFConverter.cpp.

Referenced by SaveDlgCallback().

void CleanInput (  ) 

Reads all the data from the input (so no error will be raised if application ends without sending the data to ghostscript)

Definition at line 221 of file CCPDFConverter.cpp.

References cBuffer, and fileInput.

Referenced by WinMain().

bool ExistsAsFolder ( LPCTSTR  pPath  ) 
Parameters:
pPath Path to test
Returns:
true if a folder (not file) exists in the path

Definition at line 87 of file CCPDFConverter.cpp.

UINT_PTR CALLBACK SaveDlgCallback ( HWND  hDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
Parameters:
hDlg Handle of the dialog
uMsg ID of the message
wParam First message paramenter
lParam Second message paramenter
Returns:
TRUE if the message was handled, FALSE otherwise

Definition at line 271 of file CCPDFConverter.cpp.

References CenterWindow().

Referenced by WinMain().

int APIENTRY WinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPSTR  lpCmdLine,
int  nCmdShow 
)

Main function.

Parameters:
hInstance Handle to the current instance
hPrevInstance Handle to the previous running instance (not used)
lpCmdLine Command line (not used)
nCmdShow Initial window visibility and location flag (not used)
Returns:
0 if all went well, other values upon errors

Definition at line 317 of file CCPDFConverter.cpp.

References CanOpenPDFFiles(), cBuffer, cErr, CleanInput(), fileInput, nBuffer, nInBuffer, and SaveDlgCallback().


Generated on Mon Jun 18 12:40:02 2012 for CC PDF Converter by doxygen 1.6.1