Commit 466b8078 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Implement SetupQueueCopyIndirectA() on top of the W variant.

parent 705d3eed
......@@ -504,36 +504,35 @@ BOOL WINAPI SetupCloseFileQueue( HSPFILEQ handle )
/***********************************************************************
* SetupQueueCopyIndirectA (SETUPAPI.@)
*/
BOOL WINAPI SetupQueueCopyIndirectA( PSP_FILE_COPY_PARAMS_A params )
BOOL WINAPI SetupQueueCopyIndirectA( SP_FILE_COPY_PARAMS_A *paramsA )
{
struct file_queue *queue = params->QueueHandle;
struct file_op *op;
if (!(op = HeapAlloc( GetProcessHeap(), 0, sizeof(*op) ))) return FALSE;
op->style = params->CopyStyle;
op->src_root = strdupAtoW( params->SourceRootPath );
op->src_path = strdupAtoW( params->SourcePath );
op->src_file = strdupAtoW( params->SourceFilename );
op->src_descr = strdupAtoW( params->SourceDescription );
op->src_tag = strdupAtoW( params->SourceTagfile );
op->dst_path = strdupAtoW( params->TargetDirectory );
op->dst_file = strdupAtoW( params->TargetFilename );
/* some defaults */
if (!op->src_file) op->src_file = op->dst_file;
if (params->LayoutInf)
{
get_src_file_info( params->LayoutInf, op );
if (!op->dst_path) op->dst_path = get_destination_dir( params->LayoutInf, op->dst_file );
}
TRACE( "root=%s path=%s file=%s -> dir=%s file=%s descr=%s tag=%s\n",
debugstr_w(op->src_root), debugstr_w(op->src_path), debugstr_w(op->src_file),
debugstr_w(op->dst_path), debugstr_w(op->dst_file),
debugstr_w(op->src_descr), debugstr_w(op->src_tag) );
SP_FILE_COPY_PARAMS_W paramsW;
BOOL ret;
queue_file_op( &queue->copy_queue, op );
return TRUE;
paramsW.cbSize = sizeof(paramsW);
paramsW.QueueHandle = paramsA->QueueHandle;
paramsW.SourceRootPath = strdupAtoW( paramsA->SourceRootPath );
paramsW.SourcePath = strdupAtoW( paramsA->SourcePath );
paramsW.SourceFilename = strdupAtoW( paramsA->SourceFilename );
paramsW.SourceDescription = strdupAtoW( paramsA->SourceDescription );
paramsW.SourceTagfile = strdupAtoW( paramsA->SourceTagfile );
paramsW.TargetDirectory = strdupAtoW( paramsA->TargetDirectory );
paramsW.TargetFilename = strdupAtoW( paramsA->TargetFilename );
paramsW.CopyStyle = paramsA->CopyStyle;
paramsW.LayoutInf = paramsA->LayoutInf;
paramsW.SecurityDescriptor = strdupAtoW( paramsA->SecurityDescriptor );
ret = SetupQueueCopyIndirectW( &paramsW );
heap_free( (WCHAR *)paramsW.SourceRootPath );
heap_free( (WCHAR *)paramsW.SourcePath );
heap_free( (WCHAR *)paramsW.SourceFilename );
heap_free( (WCHAR *)paramsW.SourceDescription );
heap_free( (WCHAR *)paramsW.SourceTagfile );
heap_free( (WCHAR *)paramsW.TargetDirectory );
heap_free( (WCHAR *)paramsW.TargetFilename );
heap_free( (WCHAR *)paramsW.SecurityDescriptor );
return ret;
}
......
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