win32.cpp File Reference

Win32-specific functions. More...

#include "win32.h"
#include <tlhelp32.h>
#include <shlobj.h>
#include <QDir>
#include <QLibrary>
#include <QtDebug>

Go to the source code of this file.

Typedefs

typedef HANDLE(WINAPI * CreateToolhelp32Snapshot_fn )(DWORD, DWORD)
typedef BOOL(WINAPI * Process32First_fn )(HANDLE, LPPROCESSENTRY32)
typedef BOOL(WINAPI * Process32Next_fn )(HANDLE, LPPROCESSENTRY32)

Functions

QString win32_get_folder_location (int folder, QString defaultPath)
QString win32_program_files_folder ()
QString win32_app_data_folder ()
QString win32_registry_get_key_value (QString keyLocation, QString keyName)
void win32_registry_set_key_value (QString keyLocation, QString keyName, QString keyValue)
void win32_registry_remove_key (QString keyLocation, QString keyName)
QHash< qint64, QString > win32_process_list ()


Detailed Description

Win32-specific functions.

Version:
Id

Definition in file win32.cpp.


Typedef Documentation

typedef HANDLE(WINAPI * CreateToolhelp32Snapshot_fn)(DWORD, DWORD)

Definition at line 46 of file win32.cpp.

typedef BOOL(WINAPI * Process32First_fn)(HANDLE, LPPROCESSENTRY32)

Definition at line 47 of file win32.cpp.

typedef BOOL(WINAPI * Process32Next_fn)(HANDLE, LPPROCESSENTRY32)

Definition at line 48 of file win32.cpp.


Function Documentation

QString win32_app_data_folder (  ) 

Gets the location of the user's APPDATA% folder.

Definition at line 87 of file win32.cpp.

Referenced by Vidalia::defaultDataDirectory(), and expand_filename().

QString win32_get_folder_location ( int  folder,
QString  defaultPath 
)

Finds the location of the "special" Windows folder using the given CSIDL value. If the folder cannot be found, the given default path is used.

Definition at line 54 of file win32.cpp.

Referenced by win32_app_data_folder(), and win32_program_files_folder().

QHash<qint64, QString> win32_process_list (  ) 

Returns a list of all currently active processes, including their pid and exe filename.

Definition at line 167 of file win32.cpp.

Referenced by is_process_running().

QString win32_program_files_folder (  ) 

Gets the location of the user's PROGRAMFILES% folder.

Definition at line 79 of file win32.cpp.

Referenced by expand_filename(), and TorSettings::TorSettings().

QString win32_registry_get_key_value ( QString  keyLocation,
QString  keyName 
)

Returns the value in keyName at keyLocation. Returns an empty QString if the keyName doesn't exist

Definition at line 96 of file win32.cpp.

Referenced by VidaliaSettings::runVidaliaOnBoot().

void win32_registry_remove_key ( QString  keyLocation,
QString  keyName 
)

Removes the key from the registry if it exists

Definition at line 147 of file win32.cpp.

Referenced by VidaliaSettings::setRunVidaliaOnBoot().

void win32_registry_set_key_value ( QString  keyLocation,
QString  keyName,
QString  keyValue 
)

Creates and/or sets the key to the specified value

Definition at line 120 of file win32.cpp.

Referenced by VidaliaSettings::setRunVidaliaOnBoot().


Generated on Wed Sep 5 15:49:28 2007 for Vidalia by  doxygen 1.5.3