Commit 59f746f6 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Atmo: port Win32 code to UNICODE friendly APIs

This needs testing
parent deb6cf93
......@@ -54,7 +54,7 @@ ATMO_BOOL CAtmoClassicConnection::OpenConnection() {
#if defined(WIN32)
m_hComport = CreateFile(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(m_hComport == INVALID_HANDLE_VALUE) {
// we have a problem here can't open com port... somebody else may use it?
// m_dwLastWin32Error = GetLastError();
......
......@@ -69,7 +69,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::OpenConnection() {
#if defined(WIN32)
m_hComport = CreateFile(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(m_hComport == INVALID_HANDLE_VALUE) {
// we have a problem here can't open com port... somebody else may use it?
// m_dwLastWin32Error = GetLastError();
......
......@@ -50,7 +50,7 @@ HANDLE CAtmoMultiConnection::OpenDevice(char *devName)
#endif
#if defined(WIN32)
hComport = CreateFile(devName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
hComport = CreateFileA(devName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(hComport == INVALID_HANDLE_VALUE) {
#if !defined(_ATMO_VLC_PLUGIN_)
m_dwLastWin32Error = GetLastError();
......
......@@ -73,7 +73,7 @@ ATMO_BOOL CFnordlichtConnection::OpenConnection()
#if defined(WIN32)
m_hComport = CreateFile(serdevice,
m_hComport = CreateFileA(serdevice,
GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, 0, NULL);
if ( m_hComport == INVALID_HANDLE_VALUE )
......
......@@ -54,7 +54,7 @@ ATMO_BOOL CMoMoConnection::OpenConnection() {
#if defined(WIN32)
m_hComport = CreateFile(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(m_hComport == INVALID_HANDLE_VALUE) {
// we have a problem here can't open com port... somebody else may use it?
// m_dwLastWin32Error = GetLastError();
......
......@@ -44,6 +44,7 @@
#include <vlc_playlist.h>
#include <vlc_filter.h>
#include <vlc_atomic.h>
#include <vlc_charset.h>
#include "filter_picture.h"
......@@ -1847,8 +1848,8 @@ static void Atmo_SetupParameters(filter_t *p_filter)
COM Server for AtmoLight not running ?
if the exe path is configured try to start the "userspace" driver
*/
char *psz_path = var_CreateGetStringCommand( p_filter,
CFG_PREFIX "atmowinexe" );
LPTSTR psz_path = ToT(var_CreateGetStringCommand( p_filter,
CFG_PREFIX "atmowinexe" ));
if(psz_path != NULL)
{
STARTUPINFO startupinfo;
......@@ -1858,7 +1859,7 @@ static void Atmo_SetupParameters(filter_t *p_filter)
if(CreateProcess(psz_path, NULL, NULL, NULL,
FALSE, 0, NULL, NULL, &startupinfo, &pinfo) == TRUE)
{
msg_Dbg(p_filter,"launched AtmoWin from %s",psz_path);
msg_Dbg(p_filter,"launched AtmoWin from %s", FromT(psz_path));
WaitForInputIdle(pinfo.hProcess, 5000);
/*
retry to initialize the library COM ... functionality
......@@ -1866,7 +1867,7 @@ static void Atmo_SetupParameters(filter_t *p_filter)
*/
i = AtmoInitialize(p_filter, false);
} else {
msg_Err(p_filter,"failed to launch AtmoWin from %s", psz_path);
msg_Err(p_filter,"failed to launch AtmoWin from %s", FromT(psz_path));
}
free(psz_path);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment